CRT0_INIT_STACKS
Posted: Thu Mar 28, 2019 12:55 pm
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.
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.