Skip to main content
AMoor.1
Associate
March 16, 2022
Question

Any help would be appreciated. I am having an issue with the CubeMX software, namely it is taking too much data memory on my STM32WLJ1 board. I am trying to use the built in fatfs middelware in CubeMX. Is there a way to reduce its size/alternative?

  • March 16, 2022
  • 2 replies
  • 1100 views

The program size of my project is as follows "Program Size: Code=30996 RO-data=1548 RW-data=36 ZI-data=34980". The board i am using is a STM32WLJ1 board "256-Kbyte Flash memory and 64-Kbyte SRAM". I believe flash memory is causing me issues in my project. I am left to conclude that the CubeMx software is somehow taking up alot of data memory and i was wondering if there was any way to reduce this requirement. Any help would be appreciated, thank you.

This topic has been closed for replies.

2 replies

TDK
March 17, 2022

> Program Size: Code=30996 RO-data=1548 RW-data=36 ZI-data=34980

> I believe flash memory is causing me issues in my project.

Why? Your code size is well below the 256kB available.

Higher optimization settings will lead to smaller code sizes. And/or more optimized code.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Pavel A.
Super User
March 17, 2022

>  I believe flash memory is causing me issues in my project.

The bottleneck seems to be in RAM data, not flash.

AMoor.1
AMoor.1Author
Associate
March 20, 2022

my apologies, yes RAM seems to be the issue. I am wondering if there are any ways to optimize the size of the code using either the STMcubeIDE or the Keil uVision software?

Pavel A.
Super User
March 20, 2022

As TDK wrote, enable size optimization in compiler options.

If this won't yield enough savings, look what occupies the RAM, optimize manually.