cancel
Showing results for 
Search instead for 
Did you mean: 

Minimum Heap Size has no effect on linker file

Carl_G
Associate III

When I make a change to the Minimum Heap Size setting in the ioc file (STM32CubeIDE 1.16.1) for G071RBTX, it results in no change to the linker file. However, changing the Minimum Stack Size here does cause a change in the liker file. What does the MHS setting actually do?

I have read posts claiming that this is some type of check and has no other real value. I can't understand what is meant by this however. I don't use a heap in my programs as far as I am aware. I do use FreeRTOS but it seems that has its own chunk of RAM that it uses as a heap but not related to this MHS setting. I'm not starved for RAM but I am interested in knowing what this setting is supposed to do.

1 REPLY 1
Sarra.S
ST Employee

Hello @Carl_G

The MHS setting in the STM32CubeIDE does not affect the linker file because the STL (Self-Test Library) does not use dynamic allocation, so the heap size is independent of the STL. This means that changing the MHS setting in the ioc file does not have any impact on the linker file (Check UM3167)

SarraS_0-1733221610915.png

but since you mentioned that you do not use a heap in your programs and FreeRTOS manages its heap separately, the MHS setting does not play a significant role in your case.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.