[En-Nut-Discussion] ATMAN compiler

Harald Kipp harald.kipp at egnite.de
Thu Dec 7 16:31:08 CET 2006


Zhao,

I do not know much about the Atman compiler, but your
problem appears because of wrong linker options. At least

--defsym=main=0

is missing.

With Nut/OS, main() is a thread, started by the idle thread.
The stack of the main() thread is set in NutThreadCreate().

Nut/OS redefines main() as NutAppMain() to avoid GCC's attempt
to re-initialize the stack on main() entry.

Harald

At 01:00 08.12.2006 +1100, you wrote:
>Hi everyone,
>
>I have played around with the NutOs so that it can be compiled using Atman
>compiler. However, when I try to compile my application code, I get a
>linking error saying C:\Program
>Files\AtmanAvr\avrgcc\bin\..\lib\gcc\avr\4.1.1\..\..\..\..\avr\lib\avr5\crtm
>1280.o:(.init9+0x0): error: undefined reference to 'main'
>
>
>
>I have no idea what that means or how to fix it. Can anyone help? I'm new to
>this field, so any suggestion will be much appreciated.
>
>
>
>Regards,
>
>
>
>Zhao
>
>_______________________________________________
>http://lists.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list