cancel
Showing results for 
Search instead for 
Did you mean: 

Why CubeMX use so many memory? I create the blink test from Stepbystep on NUCLEO-L011 with default settings (UART disabled). When I compile the project, it takes 77% of RAM and 33% of Flash.

ABatt.1
Senior

There is somthings wrong in settings of my CubeMX?

There is some optimizzatione that I can do?

If I don't use CubeMX ( and so I don't use HAL), there is another libraryes that I can use in order to manage the MCU without managing register ?

Thanks.

2 REPLIES 2
TDK
Guru

The NUCLEO-L011 only has 16 kB of FLASH and 2kB of SRAM. The majority of STM32 chips have significantly more than this so it's less of an issue. HAL is not built to be space efficient.

You could ditch HAL and use direct register access to reduce space. You should also ensure you're on the highest optimization settings to cut down on space needed. You could also look at different compiler, linker and newlib nano setting to cut down on space.

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

thanks for your aswer, I will serach for more efficient libraries to manage NUCLEO_L011.