Skip to main content
Senior II
December 2, 2024
Question

Minimum Heap Size has no effect on linker file

  • December 2, 2024
  • 1 reply
  • 634 views

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

ST Employee
December 3, 2024

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.

 

Carl_GAuthor
Senior II
March 3, 2025

Are you saying the only effect of the MHS setting in the IDE is to change something to do with STL?