Description
I use vscode to open and run the demo, but I get the error:
[main] Building folder: A-hello-cmake [proc] Executing command: "C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.07\bin\arm-none-eabi-gcc.exe" -v [main] Configuring folder: A-hello-cmake [proc] Executing command: "D:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug "-DCMAKE_C_COMPILER:FILEPATH=C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.07\bin\arm-none-eabi-gcc.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.07\bin\arm-none-eabi-g++.exe" -Se:/Work/Test/A-hello-cmake -Be:/Work/Test/A-hello-cmake/build -G Ninja [cmake] Not searching for unused variables given on the command line. [cmake] -- The C compiler identification is GNU 10.3.1 [cmake] -- The CXX compiler identification is GNU 10.3.1 [cmake] -- Detecting C compiler ABI info [cmake] -- Detecting C compiler ABI info - failed [cmake] -- Check for working C compiler: C:/Program Files (x86)/GNU Arm Embedded Toolchain/10 2021.07/bin/arm-none-eabi-gcc.exe [cmake] -- Check for working C compiler: C:/Program Files (x86)/GNU Arm Embedded Toolchain/10 2021.07/bin/arm-none-eabi-gcc.exe - broken [cmake] CMake Error at D:/Program Files/CMake/share/cmake-3.21/Modules/CMakeTestCCompiler.cmake:69 (message): [cmake] The C compiler [cmake] [cmake] "C:/Program Files (x86)/GNU Arm Embedded Toolchain/10 2021.07/bin/arm-none-eabi-gcc.exe" [cmake] [cmake] is not able to compile a simple test program. [cmake] [cmake] It fails with the following output: [cmake] [cmake] Change Dir: E:/Work/Test/A-hello-cmake/build/CMakeFiles/CMakeTmp [cmake] [cmake] Run Build Command(s):D:/Program Files (x86)/Python38-32/Scripts/ninja.exe cmTC_8197f && [1/2] Building C object CMakeFiles/cmTC_8197f.dir/testCCompiler.c.obj [cmake] [2/2] Linking C executable cmTC_8197f.exe [cmake] FAILED: cmTC_8197f.exe [cmake] cmd.exe /C "cd . && C:\PROGRA~2\GNUARM~1\102021~1.07\bin\AR19DD~1.EXE CMakeFiles/cmTC_8197f.dir/testCCompiler.c.obj -o cmTC_8197f.exe -Wl,--out-implib,libcmTC_8197f.dll.a -Wl,--major-image-version,0,--minor-image-version,0 && cd ." [cmake] c:/progra~2/gnuarm~1/102021~1.07/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '--major-image-version' [cmake] c:/progra~2/gnuarm~1/102021~1.07/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information [cmake] collect2.exe: error: ld returned 1 exit status [cmake] ninja: build stopped: subcommand failed. [cmake] [cmake] [cmake] [cmake] [cmake] [cmake] CMake will not be able to correctly generate this project. [cmake] Call Stack (most recent call first): [cmake] CMakeLists.txt:7 (project) [cmake] [cmake] [cmake] -- Configuring incomplete, errors occurred! [cmake] See also "E:/Work/Test/A-hello-cmake/build/CMakeFiles/CMakeOutput.log". [cmake] See also "E:/Work/Test/A-hello-cmake/build/CMakeFiles/CMakeError.log".