patrislav1 / cubemx.cmake

Script collection to build CubeMX projects with CMake and debug them with VSCode
The Unlicense
35 stars 10 forks source link

ARM GCC Toolchain not found on windows #9

Closed StoneBam closed 1 year ago

StoneBam commented 2 years ago

GNU ARM Toolchain 11.2 on Windows, bin directory in PATH, normal example template.

[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -Sc:/git/testprojekt -Bc:/git/testprojekt/build -G Ninja
[main] Configuring folder: testprojekt
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -Sc:/git/testprojekt -Bc:/git/testprojekt/build -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The ASM compiler identification is unknown
[cmake] -- Didn't find assembler
[cmake] CMake Error at cubemx.cmake/cubemx.cmake:16 (enable_language):
[cmake]   No CMAKE_ASM_COMPILER could be found.
[cmake] 
[cmake] -- Warning: Did not find file Compiler/-ASM
[cmake]   Tell CMake where to find the compiler by setting either the environment
[cmake]   variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
[cmake]   to the compiler, or to the compiler name if it is in the PATH.
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:12 (include)
[cmake] 
[cmake] 
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "C:/git/testprojekt/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "C:/git/testprojekt/build/CMakeFiles/CMakeError.log".

Toolchain located in "C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.2 2022.02\bin"

StoneBam commented 2 years ago
C:\git\testprojekt\build>arm-none-eabi-as --version             
GNU assembler (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.16)) 2.37.20220122
Copyright (C) 2021 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-none-eabi'.
StoneBam commented 2 years ago

CMakeOutput.log

The system is: Windows - 10.0.19044 - AMD64

CMakeError.log

Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
Checking whether the ASM compiler is Clang using "--version" did not match "(clang version)":
Checking whether the ASM compiler is AppleClang using "--version" did not match "(Apple LLVM version)":
Checking whether the ASM compiler is ARMClang using "--version" did not match "armclang":
Checking whether the ASM compiler is HP using "-V" did not match "HP C":
Checking whether the ASM compiler is Intel using "--version" did not match "(ICC)":
Checking whether the ASM compiler is IntelLLVM using "--version" did not match "(Intel[^
]+oneAPI)":
Checking whether the ASM compiler is SunPro using "-V" did not match "Sun C":
Checking whether the ASM compiler is XL using "-qversion" did not match "XL C":
Checking whether the ASM compiler is MSVC using "-?" did not match "Microsoft":
Checking whether the ASM compiler is TI using "-h" did not match "Texas Instruments":
Checking whether the ASM compiler is IAR using "" did not match "IAR Assembler":
Checking whether the ASM compiler is ARMCC using "" did not match "(ARM Compiler)|(ARM Assembler)|(Arm Compiler)":
Checking whether the ASM compiler is NASM using "-v" did not match "(NASM version)":
Checking whether the ASM compiler is YASM using "--version" did not match "(yasm)":
Checking whether the ASM compiler is ADSP using "-version" did not match "Analog Devices":
Checking whether the ASM compiler is QCC using "-V" did not match "gcc_nto":
patrislav1 commented 2 years ago

Any chance the compiler was also installed somewhere under C:\Program Files\? Sometimes there are issues when paths are not properly quoted throughout the whole build system. Please move the compiler to a place where the path doesn't contain whitespace, such as C:\armgcc\, and check if the error persists.

StoneBam commented 2 years ago

It does now work for me. Of course I tell you what I have done to come to this point:

un7pcs commented 2 years ago

I have some problem!

It work fine for me!

patrislav1 commented 1 year ago

Finally applied the fix, sorry for the long wait.