cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE BUG with working CMake project

ANauz.1
Senior II

Hello,

I have a working project based on CMake.

I tried to build it under STM32CubeIDE with no success.

Here is the output when trying to build the project:

**** CMake Configure of configuration config_default for project CMakeProject **** C:\Work\Projets\CMakeProject\Tools\cmake\bin\cmake.exe -S . -B config_default -GUnix Makefiles CMake Warning: Ignoring empty string ("") provided on the command line. -- The C compiler identification is GNU 13.2.1 -- The CXX compiler identification is GNU 13.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: C:/Work/Projets/CMakeProject/Tools/arm-gnu-toolchain/bin/arm-none-eabi-gcc.exe -- Check for working C compiler: C:/Work/Projets/CMakeProject/Tools/arm-gnu-toolchain/bin/arm-none-eabi-gcc.exe - broken CMake Error at Tools/cmake/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message): The C compiler "C:/Work/Projets/CMakeProject/Tools/arm-gnu-toolchain/bin/arm-none-eabi-gcc.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: 'C:/Work/Projets/CMakeProject/config_default/CMakeFiles/CMakeScratch/TryCompile-5yb5cv' Run Build Command(s): C:/Work/Projets/CMakeProject/Tools/cmake/bin/cmake.exe -E env VERBOSE=1 C:/Work/Projets/CMakeProject/Tools/ninja-win/ninja.exe -f Makefile cmTC_e738f/fast ninja: error: Makefile:5: expected '=', got ':' default_target: all ^ near here CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:20 (project)
View more

How to make working CMake project work under CubeIDE?

1 REPLY 1
Imen.D
ST Employee

Hello @ANauz.1 ,

Please refer to this application note describes how to use the CMake in STM32CubeIDE:

  • AN5952 How to use CMake in STM32CubeIDE
When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen