Question
Configuration of Stacksize and Heapsize when using CubeMX
Posted on November 22, 2015 at 17:01
In my Stm32F401 based project, I use CubeMX 4.11.0 for generation of initialization code. My IDE & toolchain is SW4STM32.
Within the generated code, there is also the linkerscript STM32F401VCTx_FLASH.ld, which contains:/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
Since I'm running FreeRtos with heap_4, I dont need this kind of heap. And on the other side, I need the min stack size increased to 2k. For the first, I'd adjusted the values inside of the linkerscript manually, like this:_Min_Heap_Size = 0; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */
and this works as expected. But unfortunately, each time when I do code regeneration with CubeMX, my changes were lost. This brings up the question, were to configure these both parameters in CubeMX? As far as I see, this is a missing feature, isn't it? Joe.