cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L011 RAM usage

Indois
Associate II

Hello,

I am using STM32L011 MCU and STM32CubeIDE environment. After generating project with CubeMX and even deleting initializations in main function, 'Build analyzer' section shows that 76 % of RAM memory (of total 2KB) is used. What might consume so much memory?

Thanks.

2 REPLIES 2
TDK
Guru

You can look in the map file to find out what's in use. CubeMX isn't really built for chips with a super-low RAM amount.

 

You can build in Release mode to mitigate.

If you feel a post has answered your question, please click "Accept as Solution".
TDK
Guru

Actually, I was interested. Turns out 512 bytes is the default stack and 1024 bytes is the default heap.

0693W00000AQ3V9QAL.png 

You can adjust these in the linker script.

_Min_Heap_Size = 0x200;	/* required amount of heap  */
_Min_Stack_Size = 0x400;	/* required amount of stack */

HAL only uses 48 bytes of RAM, way less than I expected.

If you feel a post has answered your question, please click "Accept as Solution".