Skip to main content
Zanon.Luciano
Associate III
September 1, 2021
Solved

Excessive resource usage

Hi, I am attaching a simple .ioc configuration file with which I generated a new project using stm32 cubeide which when compiled generates a footprint of about 12kB.

Frankly, it seems excessive to me, to the point of making this platform unusable for projects with limited memory resources.

This problem has escalated in the latest versions of stm32 Cubeide.

Is there a way to have greater control over the resources used?

This topic has been closed for replies.
Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
September 1, 2021

You are using the build configuration Debug, which requires additional memory.

You can easily reduce this memory requirement below 5KB if you set the build configuration to Release and also set C/C++ Build > Settings > Optimization to Optimize for size.

If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

Good luck!

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

2 replies

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
September 1, 2021

You are using the build configuration Debug, which requires additional memory.

You can easily reduce this memory requirement below 5KB if you set the build configuration to Release and also set C/C++ Build > Settings > Optimization to Optimize for size.

If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

Good luck!

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Zanon.Luciano
Associate III
September 1, 2021

Thanks for your quick reply, I did some tests and found that the change from "Debug" to "Release" does not involve any reduction of the footprint.

Changing the compiler optimization to -Os results in a footprint reduction from 10K to just under 5k.