2026-03-03 12:44 AM - last edited on 2026-03-03 1:37 AM by Andrew Neil
I have created a project for the STM32WL33 several weeks ago, using the DEEPSTOP mode with context restoration provided by ST. Even if there are some pitfalls with this the project worked mostly fine. But after the update to STM32CubeIDE 2.1.0 I get a compilation error:
./System/Startup/cpu_context_switch.o(CPUcontextRestore): Unknown destination type (ARM/Thumb) in ./Core/Src/system_stm32wl3x.o
dangerous relocation: unsupported relocation
make: *** [makefile:89: Euris3-EHKV-WMBus.elf] Error 1
I've reverted the version to 2.0.0 and the error is gone.
Solved! Go to Solution.
2026-03-03 1:36 AM - edited 2026-03-03 1:40 AM
@RWalko wrote:system_stm32wl3x.o
dangerous relocation: unsupported relocation
Same message here: Solved: system_stm32wb0x.c - dangerous relocation: unsupported relocation (CubeIDE, CubeMX).
@Ghofrane GSOURI - Internal Ticked 228023 raised by @Mahmoud Ben Romdhane
2026-03-03 12:45 AM
Hello @RWalko
Could you please provide your project?
THX
Ghofrane
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.
2026-03-03 1:05 AM
Sorry, I cannot provide my project as it includes company code and I cannot quickly clean it up. If you can provide a safe data transfer possibility I may be able to send you the project.
2026-03-03 1:36 AM - edited 2026-03-03 1:40 AM
@RWalko wrote:system_stm32wl3x.o
dangerous relocation: unsupported relocation
Same message here: Solved: system_stm32wb0x.c - dangerous relocation: unsupported relocation (CubeIDE, CubeMX).
@Ghofrane GSOURI - Internal Ticked 228023 raised by @Mahmoud Ben Romdhane
2026-03-03 1:46 AM
That's simply a new wording for an old linker error message "undefined symbol". Some strange update happened to LD.
2026-03-03 1:54 AM - edited 2026-03-03 1:55 AM
From the ARM forums:
"Since binutils version 2.44, functions in assembly must include the assembler directive .type name, %function, otherwise they fail at linking."
See also: https://gcc.gnu.org/pipermail/gcc-help/2025-May/144189.html
And: https://lists.denx.de/pipermail/u-boot/2025-May/589101.html
2026-03-10 3:24 AM
@gbm wrote:That's simply a new wording for an old linker error message "undefined symbol".
Seems to be slightly different ?
The problem seems to the that the Assembler and/or Linker has become more picky about the specific details of the definition - the definition does exist, but is not qualified with this new %function directive requirement ?
2026-04-01 2:21 AM - edited 2026-04-01 2:23 AM
@Ghofrane GSOURI @Mahmoud Ben Romdhane
Another example of the same issue has just appeared - this time with H7 & X-CUBE-AUDIO-KIT:
livetune Designer Source Code Compilation Error
2026-04-12 6:31 PM
Could you tell me how to write this in C?
Would I need to use inline assembly?
2026-04-13 1:54 AM
It seems to be purely an issue for assembler?
I think you need to start a separate thread of your own (this one is already marked as solved), giving a full description of your particular situation.
You can always give a link back to this thread, for context.
How to write your question to maximize your chances to find a solution