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

GNU Arm Embedded Toolchain Visual Studio Code

Hi everyone,

    I am exporting a code from linux to windows 10 to program a microcontroller LPC1768. I am using visual studio code and when it compile I get the output show below. Also, in the image attached are the environment variables. I hope you could give me a hint for this.

Best Regards

[build] [ 99%] Building CXX object CMakeFiles/program_test.dir/app/ereshop.cpp.obj
[build] [100%] Linking CXX executable program_test.exe
[build] c:/program files (x86)/gnu arm embedded toolchain/10 2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '--major-image-version'
[build] c:/program files (x86)/gnu arm embedded toolchain/10 2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information
[build] collect2.exe: error: ld returned 1 exit status
[build] CMakeFiles\program_test.dir\build.make:745: recipe for target 'program_test.exe' failed
[build] mingw32-make.exe[2]: *** [program_test.exe] Error 1
[build] CMakeFiles\Makefile2:122: recipe for target 'CMakeFiles/program_test.dir/all' failed
[build] mingw32-make.exe[1]: *** [CMakeFiles/program_test.dir/all] Error 2
[build] Makefile:101: recipe for target 'all' failed
[build] mingw32-make.exe: *** [all] Error 2
[build] Build finished with exit code 2
Parents
  • It seems the problem is in file Link.txt

    "C:\Program Files\CMake\bin\cmake.exe" -E rm -f CMakeFiles\program_test.dir/objects.a
    C:\MinGW\bin\ar.exe cr CMakeFiles\program_test.dir/objects.a @CMakeFiles\program_test.dir\objects1.rsp


    arm-none-eabi-g++ -std=gnu++98 -fno-rtti -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -Os -mcpu=cortex-m3 -mthumb -g -Wl,--gc-sections -Wl,--wrap,main -Wl,--wrap,exit -Wl,--wrap,atexit -mcpu=cortex-m3 -mthumb "-TC:/Users/contr/Documents.../mbed-dev/targets/TARGET_NXP/TARGET_LPC176X/device/TOOLCHAIN_GCC_ARM/LPC1768.ld" -static -Wl,--whole-archive CMakeFiles\program_test.dir/objects.a -Wl,--no-whole-archive -o program_test.exe -Wl,--out-implib,libsauron-v1.0c.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\program_test.dir\linklibs.rsp

    if i quit these flag the output don recognize --minor-image-version Flag. I don't know where could be the problem.

Reply
  • It seems the problem is in file Link.txt

    "C:\Program Files\CMake\bin\cmake.exe" -E rm -f CMakeFiles\program_test.dir/objects.a
    C:\MinGW\bin\ar.exe cr CMakeFiles\program_test.dir/objects.a @CMakeFiles\program_test.dir\objects1.rsp


    arm-none-eabi-g++ -std=gnu++98 -fno-rtti -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -Os -mcpu=cortex-m3 -mthumb -g -Wl,--gc-sections -Wl,--wrap,main -Wl,--wrap,exit -Wl,--wrap,atexit -mcpu=cortex-m3 -mthumb "-TC:/Users/contr/Documents.../mbed-dev/targets/TARGET_NXP/TARGET_LPC176X/device/TOOLCHAIN_GCC_ARM/LPC1768.ld" -static -Wl,--whole-archive CMakeFiles\program_test.dir/objects.a -Wl,--no-whole-archive -o program_test.exe -Wl,--out-implib,libsauron-v1.0c.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\program_test.dir\linklibs.rsp

    if i quit these flag the output don recognize --minor-image-version Flag. I don't know where could be the problem.

Children
No data