2025-02-17 01:56 PM
I upgraded my MacBook computer and installed the latest STM32CubeIDE 1.17 like many other people reporting the new warning that has appeared with the 12.3 toolchain. I have an STM32F413 project I have been working on for a few years which uses an RTOS and TouchGFX (if it matters). I followed the "fix" in the other posts about updating the linker file to the latest version. The Debug build no longer has the warning so that is great.
The issue is with the Release build. Any optimization setting other than None causes the warning which the Release build has a size optimization enabled. What is the process to get rid of the error other than supressing it which is not really a "fix"? I figure the optimization is changing the permissions on the memory regions and overwriting the linker file settings. Is there a proper method to prevent this? I am using the latest default STM32F4113VGTx_... linker files for this project.
-Tim
2025-02-17 04:29 PM - edited 2025-02-17 04:30 PM
Please check that both Debug and Release configurations refer to the corrected linker file.
> I figure the optimization is changing the permissions on the memory regions and overwriting the linker file settings.
No chance.
2025-02-18 05:23 AM
The settings are the same for both configurations including the linker file. It was easy to test before I posted the issue by turning on optimization in the Debug configuration and turning off the optimization in the Release configuration. The warning is definitely tied to the optimization setting. Any setting other than 'None' produces the memory region warning.
2025-02-18 05:32 AM - edited 2025-02-18 05:34 AM
I ve been seeing this in almost every Compilation i do for F4 and G4 family (cubeIDE makefile, Cmake aswel)....
I dont have any explanation and i normally just run with it, im suspecting some "recent" version of CubeIDE (1.15.0) being responsible
2025-02-18 03:06 PM
Can you look in the .map file which segment goes to RW memory region and causes this warning?
2025-02-19 05:40 AM
The map file is 13,000 lines long and there are thousands with .data and .bss memory region entries. I don't know how to search for a specific line that is causing the warning. What would I be looking for?
Given Javier1's comment about some sort of interaction with STCube, I decided to try a test. I installed GCC compiler version 13.3.rel and the project builds without warnings with the latest linker file and optimization on or off. I compared the map files for 12.3.rel and 13.3.rel and they are much closer in similarity than 11.3.rel. If I switch back to 12.3.rel the warnings come back.
At this point, I am inclined to move the latest version unless there is a reason I shouldn't. This feels like a better plan than suppressing the warning in ver 12.3.rel. But if there is a good search method in the map file to identify root cause and make source code changes, I am open to that.