Skip to main content
ANauz.1
Senior
June 18, 2024
Question

STM32CubeIDE BUG with working CMake project

  • June 18, 2024
  • 1 reply
  • 1082 views

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)

How to make working CMake project work under CubeIDE?

    This topic has been closed for replies.

    1 reply

    ST Technical Moderator
    June 20, 2024

    Hello @ANauz.1 ,

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

    • AN5952 How to use CMake in STM32CubeIDE
    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks