cancel
Showing results for 
Search instead for 
Did you mean: 

FLASH.ld syntax error when upgrading to CubeMX v6.12.1

OmidES
Associate II

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.

27 REPLIES 27
eduard0-claudi0
Associate

In STM32CubeMX, just click on "TOOLS"  menu then select both:

eduard0claudi0_0-1727655747986.png

Save project and re-generate it. The linker file will be correct



I WAS WRONG! Sorry ....

The correct action is to select FLASH (or RAM) in "Search an Application Region" :

eduard0claudi0_0-1727657469535.png

Then save and re-generate project.

:(

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.


Code_EPYhY8Je3o.png



FYI, I am attaching the two different linker files

And this prevents rolling back to previous version or CubeMX


javaw_JarjtUqBLY.png

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 

I believe this present under tools only for some devices. At least for a F103C8Tx it does not exist

cyclebot
Associate II

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. 

  1. Removed CubeMX 6.12.1
  2. Restored from git to get my project prior to the point where 6.12.1 migrated my ioc file
  3. Installed CubeMX 6.12.0
  4. 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). 

 

 

 

 

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

grzegorz
Associate III

CubeMX forgets about references to RAM

We have:

_estack = ORIGIN() + LENGTH();    /* end of RAM */

Should be

_estack = ORIGIN(RAM) + LENGTH(RAM);    /* end of RAM */

And at the end of .data section definition:

  } > AT> FLASH

Should be:

  } >RAM AT> FLASH

Also for .bss

  } >

Should be:

  } >RAM

And for ._user_heap_stack we have:

  } >

Should be:

  } >RAM
YangZhang
Associate

When the fixed version will be released