cancel
Showing results for 
Search instead for 
Did you mean: 

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?

AMoor.1
Associate

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.

5 REPLIES 5
TDK
Guru

> 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.
Evangelist III

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

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

AMoor.1
Associate

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?

As TDK wrote, enable size optimization in compiler options.

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

Generally there isn’t a magic solution. Look at what is taking up RAM and see where you can reduce. CubeIDE lists memory usage in each region.
If you feel a post has answered your question, please click "Accept as Solution".