DebugWIRE is a one-wire, half-duplex serial communication protocol designed by Atmel (now part of Microchip). This protocol makes it possible to do embedded debugging. It is used to communicate with the on-chip debugging (OCD) modules of classic ATtinys and smaller ATmega devices, such as the ATmega328P, using the RESET pin. Microchip’s hardware debuggers allow you to debug these chips in conjunction with Microchip’s IDEs MPLAB X IDE and Microchip Studio.
However, you must shop elsewhere if you are a fan of open-source software and/or dislike convoluted IDEs. 2011 RiskusW reverse-engineered the debugWIRE protocol and published his notes on http://www.ruemohr.org/docs/debugwire.html. Unfortunately, this web page went offline last year. But as we all know, the Internet does not forget anything. Although this webpage does not look like a complete specification of a protocol, it served as a point of departure for several projects described on the Hardware Debugger and the gdbserver page.
Meanwhile, there is official documentation available. The EDBG protocol specification describes how to access debugWIRE features in the Microchip hardware debuggers as part of EDBG. Similarly, the Python scripts pyedbglib and pymucprog, which implement most of the EDBG protocol, also cater to debugWIRE, at least partly.
On the following pages, I have gathered all information that may be relevant to you, when you want to deal with debugWIRE MCUs:
- What is embbeded debugging anyway?
- What does the physical interface of debugWIRE look like, and what consequences does it have for the debugging process?
- What hardware debuggers (commercial and DIY) are around that can aid you in debugging debugWIRE MCUs?
- What is a gdbserver, and which ones are around that can handle debugWIRE MCUs?
- Which MCUs use the debugWIRE protocol?
- On which official Arduino boards can you find debugWIRE MCUs?
- What support does the Arduino IDE 2 provide for debugWIRE MCUs?
- And what kind of support do you get in the PlatformIO system?