CRT0_INIT_STACKS

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
geoffrey.brown
Posts: 122
Joined: Thu May 07, 2015 9:47 pm
Has thanked: 3 times
Been thanked: 18 times

CRT0_INIT_STACKS

Post by geoffrey.brown »

What unintended consequences might I face using CRT0_INIT_STACKS=0 ?

I'm using standby mode on and stm32l4 which means a "reset" on exit. With a 1 sec wake up alarm, the cost is relatively high (3msec) which can be significantly reduced by eliminating as much memory initialization as possible (for example putting large buffers in an area of memory that isn't initialized (thanks to the very flexible ChibiOS linker script !). A major chunk of initialized memory is the thread stack. I've started using the compile time switch CRT0_INIT_STACKS=0 to turn this off, which cuts my wakeup cost significantly. But, I worry this might have some unintended consequences, hence my question.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: CRT0_INIT_STACKS

Post by Giovanni »

Hi,

Those fillers are used just for stack usage measurement, you can disable it safely if your stacks have already been sized properly.

Giovanni
Post Reply