linker _Min_Stack_Size and _Min_Heap_Size

michatroniker wrote on Thursday, April 05, 2018:

Hello,

I am using FreeRTOS since quite a while. Today, I found in my linker script
the settings for _Min_Stack_Size and _Min_Heap_Size. Can’t I just set those
to 0 and save some memory? FreeRTOS is allocating its own memory anyways
outside these regions, doesn’t it?

Thanks,

Michael S.

rtel wrote on Thursday, April 05, 2018:

The stack set up by your linker is used when main() is called so it is
still needed. As you mention, once the kernel is started each task has
its own stack which is allocated by the kernel itself. What happens to
the stack used by main() after that depends on your architecture. If
you are using a Cortex-M then the stack is re-purposed for use by
interrupts.