Main thread stack size?

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
JetForMe
Posts: 99
Joined: Mon Jan 31, 2011 8:12 am

Main thread stack size?

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Main thread stack size?

Post 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
Post Reply