cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIde COMPILER

Ephraimoved
Associate III

Dear Sir,

A project written for STM32U585 reaches the size 900 k bytes.

Trying to lower the size , I am tryin to use properties.

MCU GCC C compiler -> Optimization

Trying to set Optimization level to optimize most  to -Q3 

the property of Optimization level is back to None (-Q0).

 

Please Advise.

6 REPLIES 6
Mahmoud Ben Romdhane
ST Employee

Hello @Ephraimoved 

Thank you for posting.

Could you please provide the STM32 Cube IDE version.

Thanks.

Mahmoud.

 

TDK
Guru

Perhaps you changed build configurations, or didn't hit Apply. This is a per-configuration setting.

If you feel a post has answered your question, please click "Accept as Solution".

Hi

1.12.1

 

Be care if you click on file yu change only one file optimize level. Click on project and try...

And optimize is O not Q

And when your previous optimize level is size, then O3 dont get you most super efect. You need optimize your code data system or replace MCU to 2M

@MM..1 sorry for curiosity, but what is that 2M? and what is code data system?

There are one and two megabyte flash versions of the STM32U585, likely the same die, the assumptions is that the OP is getting worried at 900KB as it's close to the 1024KB ceiling. Sounds like this code might need refactoring, or at least identifying where the current resources are going, optimization alone won't compress graphics or binary blobs.

The U599 is up to 4MB

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..