Skip to main content
ABatt.1
Associate III
October 29, 2020
Question

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.

  • October 29, 2020
  • 2 replies
  • 543 views

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.

This topic has been closed for replies.

2 replies

TDK
Super User
October 29, 2020

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
ABatt.1Author
Associate III
November 1, 2020

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