-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
Most of the IAR build statically define the stack size to be something between 512 bytes to 24 kbytes.
This stack, however, is not even used in RTX case. Or maybe it is only used for interrupts.
Each other threads define their own stack, something between 1kB - 6kB. There is no justification to use 24kB for boot stack.
For example, Ublox EVK Odin W2 defines this:
/*-Sizes-*/
/*Heap 1/2 of ram and stack 1/8*/
define symbol __ICFEDIT_size_cstack__ = 0x6000;
define symbol __ICFEDIT_size_heap__ = 0x18000;
Which means we have statically allocated 24kB for the stack that is mostly unused, and 98kB for the heap. Total 122880 kB. That leaves only 73 kB for other use (Threads, .data and .bss sections).
This is causing problems when getting anything to fit into these devices. This issues is mostly visible on IAR as it does not dynamically grow the heap.
We should align the stack sizes between boards. Some sensible number, with justification, should be used.