Using an ESP32 in CLion

Hey together,
so I am new to PlatformIO and tried to create a project in CLion for my ESP32-Wrover. No matter what I try, I allways get the following error thrown by CMake:

Cannot get compiler information:
	Compiler exited with error code 1: C:\Users\Maximilian\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gcc.exe @C:\Users\Maximilian\AppData\Local\Temp\response-file16592591258862007365 C:\Users\Maximilian\AppData\Local\Temp\compiler-file7133180429628626413 | @response-file16592591258862007365=/TC -DARDUINO_uPesy_WROVER -DBOARD_HAS_PSRAM -DESP_PLATFORM "-DIDF_VER=\"4.3.2\"" -DPLATFORMIO=50205 -D_GNU_SOURCE -Og -Wall -Werror=all -Wextra -Wno-error=deprecated-declarations -Wno-error=unused-but-set-variable -Wno-error=unused-function -Wno-error=unused-variable -Wno-frame-address -Wno-old-style-declaration -Wno-sign-compare -Wno-unused-parameter -fdata-sections -ffunction-sections -fstrict-volatile-bitfields -ggdb -mlongcalls -std=gnu99 -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw /Be /Bd /EP
	xtensa-esp32-elf-gcc.exe: error: /TC: No such file or directory
	xtensa-esp32-elf-gcc.exe: error: /Be: No such file or directory
	xtensa-esp32-elf-gcc.exe: error: /Bd: No such file or directory
	xtensa-esp32-elf-gcc.exe: error: /EP: No such file or directory

Does anybody got an ideo how to fix it?

What’s your platformio.ini? Note that using framework = espidf with PlatformIO + CLion as IDE is not possible because their CMakeLists.txt conflict.

My platforplatform.ino looks like the following

[env:upesy_wrover]
platform = espressif32@1.11.2
board = upesy_wrover
framework = espidf
lib_deps = espressif/esp32-camera@^2.0.0

I use platform = espressif32@1.11.2 as I’ve read in a other discussion that it should work with this version (if I’m not mistaken it even was you replying)
Is there any work arround to use espidf in clion or do i have to change to for example VisualStudioCode?

I would heavily suggest that because platform-espresif32 1.11.2 is a really ancient version that didn’t yet have the native CMake support. It would also use an older ESP-IDF version. Try a clean copy of https://github.com/platformio/platform-espressif32/tree/develop/examples/espidf-blink in VSCode.

The CLion + ESP-IDF catch is also still documented + valid in CLion — PlatformIO latest documentation

Recently the new CLion was released with PlatformIO plugin completely rewritten.
ESP32 should be working now.

A blog post:

CLion documentation: