[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] minit-stack
From: |
Ruud Vlaming |
Subject: |
Re: [avr-gcc-list] minit-stack |
Date: |
Thu, 23 Oct 2008 11:18:04 +0200 |
User-agent: |
KMail/1.9.1 |
On Wednesday 22 October 2008 10:39, Ruud Vlaming wrote:
> -Wl,--defsym=__stack=xOS+xOSstackShift
> However, that trick does not longer functions.
Got it.
This trick does function if you leave the quotes out, so
-Wl,--defsym=__stack="xOS+xOSstackShift" is wrong and
-Wl,--defsym=__stack=xOS+xOSstackShift is correct.
Furthermore, you must set xOSstackShift as a global
symbol now (previously that was not needed) so:
asm(".global xOSstackShift \n\t ");
asm(".set xOSstackShift, " DefToString(OSstackInit) " \n\t ");
somewhere will do. xOSstackShift may only be a constant however
(and not be linked to some other symbol).
This way you can intialize the stack at the top of the predefined
array xOS, so at &xOS[SstackInit].
Hope this helps anyone with similar questions.
What keeps puzzling me is why this is not allowed:
asm(".global __stack \n\t ");
asm(".set __stack, xOS \n\t ");
Ruud.