From: Blake L. <ble...@at...> - 2008-02-04 13:24:31
|
On Sunday 03 February 2008, pl...@ap... wrote: > Hi, > > First thanks to all for the previous anwsers to my questions ! > > I can now program my ZigBit with avarice/jtagice mkii with my linux box. > > I try to debug a ZibBit module with an Atmega1281 inside with avarice and > avr-gdb (freshly compiled from gdb!) > > I can program and start the debugging with avarice, then I connect with > avr-gdb and I try some command to start debugging and it's stop with the > error : > cannot read program counter > > Any idea ? > > Thanks > > Philippe I don't see anything wrong with your commands. I do wonder about a few things. Why do you use the -l option? I don't think that is needed for debugging. I see you are using gdb-6.7. I downgraded to 6.6 because I was getting these "watchdog expired" messages. However, I later discovered that I was specifying the wrong part number, which was bad. I decided to use 6.6 because that's the version WinAVR uses, and that has had significant testing with the AVR parts. Also, if you only have one jtagice box attached on usb, you can simply use the "-j usb" option without the jtag address. Saves some typing. Just as a reference point, I can program/debug the Zigbit with these two commands: avarice -j usb -2 -P atmega1281 --erase -f project.hex sleep 2 avarice -j usb -2 -P atmega1281 :4242 --detach I use avr-gdbtui, which shows the source code automatically. And I use KDevelop, which is a GUI debugger, for times when I need to step through a lot of code. Blake |