2025-03-10 8:31 AM - last edited on 2025-03-11 1:37 AM by Andrew Neil
Originally a reply to this thread:
Split as it seems to be a different issue.
Hi,
I have same issue too
I am using STM32F051R8 with STM32CubeIDE Version: 1.18.0
There is limited Flash memory. So when I am checking the memory I found some library names etc definition strings on my hex file. I tried to change some setting according to topics above but no success at all
Please let me know which settings is this. Also I am using optimization "Optimize for size -s"
Regards
Murat
Solved! Go to Solution.
2025-03-15 6:55 AM - edited 2025-03-15 6:56 AM
I just wonder that why the unused text is placed on the hex file and takes space. Anyway I will find a way to handle this situation.
Yes I mean text in my hex file output. I will try to eleminate printf floating point usages in the code (The printf and floating numbers are used already with the older versions of the firmware). Now, we need to add some new features and functions to the firmware with older board (to support new type of LED display ICs), it tooks extra space too.
Thanks for your support, (Keil is not the case for me. Because I am using many kinds of project with same stm32cubeide compiler and same programing interface. Typology and usages are all same. Even if they have similar usages but using a different compiler takes time to find new settings and typings. I mean deep settings like priorities etc)
Thanks @KnarfB I will take a look at your references for alternative impelementations as well
2025-03-15 7:41 AM
I mean Keil as test for compare. If you use MX switch code to keil is simple click... And Keil compiler with -O3 generate always smaller code as GCC...
2025-03-15 9:45 AM
@istepne wrote:
Flash usage also looks like too much
Really?
That's telling you that you've only used 36% - so you've still got 70% free!
Well over half of your flash is unused!
2025-03-15 3:03 PM - edited 2025-03-15 3:04 PM
As I said, it is only a coplete new project results..No any letter my own. It consumes %37 code size even no code my own (code optimization is open too).
My old project was already %96 percent codesize. The last 1K sector space also used for eeprom evaulation too. So, I wonder that if it is possible to remove text links from hex file. I need every bytes if I can.
Anyway I finished the firmware update, added new requiered functions on it. But I had to remove some features on the firmware