Cmake error solution encountered in STM32 development with clion

Recently, if you want to use clion to replace keil for STM32 development, you need to install the following software and add the last two to the system path:

STM32CubeMX

Clion

MinGW

arm-none-eabi-gcc  

After configuring toolchain and cmake, it is found that the simplest project cannot cmake and displays

CMake Error: CMake was unable to find a build program corresponding to “MinGW Makefiles”.   CMAKE_ MAKE_ PROGRAM is not set.   You probably need to select a different build tool.

After debugging for a long time, the final solution: do not use mingw64, download the installation tool of mingw32 on the official website: mingw-get-setup.exe, and configure it again. It may be that 64 bit MinGW is incompatible.

Read More: