[En-Nut-Discussion] Debugging with JTAG

Alex Jacques alexj at pulver.com
Tue Dec 14 21:36:48 CET 2004


> I am trying to debug with Avr Studio 4.10 and JTAG. I am using the COF file. It
> works perfectly, for the sources of the project, but not for the Nut/Net and
> Nut/OS coming out of the library. Is there a way to tell the compiler to
> include debug information for those also?

When using nutconf, go to "Nut O/S Components" => "Tools" => "GCC 
Settings" => "Include debug info" and make sure the box is checked.

Then rebuild NutOS.

BTW, there is a beta AvrStudio that accepts ELF format files with 
-gdwarf-2 debug info. I find this works better. See 
http://www.atmel.no/beta_ware/ and install build 356 and then the build 
359 update. If you do this change the value for "include debug info" to 
"-gdwarf-2". Create programs with "make program.elf".

> I am trying to preserve the eeprom, but the flag removes itself each time I am
> flashing. Is there something I am missing? Also, what is the better way to
> reprogram the eeprom content? I found thet with the simple monitor, this works
> but this is not the easyest process I assume?

When you start AvrStudio and select an elf or cof file for debugging, 
check "Open Platform Options" on the "Select debug platform and device" 
popup. You then get a "JTAG ICE" popup. Go to the "Debug" tab and select 
"Preserve EEPROM Contents". You can also get to this via the main 
window's "Debug" => "Select platform and device".

This drove me nuts until I finally stumbled across it.




More information about the En-Nut-Discussion mailing list