debugWire
You’ll need two Arduino Uno Rev3s.
One will serve as our target, which will get debugged, while the other will act as the actual debugger.
To make this possible, we’ll be taking advantage of dw-link
to turn one of the Arduinos into a debugger.
- Grab the latest release of
dw-link
.- (Optionally) Feel free to read the
dw-link
manual.
- (Optionally) Feel free to read the
- Compile and upload the sketch to your designated Arduino debugger.
- Install MiniCore using the board manager.
- Set your board to be the MiniCore ATmega328, disable compiler LTO, and optimize sketches for debugging.
- We have already enabled debugWire on all of the target boards, so it is sufficient to connect pin 8 of the debugger board to the reset pin of the target, along with power and ground to their respective locations.
- Verify your sketch at least once before starting debugging.