cancel
Showing results for 
Search instead for 
Did you mean: 

FP-CLD-AWS1 v3.0.1 compile error in higher STM32CubeIDE version than 1.8.0.

ELee.16.65
Associate II

FP-CLD-AWS1 software package v3.0.1 for STWINKT1B fails to be compiled in higher STM32CubeIDE version than 1.8.0. Library link error happens. It is successfully compiled only in 1.8.0. version. It seems to be IDE bug. 

I hope it to be checked and fixed.

1 ACCEPTED SOLUTION
4 REPLIES 4
Bob S
Principal

Exactly what errors are you getting?

The IDE changed compiler versions somewhere in the 1.8/1.9/1.10 releases, I don't recall exactly which one. And the newer compiler versions change some default compiler/linker settings. One that got a lot of attention on this forum was the change to how the linker handled "multiple definitions" of variables. Lots of sloppy code would put "int somevar" in the include file instead of "extern int somevar". With the old default "-fcommon" setting, the linker would merge all of those into a single instance. The newer default "-fno-common" does not merge them and you get dozens/hindreds of "multiple definition" errors from the linker.

Copied and pasted error I am getting.

[CubeIDE 1.8.0]

arm-none-eabi-gcc -z max-page-size=0x200 -o "STWINv1_aws_demos.elf" @"objects.list" -l:se_interface_app.o -mcpu=cortex-m4 -T"D:\3View\AWS\STM32CubeFunctionPack_AWS1_V3.0.1\Projects\STEVAL-STWINKT1\Applications\Cloud\aws_demos\STM32CubeIDE\STM32L4R9xx_FLASH_sbsfu.ld" --specs=nosys.specs -Wl,-Map="STWINv1_aws_demos.map" -Wl,--gc-sections -static -L../../../../BootLoader_STSAFE/2_Images_SBSFU/STM32CubeIDE/STWINv1_2_Images_SBSFU/Debug -Xlinker -L ../../../../BootLoader_STSAFE/Linker_Common/STM32CubeIDE -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -u _printf_float -u _scanf_float -Wl,--start-group -lc -lm -Wl,--end-group

Finished building target: STWINv1_aws_demos.elf

arm-none-eabi-size  STWINv1_aws_demos.elf 

arm-none-eabi-objdump -h -S STWINv1_aws_demos.elf > "STWINv1_aws_demos.list"

arm-none-eabi-objcopy -O binary STWINv1_aws_demos.elf "STWINv1_aws_demos.bin"

  text   data   bss   dec   hex filename

 377808   3584 383824 765216  bad20 STWINv1_aws_demos.elf

Finished building: default.size.stdout

Finished building: STWINv1_aws_demos.bin

Finished building: STWINv1_aws_demos.list

"../../../../BootLoader_STSAFE/2_Images_SECoreBin/STM32CubeIDE/postbuild.sh" ".." "./STWINv1_aws_demos.elf" "./STWINv1_aws_demos.bin" "1" "bigelf"

prepareimage with windows executeable

Generating the global elf file (SBSFU and userApp)

[CubeIDE 1.9.0 & 1.10.1]

arm-none-eabi-gcc -z max-page-size=0x200 -o "STWINv1_aws_demos.elf" @"objects.list" -l:se_interface_app.o -mcpu=cortex-m4 -T"D:\3View\AWS\STM32CubeFunctionPack_AWS1_V3.0.1\Projects\STEVAL-STWINKT1\Applications\Cloud\aws_demos\STM32CubeIDE\STM32L4R9xx_FLASH_sbsfu.ld" --specs=nosys.specs -Wl,-Map="STWINv1_aws_demos.map" -Wl,--gc-sections -static -L../../../../BootLoader_STSAFE/2_Images_SBSFU/STM32CubeIDE/STWINv1_2_Images_SBSFU/Debug -Xlinker -L ../../../../BootLoader_STSAFE/Linker_Common/STM32CubeIDE -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -u _printf_float -u _scanf_float -Wl,--start-group -lc -lm -Wl,--end-group

c:\st\stm32cubeide_1.10.1\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 '../../../../BootLoader_STSAFE/2_Images_SBSFU/STM32CubeIDE/STWINv1_2_Images_SBSFU/Debug\se_interface_app.o' as input to a link

collect2.exe: error: ld returned 1 exit status

make[1]: *** [makefile:104: STWINv1_aws_demos.elf] Error 1

Can you tell me how to change linker or compiler default setting in CubeIDE?

Regards,

Ernest

ELee.16.65
Associate II

Thanks!