AVR debugwire in Linux
Have a look at avarice. It's man page also has something to say about debugwire. I don't know if that'll be good news or bad, though.
enable debugwire
enable with avrdude (fuse for attiny88):
avrdude -c dragon_isp -P usb -p attiny88 -v -U hfuse:w:0xd9:m
compilation
- must be compiled with -ggdb or great (--gdb3) but doesn't seem to help with macros
no optimisations
COMPILE = $(GCC_PATH) -ggdb3 -Wall -Wextra $(OPTIMIZATION) -std=gnu11 -flto -mmcu=$(DEVICE) -DF_CPU=$(CLOCK)
need main.hex and main.elf
debugging
start avarice:
avarice -g -w -P attiny88 :4242
then start gdb:
avr-gdb main.elf
and connect:
target remote localhost:4242
breakpoints
only sw breakpoints with debugwire, so if need breakpoints use:
asm('break');
switch back to spi/icsp mode
NB. VTG/VCC pin (2 on header) must be connected to chip supply for this to work!
avrdude -c dragon_isp -P usb -p attiny88 -v -U hfuse:w:0xdd:m