[En-Nut-Discussion] How do I generate Ethernut (Net & OS) with symbols?

José Vallet jose.vallet at hut.fi
Mon Jan 30 08:27:38 CET 2006


Hello Chuck.

I am just a newbie here, so don't take my answer here as "the" answer, OK?.

Chuck Hackett wrote:

> 
> # Rule to generate project elf file for debugging
> elf: $(PROJ).elf
> 
> Then I did a "make clean", "make all" and "make elf"
> 
> When I load it into AVRStudio I appear to have symbol information for HTTPD but
> not for Nut itself.
> 
> Also, is adding the "elf: $(PROJ).elf" rule to "HTTPD\UserConf.mk" the way I'm
> supposed to generate the elf file?  It seemed strange that I'd have to do that
> but I noticed that the "make all" deletes the elf file at the end and I didn't
> notice any other rules to produce it. 

If I want to generate the .elf file what I do is "make 
myprogramname.elf" and it works. I don't add anything special to any 
file. Actually "myprogramname" can be anything, and it will generate the 
.elf file with that name (for example "make lalala.elf" will exactly 
generate a file named lalala.elf)

here is an example of the output of the process for a projects which 
main  file is pemctrl.c

$ make pemctrl.elf
avr-gcc pemctrl.o  xflash.o tftp.o pbtwique.o PemBoard.o PbDebug.o 
-mmcu=atmega128 -Wl,--defsym=main=0,-Map=pemctrl.map,--cref 
-Lc:/ethernut-4.0.1/nutbld/lib c:/ethernut-4.0.1/nutbld/lib/nutinit.o 
-lnutarch -lnutnet -lnutpro -lnutfs -lnutos -lnutdev -lnutnet -lnutcrt 
-o pemctrl.elf

$ make hh.elf
avr-gcc pemctrl.o  xflash.o tftp.o pbtwique.o PemBoard.o PbDebug.o 
-mmcu=atmega128 -Wl,--defsym=main=0,-Map=pemctrl.map,--cref 
-Lc:/ethernut-4.0.1/nutbld/lib c:/ethernut-4.0.1/nutbld/lib/nutinit.o 
-lnutarch -lnutnet -lnutpro -lnutfs -lnutos -lnutdev -lnutnet -lnutcrt 
-o hh.elf

I cannot answer the rest of your questions. I am also struggling trying 
to debug. Hope this helped anyway.

Regards,
José





More information about the En-Nut-Discussion mailing list