Issue with Cmake for the edge-impulse-standalone
I have been following the instructions for https://docs.edgeimpulse.com/docs/running-your-impulse-ecm3532 intending to eventually deploy other (non-impulse) C++ libraries on the ETA compute ecm3532 AI Sensor Board.
After running the cmake ..
command I am met with the following error:
C:\Users\andre\Documents\Masters\Engineering Project\EDGE IMPULSE\example-standalone-inferencing-ecm3532\Applications\edge-impulse-standalone\build>cmake …
– Building for: Visual Studio 16 2019
– The C compiler identification is MSVC 19.29.30038.1
– The CXX compiler identification is MSVC 19.29.30038.1
– The ASM compiler identification is GNU
– Found assembler: C:/Program Files (x86)/GNU Arm Embedded Toolchain/10 2020-q4-major/bin/arm-none-eabi-gcc.exe
– Detecting C compiler ABI info
– Detecting C compiler ABI info - failed
– Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe
– Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/andre/Documents/Masters/Engineering Project/EDGE IMPULSE/example-standalone-inferencing-ecm3532/Applications/edge-impulse-standalone/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_4dcfd.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30038.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Wall /WX- /diagnostics:column /O2 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_4dcfd.dir\Debug\\" /Fd"C:\Users\andre\Documents\Masters\Engineering Project\EDGE IMPULSE\example-standalone-inferencing-ecm3532\Applications\edge-impulse-standalone\build\CMakeFiles\CMakeTmp\Debug\libcmTC_4dcfd.pdb" /external:env:EXTERNAL_INCLUDE /external:W4 /Gd /TC /errorReport:queue -mcpu=cortex-m3 -mthumb -fno-exceptions -ffunction-sections -fdata-sections -Wno-unused-variable -nostartfiles -Wno-unused-parameter -Wno-parentheses -Wno-unused-function -ggdb -fno-common -fmessage-length=0 -std=gnu99 "C:\Users\andre\Documents\Masters\Engineering Project\EDGE IMPULSE\example-standalone-inferencing-ecm3532\Applications\edge-impulse-standalone\build\CMakeFiles\CMakeTmp\testCCompiler.c"
cl : command line error D8021: invalid numeric argument '/Wno-unused-variable' [C:\Users\andre\Documents\Masters\Engineering Project\EDGE IMPULSE\example-standalone-inferencing-ecm3532\Applications\edge-impulse-standalone\build\CMakeFiles\CMakeTmp\cmTC_4dcfd.vcxproj]
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
C:/Users/andre/Documents/Masters/Engineering Project/EDGE IMPULSE/example-standalone-inferencing-ecm3532/Platform/ECM3532/M3/CMakeLists.txt:4 (project)
CMakeLists.txt:20 (include)
Configuring incomplete, errors occurred!
See also “C:/Users/andre/Documents/Masters/Engineering Project/EDGE IMPULSE/example-standalone-inferencing-ecm3532/Applications/edge-impulse-standalone/build/CMakeFiles/CMakeOutput.log”.
See also “C:/Users/andre/Documents/Masters/Engineering Project/EDGE IMPULSE/example-standalone-inferencing-ecm3532/Applications/edge-impulse-standalone/build/CMakeFiles/CMakeError.log”.
Any help is welcome, the issue seems to be that msvc is used as the linker/compiler, I have installed gcc and g++ and set them to be used as the CC= and CXX= environment variables, but the msvc is still used.
I have included screenshots of my environment variables targeting the CC= and CXX= variables and my path variable. Any help with this issue would be very welcome