Monday, April 12, 2010

gdb debugging using simavr

I just got debugging using gdb working with simavr. It's as simple as putting
avr->gdb_port = 1234;
avr->state = cpu_Stopped;
in the code that preceeds the simulation loop. Then, start avr-gdb (using the name of your firmware ELF file as the executable), and issue the command "target remote localhost:1234". Presto, you're debugging your firmware. Sweet.

No comments: