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

Linking error with ARM GNU Toolchain 12.2 release

Hi,

Facing linking error when linking with latest  ARM GNU Toolchain as below. But the linking is successful when built with 11.3.1 release of ARM GNU Toolchain.

Any ways to resolve this issue.

"L:/v12_2_Rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/arm-none-eabi-g++" -Wl,--gc-sections -Wl,-Map="stmnucleo_gettingstarted.map" @C:\Users\UserName\AppData\Local\Temp\TPCACE~1\STMNUC~1\MBED_O~1.RSP -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork -mfpu=fpv4-sp-d16 -mfloat-abi=hard --entry=Reset_Handler --specs=nano.specs --specs=nosys.specs -T"L:\sandbox\Bembed\matlab\toolbox\target\supportpackages\stmnucleo\registry\../mbed/NUCLEO_F401RE/TOOLCHAIN_GCC_ARM/STM32F401XE.ld" -o ../stmnucleo_gettingstarted.elf @stmnucleo_gettingstarted.rsp W:/share/apps/RTT/Arm_CortexM/CMSIS_5_7_0/CMSIS/DSP/Lib/GCC/libarm_cortexM4lf_math.a -lm
L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/thumb/v7e-m+fp/hard/crti.o: Invalid argument
L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/thumb/v7e-m+fp/hard/crtbegin.o: Invalid argument
L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/thumb/v7e-m+fp/hard/crt0.o: Invalid argument
L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lstdc++_nano: Invalid argument
L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lm: Invalid argument
L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lgcc: Invalid argument
L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lc_nano: Invalid argument

Regards,

Raghavendra

Parents
  • Hi Raghavendra, thanks for reaching out!

    If you were to navigate to L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/lib/gcc/arm-none-eabi/12.2.1/thumb/v7e-m+fp/hard/crti.o
    does that file exist at that location?

    If it does exist, then could you maybe attach the output of `--verbose -Wl,--verbose`? I see you are using Windows response files which are obscuring the whole linker command to ld.exe.

    My current guesses would be that either:
    a) We have some windows command line issue (e.g. folder depth being too deep or a folder path being too long).
    b) Something is clashing between the linker options added by the compiler and the options specified in the .rsp files
    It is definitely very suspicious that this worked for you with GC11.3.1, though, and neither of those guesses explains that!

    Thank you,
    Stam

Reply
  • Hi Raghavendra, thanks for reaching out!

    If you were to navigate to L:/v12_2_rel1/win/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/lib/gcc/arm-none-eabi/12.2.1/thumb/v7e-m+fp/hard/crti.o
    does that file exist at that location?

    If it does exist, then could you maybe attach the output of `--verbose -Wl,--verbose`? I see you are using Windows response files which are obscuring the whole linker command to ld.exe.

    My current guesses would be that either:
    a) We have some windows command line issue (e.g. folder depth being too deep or a folder path being too long).
    b) Something is clashing between the linker options added by the compiler and the options specified in the .rsp files
    It is definitely very suspicious that this worked for you with GC11.3.1, though, and neither of those guesses explains that!

    Thank you,
    Stam

Children