Debuger for nanoatmega328

Hi porlock,

atmega328 chip uses AVR’s “debug-wire” technology instead of higher Chip’s JTAG stuff. That’s why, I really think that register-, breakpoint- and GPIO level debugging are only possible when connecting a debug device like the Atmel ICE to the 6-pin header.

I own an Atmel ICE and used it sometimes in the past, but I have switched to using serial output and - more recently - setting up unit tests both locally (to check if outputs are active etc.) and on native for more complex tests, completely abstracting the Hardware, only using the laptop’s compiler and a framework.

If you’re not dependant on e.g. analog in levels of the chip for your special application, it might be a good idea to dive into unit testing with PIO, saving time over fiddling around with registers.

Some additional reference: Debugger for Arduino uno / Mega and ESP8266 - #8 by ivankravets