PyAvrOCD

PyAvrOCD is a GDB server for 8-bit AVR MCUs (currently only classic debugWIRE and JTAG ATtinys and ATmegas). It can communicate with Microchip debuggers such as Atmel-ICE and MPLAB Snap, and provides a pass-through service for the Uno-based debugger dw-link. For Microchip debuggers, PyAvrOCD uses the infrastructure provided by pymcuprog and pyedgblib.

Why another open-source GDB server for AVR MCUs (others are AVaRICE and Bloom)? The main intention is to provide a platform-agnostic AVR GDB server. In other words, it is the missing AVR debugging solution for PlatformIO and the Arduino IDE 2.

ide2-6

In addition to being platform agnostic, PyAvrOCD offers some enhancements over its "competitors", particularly in terms of flash wear and single-stepping.

After installing the package, the following steps are necessary for successful debugging:

  1. Installing and configuring the appropriate debugging software
  2. Preparing the target board for debugging
  3. Connecting the hardware debugger to the target
  4. Invoking the GDB server
  5. Debugging a program on the target
  6. Restoring the target to its original state

Once you have a debugger connected to the server, you can control the server's behavior using monitor commands.

While the package appears to function as intended, there is always the chance of a bug. If you run across a behavior that seems odd, you can report it as an issue. I hope to resolve those over time.