Page 1 of 1

Main thread stack size?

Posted: Mon Feb 07, 2011 1:11 am
by JetForMe
It looks like the main thread has a minimal stack size. I can't quite figure out how it works. It looks like its working area is declared statically in chSysInit, and is just a Thread structure.

Is it possible, or even necessary, to change the main thread's stack size?

Re: Main thread stack size?

Posted: Mon Feb 07, 2011 9:16 am
by Giovanni
In the AVR port the startup and linker files are provided by the compiler environment. The stack is allocated on top of the RAM and it is application responsibility to not intersect the stack area, you should carefully examine the map file.
In most other ports the stack sizes are handled by ChibiOS-provided startup and linker files.

Giovanni