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

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


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
Also have a look at

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


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