enable with avrdude (fuse for attiny88):
avrdude -c dragon_isp -P usb -p attiny88 -v -U hfuse:w:0xd9:m
-
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
start avarice:
make && avarice -g -w -P attiny88 --program --file main.elf :4242 -r
minimum required
avarice -g -w -P attiny88 :4242
then start gdb:
avr-gdb main.elf
and connect:
target remote localhost:4242
- list
- until main.c:23 # continue till this line
- continue
- print loops
- p/x loops # print in hex
- p/t loops # print in binary
- step
- set $pc += 2 # jump an instruction to get out of breakpoint
- layout # change different layouts
- x/t 0x2B # examine address in memory
only sw breakpoints with debugwire, so if need breakpoints use:
asm('break');
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
to disable debugwire on attiny88
avrdude -c dragon_isp -P usb -p attiny88 -v -U hfuse:w:0xdd:m
- after breaking, can't conitnue without setting $pc (skip to next instruction: set $pc += 2)
- macros aren't defined