Associate III
December 7, 2021
Solved
[BUG] X-CUBE-SBSFU linker error with GNU Tools for STM32 (10.3-2021.10)
- December 7, 2021
- 3 replies
- 3002 views
When compiling UserApp from 2_Images example application for NUCLEO-L476RG linker outputs the following error:
cannot use executable file '../../SBSFU/Debug/se_interface_app.o' as input to a link
arm-none-eabi-gcc -z max-page-size=1 -o "UserApp.elf" @"objects.list" ../../SBSFU/Debug/se_interface_app.o -mcpu=cortex-m4 -T"../STM32L476RGTx.ld" --specs=nosys.specs -Wl,-Map="UserApp.map" -Wl,--gc-sections -static -Xlinker -L ../../Linker_Common --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
c:\st\stm32cubeide_1.0.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: cannot use executable file '../../SBSFU/Debug/se_interface_app.o' as input to a link
collect2.exe: error: ld returned 1 exit status
make[1]: *** [makefile:66: UserApp.elf] Error 1
make: *** [makefile:59: all] Error 2I am using X-CUBE-SBSFU v2.5 on STM32CubeIDE v1.8.0 with GNU Tools for STM32 (10.3-2021.10).
However the issue disappears and build succeeds when using same IDE but with older toolchains - checked with both GNU Tools for STM32 (9-2020-q2-update) and GNU Tools for STM32 (7-2018-q2-update).
Attached is whole build output.
This is clearly related to this bin-utils bug report https://sourceware.org/bugzilla/show_bug.cgi?id=26223
And here you can see bin-utils have been patched to fix this error: https://sourceware.org/bugzilla/show_bug.cgi?id=26047
