Skip to main content
AMoor.1
Associate
Mar 16, 2022 8:05 PM UTC
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?

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.

5 replies

TDK
Mar 17, 2022 12:20 AM UTC

> 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.
Mar 17, 2022 7:05 AM UTC

>  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
Mar 20, 2022 7:28 PM UTC

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.
Mar 20, 2022 8:23 PM UTC

As TDK wrote, enable size optimization in compiler options.

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