I extracted content of the .tar gcc-arm-none-eabi 2020 to my projects folder on the MacOS. I added toolchain folder to SES and I am able to build the source files, but it fails immediately on linking.
I created new project, so it just contains boilerplate files for CortexM. I dont use any external library. Seems like some option in the SES makes something weird in the linker command, but I cant figure out which ..
there are only two places in this output which contains --start-group, where first one doesnt contain --end-group
this one doesnt have --end-group.
And then the other one contains -lc parameter which I would assume is somehow interpreted as a c library ? But it cant find it on the filesystem ?
Any idea why am I getting these linker errors and how to fix that ?
I created new project, so it just contains boilerplate files for CortexM. I dont use any external library. Seems like some option in the SES makes something weird in the linker command, but I cant figure out which ..
Source Code
- 1> /tmp/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/collect2 -plugin /tmp/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/liblto_plugin.so -plugin-opt=/tmp/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//ccLgHk0K.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc --sysroot=/tmp/gcc-arm-none-eabi-9-2020-q2-update/bin/../arm-none-eabi -EL -X -o Output/Debug External/Exe/gccTest.elf /tmp/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/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/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/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7e-m+fp/hard -L/tmp/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/gcc-arm-none-eabi-9-2020-q2-update/bin/../arm-none-eabi/lib/thumb/v7e-m+fp/hard -L/tmp/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1 -L/tmp/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc -L/tmp/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib -L/tmp/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/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/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/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/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: cannot find -lc
- 1> /tmp/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: cannot find -lc
- 1> collect2: error: ld returned 1 exit status
- Build failed
there are only two places in this output which contains --start-group, where first one doesnt contain --end-group
this one doesnt have --end-group.
And then the other one contains -lc parameter which I would assume is somehow interpreted as a c library ? But it cant find it on the filesystem ?
Any idea why am I getting these linker errors and how to fix that ?