2023-08-25 02:44 AM
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.
2023-08-25 03:28 AM
Hello @Ephraimoved
Thank you for posting.
Could you please provide the STM32 Cube IDE version.
Thanks.
Mahmoud.
2023-08-25 06:28 AM
Perhaps you changed build configurations, or didn't hit Apply. This is a per-configuration setting.
2023-08-26 10:59 PM
Hi
1.12.1
2023-08-26 11:19 PM - edited 2023-08-26 11:21 PM
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
2023-08-27 04:21 AM - edited 2023-08-27 04:22 AM
@MM..1 sorry for curiosity, but what is that 2M? and what is code data system?
2023-08-27 05:37 AM
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