[En-Nut-Discussion] source code in AVR studio with avr-gcc

Nic Cave-Lynch nic at tymar.com
Thu Oct 14 22:22:05 CEST 2004


Hi all

What do I need to do to be able to use AVR studio to step through the C 
source of an EtherNut project compiled using avr-gcc? I've created the 
COF file using the relevant rule in MakeRules.avr-gcc, and enabled the 
creating of debugging output in Makedefs.avr-gcc, and it all looks 
right. AVR studio will read the cof file, and download it to the 
EtherNut 1.3f board using the JTAG-ICE MKII debugger, and it runs (sort 
of) OK. The problems are a) AVR studio complains of an error while 
resetting target: "Program entry function 'main' not found". and b) if I 
pause the program and single step, all I get is the disassembled code, 
not the C. the AVR studio 'Go to source' command doesn't do anything.

I have a feeling that the problems are related, and connected to the 
comment somewhere about the need to re-define 'main' as NutAppMain with 
avr-gcc. But there are comments on the ethernut web site about being 
able to step the source of an Ethernut app using AVR studio.

Any ideas? I'm using avr-gcc version 3.3.2, AVR studio version 4.10, and 
NutOs 3.9.2.

Thanks

Nic Cave-Lynch




More information about the En-Nut-Discussion mailing list