cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create the STM32WBA55CGUX_FLASH.ld file?

YBAYR.1
Associate III

I'm using STM32CubeIDE 2.0 and CubeMX 6.16.1. When I create a project in CubeMX, it doesn't create the STM32WBA55CGUX_FLASH.ld file. It creates the makefile when I select it in the Toolchain/IDE section, but then gives an error.

YBAYR1_0-1766062724359.png

 

10 REPLIES 10
Souhaib MAZHOUD
ST Employee

Hello @YBAYR.1 

Thank you for bringing this up!

Could you please check the project directory to confirm if the STM32WBA55CGUX_FLASH.ld file is not present?

KR, Souhaib

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.

The STM32WBA55CGUX_FLASH.ld file doesn't exist initially.

I can create it using CubeMX with toolchain/ide:makefile, but I get an error in the compiler.

CubeMX should add linker file titled "STM32WBA55xx_FLASH.ld" instead of "STM32WBA55CGUX_FLASH.ld".

can you check please?

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.


@YBAYR.1 wrote:

The STM32WBA55CGUX_FLASH.ld file doesn't exist initially.


What do you mean by, "initially" here?

How, exactly, did you get to that point?

 


@YBAYR.1 wrote:

I can create it using CubeMX 


Yes, the whole purpose of CubeMX is to create a complete project for you - including source code, linker script, and the IDE Project or makefile.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I did it this way; it gave an error in the first compilation, but it worked in the second compilation.

YBAYR1_0-1766071048214.png

this is the first compilation

 

 

YBAYR1_2-1766071146685.png

 

My settings are like this

 

first compilation

YBAYR1_3-1766071293842.png

The first time I press the compile button, it gives an error.

Then, when I press it again, it doesn't give an error.

Your screenshot chops off the end of the line - so we can't see the full message.

Better to copy & paste it as text - see here for instructions.

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I'll send the entire line. But what I don't understand is why it gave an error the first time I compiled it, and then suddenly gave zero errors; that's very strange. And it's like this every time I make a change to the project.

 

arm-none-eabi-gcc -o "NKNode.elf" @"objects.list"  -Wl,--start-group -l:WBA5_LinkLayer15_4.a -l:wba_mac_lib.a -Wl,--end-group -mcpu=cortex-m33 -T"C:\TTS_YB_V01\Node\NKNode\STM32WBA55CGUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="NKNode.map" -Wl,--gc-sections -static -L../Middlewares/ST/STM32_WPAN/link_layer/ll_cmd_lib/lib -L../Middlewares/ST/STM32_WPAN/mac_802_15_4/lib --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.100.202509120712/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.100.202509120712/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v8-m.main+fp/hard/crtn.o: missing .note.GNU-stack section implies executable stack
C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.100.202509120712/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
Finished building target: NKNode.elf
 
arm-none-eabi-size  NKNode.elf 
arm-none-eabi-objdump -h -S NKNode.elf  > "NKNode.list"
   text	   data	    bss	    dec	    hex	filename
 117180	   1500	  29784	 148464	  243f0	NKNode.elf
Finished building: default.size.stdout
 
Finished building: NKNode.list
 

08:57:11 Build Failed. 1 errors, 3 warnings. (took 2s.702ms)

Hello @YBAYR.1 

It seems that this error is related to BLE applications, as mentioned in Stm32CubeIDE errata known issue: https://wiki.st.com/stm32mcu/wiki/STM32CubeIDE:STM32CubeIDE_errata_2.0.x#STM32WB0,

as workaround you can use the linker option: -z noexecstack.

BR, Souhaib

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.