How to set the stack size on "main" thread

Discussions and support about ChibiOS/RT, the free embedded RTOS.
Post Reply
josesimoes
Posts: 91
Joined: Sat Feb 18, 2017 11:50 am
Has thanked: 43 times
Been thanked: 23 times

How to set the stack size on "main" thread

Post by josesimoes »

Hi,

How can I set the stack size of thread that will run main() (when this option is enabled)?
I could only find a way of setting this when a thread is defined with osThreadDef(...).

Thanks.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: How to set the stack size on "main" thread

Post by Giovanni »

Hi,

It depends on port and compiler, for ARM-GCC it is in the Makefile, you can find there settings for the Process Stack (main() function) and Main Stack (IRQ and exceptions).

Giovanni
Post Reply