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.
2024-09-19 09:49 PM
Bonjour @OmidES
Could you please attach you .ioc file (if possible for the two CubeMX versions).
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-09-20 12:45 AM
Bonjour,
Yes, sure. I have attached the two versions.
Another issue that I also faced, in CubeMX 12.6.0, was when I set the Toolchain to CMake, the DTCMRAM is used. However, if I change the Toolchain to STM32CubeIDE, the RAM_D1 is being used. Is there a way to select which RAM to use in CubeMX?
Thanks again for your help.
2024-09-20 08:26 PM
it seem like a bug。 the same configuration, 6.12.0 works well. but 6.12.1 have ld error
2024-09-22 04:40 AM
The 6.12.1 seems to generate a linker script (.ld) that lacks some 'RAM' symbols on its code, which leads syntax errors.
2024-09-22 04:52 AM - edited 2024-09-23 12:28 AM
Hello @mshibata @OmidES @xingpeng
Thank you so much for your escalation. I've sent this to the concerned team for investigation and correction on the coming releases (under internal ticket number 191745).
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-09-22 07:15 AM
2024-09-24
12:08 AM
- last edited on
2024-09-24
02:14 AM
by
Maxime_MARCHETT
Is this a bug? If so, how long will it take to fix?
This post has been translated from Chinese to comply with the ST Community guidelines.
2024-09-28 01:22 PM
Confirmed with regular "make".
Missing "RAM" in .ld file. When I repair the file, next cubeMX code generation breaks it again:
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
- _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
+ _estack = ORIGIN() + LENGTH(); /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
@@ -143,7 +143,7 @@ SECTIONS
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
- } >RAM AT> FLASH
+ } > AT> FLASH
/* Uninitialized data section */
@@ -160,7 +160,7 @@ SECTIONS
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
- } >RAM
+ } >
/* User_heap_stack section, used to check that there is enough RAM left */
._user_heap_stack :
@@ -171,7 +171,7 @@ SECTIONS
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
- } >RAM
+ } >
c:/program files (x86)/gnu arm embedded toolchain/arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe:STM32F446RCTx_FLASH.ld:56: syntax error
collect2.exe: error: ld returned 1 exit status
Adding "RAM" back to ld will fix it.
Thanks GITHUB for keeping proper version! Interesting, old bugs are still here? When we'll get hotfix? And I don't want to hear about "concerned team for investigation".
2024-09-28 01:32 PM - edited 2024-09-28 01:33 PM
I found a quick solution. You can generate the code by setting the Toolchain to STM32CubeIDE. Then make a copy of the .ld file and use it on your project. Becausae the .ld file generated when setting Toolchain to STM32CubeIDE is still correct.
I hope that helps.