stm32plus icon indicating copy to clipboard operation
stm32plus copied to clipboard

Linker error with GCC 6.3.1

Open mechatrocity opened this issue 8 years ago • 1 comments

When I try to build with GCC 6.3.1 I'm getting the following error;

arm-none-eabi-g++ -o examples/adc_analog_watchdog/build/small-f4-25000000e/adc_analog_watchdog.elf -Xlinker --gc-sections -mthumb -g3 -gdwarf-2 -mcpu=cortex-m4 -Texamples/adc_analog_watchdog/system/f407_168_8/Linker.ld -Wl,-wrap,__aeabi_unwind_cpp_pr0 -Wl,-wrap,__aeabi_unwind_cpp_pr1 -Wl,-wrap,__aeabi_unwind_cpp_pr2 -Wl,-wrap,atexit examples/adc_analog_watchdog/build/small-f4-25000000e/adc_analog_watchdog.o examples/adc_analog_watchdog/build/small-f4-25000000e/system/LibraryHacks.o examples/adc_analog_watchdog/build/small-f4-25000000e/system/f407_168_8/Startup.o examples/adc_analog_watchdog/build/small-f4-25000000e/system/f407_168_8/System.o lib/build/small-f4-25000000e/libstm32plus-small-f4-25000000e.a /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/crt0.o: Conflicting CPU architectures 13/1 /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/crt0.o collect2: error: ld returned 1 exit status scons: *** [examples/adc_analog_watchdog/build/small-f4-25000000e/adc_analog_watchdog.elf] Error 1

Resulted from scons mode=small mcu=f4 hse=25000000.

Any known issues with this and the latest GCC?

mechatrocity avatar Mar 23 '18 21:03 mechatrocity

FWIW, I was able to compile stm32plus with the GCC 7 toolchain from gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 direct from ARM.

However, if you're using the compiler that's part of the future Ubuntu Bionic and the stm32plus build is breaking somehow, we should definitely figure out why and fix it up.

mikepurvis avatar Mar 28 '18 19:03 mikepurvis