FLASH.ld syntax error when upgrading to CubeMX v6.12.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-19 01:46 PM - last edited on ‎2024-10-01 07:39 AM by Andrew Neil
Hello,
Since the latest release of CubeMX (6.12.1), I have been encountering syntax errors related to the "FLASH.ld" file. This issue only arises when I generate code while setting the Toolchain/IDE to CMake. I am using STM32H753IIKx. It seems that CubeMX does not specify which RAM to use when setting the Toolchain/IDE to CMake.
I have also included the FLASH.ld file that was generated for your reference.
Thanks for your help.
Solved! Go to Solution.
- Labels:
-
Bug-report
-
STM32CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-29 05:23 PM
In STM32CubeMX, just click on "TOOLS" menu then select both:
Save project and re-generate it. The linker file will be correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-29 05:45 PM - edited ‎2024-09-29 05:51 PM
I WAS WRONG! Sorry ....
The correct action is to select FLASH (or RAM) in "Search an Application Region" :
Then save and re-generate project.
:(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-30 11:10 AM
Well, this is not the solution either. In my case, for STM32F103C8Tx, CubeMX does not allow configuring it's memories (under tools).
CubeMX produces an .ld file completely different when exporting for Makefiles and exporting with build files for STM32CubeIDE. Strangely, the .ld file produced for using with STM32CubeIDE reports it is generated by STM32CubeIDE and not by MX.
 
FYI, I am attaching the two different linker files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-30 12:32 PM
And this prevents rolling back to previous version or CubeMX
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 07:04 AM
Hello,
Thanks for the reply. But a quick question. I cannot find "Search an Application Region" in CubeMX.
Can you please tell me where I can find it?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 09:18 AM
I believe this present under tools only for some devices. At least for a F103C8Tx it does not exist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-04 01:35 PM - edited ‎2024-10-04 01:36 PM
Wow, this is so frustrating. I lost the better part of a day's work due to this bug. Not so much lost code, but lost time, trying to figure out what I'd done wrong in my project. To then finally discover it's not anything I did wrong, but rather it's a bug in CubeMX. Lame.
For anyone experiencing this issue, here's what I did to resume productivity.
- Removed CubeMX 6.12.1
- Restored from git to get my project prior to the point where 6.12.1 migrated my ioc file
- Installed CubeMX 6.12.0
- Somewhat painfully got my project back to where it was before 6.12.1 (despite frequent git commits)
The take away is: do frequent git commits, and never trust that letting CubeMX migrate your project isn't going to break something. The irony for me was, I'd updated CubeMX due to a bug in the version I'd been running (fields in the app would suddenly become non-responsive to keyboard input).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-05 12:16 AM
Another option (but not without risk), you can edit the IOC file and change the mininum cubemx required version, I am pretty sure they did not change anything between 6.12.0 and 6.12.1 they just broke the tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-07 02:49 AM
CubeMX forgets about references to RAM
We have:
Should be
And at the end of .data section definition:
Should be:
Also for .bss
Should be:
And for ._user_heap_stack we have:
Should be:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-19 03:14 AM
When the fixed version will be released