[En-Nut-Discussion] I have successfully compiled and debugged with symbols!

José Vallet jose.vallet at hut.fi
Thu Feb 9 14:55:59 CET 2006


Hello Chuck

Chuck Hackett wrote:

> I have finally gotten to the point where I can debug the httpd demo with
> symbols.  
...
> BTW: for those trying also trying to debug with symbols (José ?) this is the
> environment I have that seems to be working:
> 
> - WinXP Pro w/sp2
> - Ethernut 4.0.1
> - WinAVR-20060125
> - AVRStudio 4.12.462  Service Pack 1
> - debug format elf w/dwarf-2
> - Ethernut 2.1b target
> - ICE-Cube for JTAG connection (Graham Davies, http://www.ecrostech.com) 

I use the same environment, except Ethernut-4.0.2 and AVRJTAGICE_MKII

> 
> To compile Nut w/symbols I created Nut\Makedefs.avr-gcc-debug as a copy of
> Nut\Makedefs.avr-gcc and altered the CPFLAGS entry to include:
> 
> " -g3 -gdwarf-2 -Os"
> 
> (I also altered CXXFLAGS for completeness)
> 
> I also created Nut\Makerules.avr-gcc-debug as a copy of Nut\Makerules.avr-gcc
> and altered the "Platform" setting in the Configurator settings to
> "avr-gcc-debug"
> 


I have tried this as well and the NutOS code compiled well. Then, when 
trying to compile my own code it complained that:
--------------
jose at aut-090 /cygdrive/c/ethernut-4.0.2/nutapp/PEM
$ make clean
../Makedefs:10: c:/ethernut-4.0.2/nut/app/Makedefs.avr-gcc-debug: No 
such file or directory
../Makerules:4: c:/ethernut-4.0.2/nut/app/Makerules.avr-gcc-debug: No 
such file or directory
make: *** No rule to make target 
`c:/ethernut-4.0.2/nut/app/Makerules.avr-gcc-debug'.  Stop.
--------------

So I just got inside c/ethernut-4.0.2/nutapp/ and copied the 
Makedefs.avr-gcc and Makerules.avr-gcc adding the "-debug" at the end of 
their names. Then it worked.

So, basically I can see now the NutOS code in my debugger, but now I 
have another problem: I cannot go "step by step" in my code; when I 
press the "next" button in AVR Studio, it goes all dooooown to the 
deepest guts of the NutOS. I will give more details in a new mail.

Thanks!

Regards,
José




More information about the En-Nut-Discussion mailing list