cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE can't find cmake

Etienne_Parmentier
Associate II

Hi !

I have troubles with using cmake and STM32CubeIDE on my laptop: I am trying to compile a project, and when I use the build (hammer) button, it errors out with this:

**** CMake Configure of configuration Debug for project gamma_focal ****

C:\Program Files\CMake\bin\cmake.exe -S . -B build/Debug -GUnix Makefiles -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Cannot run program: "cmake": Ensure CMake is installed and available from the system PATH.

 

However, when I type the command in my terminal, it works nicely (I have to insert quotes to format the shell

command correctly). So Cmake is on my path. I verified it was inside both user and system level env variables. It is also inside the Path

environment variables inside Properties -> C/C++ Build -> Environment.

 

I believe this is likely a bug, the same project on my co-worker computer's compiles OK. I am using STM32CubeIDE version 1.18.0, and it also didn't work when switching to version 1.18.1. I'm on a windows 11 Professional machine, version 24H2, build 26100.4061

When using VSCode, it also worked OK, but I don't want to switch to an IDE no one in my company uses, it should work anyway.

 

3 REPLIES 3
Etienne_Parmentier
Associate II

I also tested installing CMake elsewhere, but it didn't solve my issue. I was concerned the problem was coming from spaces inside the path to the cmake executable. For reference:

 

**** CMake Configure of configuration Debug for project gamma_focal ****

C:\CMake\bin\cmake.exe -S . -B build/Debug -GUnix Makefiles -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Cannot run program: "cmake": Ensure CMake is installed and available from the system PATH.

Etienne_Parmentier
Associate II

I reset the Path environment variable inside the project properties -> C/C++ Build -> Environment, and STM32CubeIDE switched to using using C:\ST\STM32CubeCLT_1.18.0\CMake\bin\cmake.exe instead, but the error remains the exact same. (I checked there was indeed something here, and cmake is there).

Etienne_Parmentier
Associate II

I removed all STM32 software from my PC, along with cmake and make (make came from a chocolatey install), and reinstall only cubeIDE and cubeCLT, but it still doesn't work. It tries to use the cmake from STM32CubeCLT, with the exact same error:

**** CMake Configure of configuration Debug for project gamma_focal ****

C:\ST\STM32CubeCLT_1.18.0\CMake\bin\cmake.exe -S . -B build/Debug -GUnix Makefiles -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Cannot run program: "cmake": Ensure CMake is installed and available from the system PATH.