[ECOS] When should I setup the stack pointer?

Nick Garnett nickg@ecoscentric.com
Mon Oct 14 10:49:00 GMT 2002


"Qiang Huang" <jameshq@liverpool.ac.uk> writes:

> Hi all:
>      I just wonder when should I setup the stack pointer if I am not using
> redboot or gdb stub to run my ecos application? how to relate .bss section
> to the stack pointer? (Is the stack inside the .bss section?)
> 
> For example: Sparc taget, should I setup the stack k pointer in the very
> beginning (surely after setting up the VSR) of the program in vectors.S?
> 

Most HALs set the stack pointer as soon as it makes sense to do
so. Usually after the basic initialization has been done. As long as
it is done before anything that might use it, like a function call, it
does not really matter when it happens.

-- 
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list