This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

float-abi hard, linker error on CortexM4

I am trying to build a bare metal CortexM4 code for LPC5410x microcontroller. While code builds and links fine using soft floating point option, as soon as I enable hard float-abi, I get linker errors about libc.a

I am using : gcc-arm-none-eabi-9-2020-q2-update

I extracted content of the tar.gz in the tmp folder and libc.a symbol link was broken, so I had to re-link that to libg.a. I am not sure if that has anything to do with the error or not ?


1> COLLECT_GCC_OPTIONS='-v' '-v' '-T' 'Setup/flash.ld' '-o' 'Output/Debug External/Exe/gccTest.elf' '-mcpu=cortex-m4' '-mfpu=fpv4-sp-d16' '-mfloat-abi=hard' '-mlittle-endian' '-mthumb' '-march=armv7e-m+fp'
1> /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/collect2 -plugin /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/liblto_plugin.so -plugin-opt=/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/lto-wrapper -plugin-opt=-fresolution=/var/folders/fq/1k29xj916kbbcn6m8jjbkkqw0000gn/T//ccDsLwcE.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc --sysroot=/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../arm-none-eabi -EL -X -o Output/Debug External/Exe/gccTest.elf /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7e-m+fp/hard/crti.o /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7e-m+fp/hard/crtbegin.o /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o -L/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7e-m+fp/hard -L/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard -L/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../arm-none-eabi/lib/thumb/v7e-m+fp/hard -L/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1 -L/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc -L/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib -L/tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../arm-none-eabi/lib --gc-sections --start-group -lgcc -lnosys Output/gccTest Debug External/Obj/SEGGER_RTT.o Output/gccTest Debug External/Obj/SEGGER_RTT_Syscalls_GCC.o Output/gccTest Debug External/Obj/main.o Output/gccTest Debug External/Obj/HardFaultHandler.o Output/gccTest Debug External/Obj/SEGGER_HardFaultHandler.o Output/gccTest Debug External/Obj/startup_ARMCM_GCC.o -Map=Output/Debug External/Exe/gccTest.map -lstdc++ -lm -lc --start-group -lgcc -lc --end-group /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7e-m+fp/hard/crtend.o /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7e-m+fp/hard/crtn.o -T Setup/flash.ld
1> /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: missing --end-group; added as last command line option
1> /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: error: Output/Debug External/Exe/gccTest.elf uses VFP register arguments, /tmp/LPC_ARM/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-abort.o) does not