[En-Nut-Discussion] ATMAN compiler

Zhao Liu zhliu at iinet.net.au
Thu Jan 4 14:05:40 CET 2007


Hi Harald,
Thanks for the help. I have managed compile my version of NutOs for
Atmega1280 using the latest GCC. I'm now having trouble starting the Idle
thread. I have tried using internal and external memory to start this
thread, but neither worked. It seems to me that I get stack in:-

    if (runningThread == 0)
        asm("rjmp thread_start");

Am I missing some settings in the NUTTHREADINFO?

Any advice is much appreciated.

Thanks again.

Zhao

-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Harald Kipp
Sent: Friday, December 08, 2006 2:31 AM
To: Ethernut User Chat (English)
Subject: Re: [En-Nut-Discussion] ATMAN compiler

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\crt
m
>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

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.14/578 - Release Date: 12/7/2006




More information about the En-Nut-Discussion mailing list