fjpanag opened a new issue #2001: URL: https://github.com/apache/incubator-nuttx/issues/2001
I am using NuttX v9.1.0, on an STM32F427. As I see, (at least) on Cortex-M architectures, the idle stack is placed right after BSS. The top of stack is defined as: `#define IDLE_STACK ((unsigned)&_ebss+CONFIG_IDLETHREAD_STACKSIZE-4)` This makes the assumption that there is enough memory after BSS to fit the idle stack. If BSS grows enough that there is less than `CONFIG_IDLETHREAD_STACKSIZE` free space, then the top of stack will fall outside the memory region. Even worse, since this is not checked during build, there will be no warning or any indication of the problem. The system will just crash during initialization. My proposition is to add an explicit memory region in the linker script to place the idle stack, so its position and size are well defined, and checked during build. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org