2025-05-26 1:40 AM
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.
Solved! Go to Solution.
2025-06-11 12:27 AM
Hi !
Sorry to disappoint, but after one week of being blocked and doing nothing, I took the nuclear option and ask our IT guy to reset my PC, and it worked first try. I can't help figure out the root cause anymore, I will close this issue.
2025-05-26 4:37 AM
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.
2025-05-27 2:21 AM
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).
2025-05-27 3:16 AM - edited 2025-05-27 3:20 AM
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.
2025-06-11 12:06 AM
Just want to chime in here because I'm getting the exact same issue with CubeIDE 1.18.1 on MacOS 15.5.
I've tried pretty much everything the original poster has tried to no avail.
Any update on this issue would be appreciated.
Thanks!
2025-06-11 12:27 AM
Hi !
Sorry to disappoint, but after one week of being blocked and doing nothing, I took the nuclear option and ask our IT guy to reset my PC, and it worked first try. I can't help figure out the root cause anymore, I will close this issue.