Unable to compile project using Espressif IDE using Windows

Creating a project from the Espressif IDE Templates all compile.

However a very simple just a screen and button for ESP32-S3-LCD-EV-BOARD 480x480 results in following, complianing that MinGW can’t be found - and I don’t have MinGW installed.

Configuring in: D:\workspace\SquareLine\test\SquareLine_Project\build\default

cmake -G MinGW Makefiles -DCMAKE_EXPORT_COMPILE_COMMANDS=ON D:\workspace\SquareLine\test\SquareLine_Project

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.

-- Configuring incomplete, errors occurred!

See also "D:/workspace/SquareLine/test/SquareLine_Project/build/default/CMakeFiles/CMakeOutput.log".

Building in: D:\workspace\SquareLine\test\SquareLine_Project\build\default

cmake --build . --target all

The parameter is incorrect

CMake Error: Generator: execution of make failed. Make command was: -f Makefile all &&

Build complete (0 errors, 0 warnings): D:\workspace\SquareLine\test\SquareLine_Project\build\default

It seems the CMake build which Espressif-IDE uses in the background to create some interim tools needs C-toolchain of MinGW. If you can’t set other toolchain in the CMakeLists.txt or in Espressif-IDE (or different than ‘MinGW Makefiles’ as CMake generator) as suggested by the error log, I think you should install MinGW. Maybe this can be done from within Espressif-IDE too, but a description for a good all-in-one installer:

  • On Windows MinGW, the POSIX+SEH+UCRT-build variant at their GitHub repository works fine on Windows 10:
    • Download for example: x86_64-13.2.0-release-posix-seh-ucrt-rt_v11-rev0.7z
    • Extract/copy the compressed 7z file’s included ‘mingw64’ folder to C:\ (Can be other folder but we continue with this here.)
    • You need to add the ‘C:\mingw64\bin’ folder to your PATH environment variable (Unfortunately there’s no up-to-date mingw64 installer that sets it for us.)
      (On Windows 10 right-click on This PC, go to Advanced System Settings / Environment Variables, select ‘Path’ and add “C:\mingw64\bin” to an empty line.)
    • (You can check if the setting works by typing ‘mingw32-make’ on command line.)

I got it sorted.

I had to import an “Existing IDF Project” and to be careful to select the directory that had the root CMakeLists.txt