system_stm32wb0x.c - dangerous relocation: unsupported relocation (CubeIDE, CubeMX)
Environment:
MCU: STM32WB09KE (Cortex-M0+)
Board: NUCLEO-WB09KE
STM32CubeIDE Version: 2.1.0
STM32CubeIDE Build: 27993_20260219_1630 (UTC)
STM32CubeMX Version: 6.17.0
Operating under Windows 11 Home.
The project previously built successfully before updating CubeIDE @ approx. 23 February 2026. The "Installation History" tab in CubeIDE poorly reflects this update action however.
Toolchain / IDE: STM32CubeIDE
Setup:
In this page, ST generously provides us a .zip folder containing existing application projects that STM32WB0-series users can import, edit, and build directly. Version: 1.4.0.
After extraction, the project "BLE_DirectionFinding_Central_Locator" (inside ..\<unzipped_folder>\STM32Cube_FW_WB0_V1.4.0\Projects\NUCLEO-WB09KE\Applications\BLE) is what I've been using.
Error:
After updating CubeIDE, the following output appears on console:
13:43:14 **** Incremental Build of configuration Debug for project BLE_DirectionFinding_Central_Locator ****
make -j16 all
arm-none-eabi-gcc -o "BLE_DirectionFinding_Central_Locator.elf" @"objects.list" -Wl,--start-group -l:libcrypto.a -l:stm32wb0x_ble_stack.a -Wl,--end-group -mcpu=cortex-m0plus -T"C:\Users\<censored>\STM32CubeIDE\<censored>\WB0_1.4.0_Unzipped_1\STM32Cube_FW_WB0_V1.4.0\Projects\NUCLEO-WB09KE\Applications\BLE\BLE_DirectionFinding_Central_Locator\STM32CubeIDE\STM32WB09KEVX_FLASH.ld" --specs=nosys.specs -Wl,-Map="BLE_DirectionFinding_Central_Locator.map" -Wl,--gc-sections -static -L../../../../../../../Middlewares/ST/STM32_BLE/cryptolib -L../../../../../../../Middlewares/ST/STM32_BLE/stack/lib -LC:/Users/<censored>/STM32Cube/Repository/STM32Cube_FW_WB0_V1.4.0/Middlewares/ST/STM32_BLE/cryptolib -LC:/Users/<censored>/STM32Cube/Repository/STM32Cube_FW_WB0_V1.4.0/Middlewares/ST/STM32_BLE/stack/lib -z noexecstack --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Common/BLE/Startup/cpu_context_switch.o(CPUcontextRestore): Unknown destination type (ARM/Thumb) in ./Drivers/CMSIS/system_stm32wb0x.o
./Drivers/CMSIS/system_stm32wb0x.o: in function `SystemInit':
C:/Users/<censored>/STM32CubeIDE/<censored>/WB0_1.4.0_Unzipped_1/STM32Cube_FW_WB0_V1.4.0/Projects/NUCLEO-WB09KE/Applications/BLE/BLE_DirectionFinding_Central_Locator/Core/Src/system_stm32wb0x.c:206:(.text.SystemInit+0x26): dangerous relocation: unsupported relocation
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:87: BLE_DirectionFinding_Central_Locator.elf] Error 1
"make -j16 all" terminated with exit code 2. Build might be incomplete.
13:43:16 Build Failed. 3 errors, 0 warnings. (took 1s.448ms)Summarised:
Linker fails at ```Unknown destination type (ARM/Thumb) in ./Drivers/CMSIS/system_stm32wb0x.o
dangerous relocation: unsupported relocation```.
Cleaning the project and deleting the Debug folder does not resolve the issue.
Restarting the device and STM32CubeIDE does not resolve the issue.
The issue occurs on an untouched example project.
Is STM32Cube_FW_WB0_V1.4.0 validated against GNU tools for STM32 14.3.1?
Is there something I'm missing?
Do feel welcome to request files or more information.
