[En-Nut-Discussion] Ethernut card (sample code)

Harald Kipp harald.kipp at egnite.de
Wed Jul 19 09:45:58 CEST 2006


Raul,

I never tried AVR Studio with GCC and assume that some
modifications to the plugin are required. In opposite to
usual C programs, Nut/OS...

...main() is running as a thread, started by the idle thread.
...main() is replaced by NutAppMain, because GCC does some
stack manipulation on main entry.
...nutinit.o must be linked first.
...requires one or more defines (option -D) to properly
compile for the specific target.

You may try compiling on the command line first as described in
http://www.ethernut.de/pdf/enswm24e.pdf
Also have a look at
http://www.ethernut.de/en/documents/ntn-5_config.html

With this information you may be able to modify the GCC plugin.

Harald

At 11:52 18.07.2006 -0700, you wrote:

>====================================================
>./../../../../avr-libc-1.4.4/crt1/gcrt1.S:51: undefined reference to `main'
>make: *** [testgcc.elf] Error 1
>Build failed with 1 errors and 0 warnings...
>====================================




More information about the En-Nut-Discussion mailing list