Hello I was trying to add a new ESP device to my family of devices via usb from the computer and I get a CMake error, tried with the working devices too, same error.
Clean did not help
INFO ESPHome 2026.1.1
INFO Reading configuration /config/esphome/dhgfhg.yaml...
INFO Generating C++ source...
INFO Setting CONFIG_LWIP_MAX_SOCKETS to 11 (registered: api=4, captive_portal=4, mdns=2, ota=1)
INFO Compiling app... Build path: /data/build/asdasdas
Processing asdasdas (board: esp32dev; framework: arduino, espidf; platform: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.35/platform-espressif32.zip)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- contrib-piohome @ 3.4.4
- framework-arduinoespressif32 @ 3.3.5
- framework-arduinoespressif32-libs @ 5.5.0+sha.9bb7aa84fe
- framework-espidf @ 3.50502.0 (5.5.2)
- tool-cmake @ 4.0.3
- tool-esp-rom-elfs @ 2024.10.11
- tool-esptoolpy @ 5.1.0
- tool-mklittlefs @ 3.2.0
- tool-ninja @ 1.13.1
- tool-scons @ 4.40801.0 (4.8.1)
- toolchain-xtensa-esp-elf @ 14.2.0+20251107
Reading CMake configuration...
-- git rev-parse returned 'fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).'
-- Minimal build - OFF
-- Configuring incomplete, errors occurred!
CMake Error at /data/cache/platformio/packages/framework-espidf/tools/cmake/idf.cmake:40 (include):
include could not find requested file:
CheckCXXCompilerFlag
Call Stack (most recent call first):
/data/cache/platformio/packages/framework-espidf/tools/cmake/project.cmake:29 (include)
CMakeLists.txt:2 (include)
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
========================== [FAILED] Took 3.51 seconds ==========================
Probably you’re running into a toolchain issue caused by the custom PlatformIO platform you’re using.
ESPHome 2026.1.1 doesn’t support that pioarduino toolchain, so CMake can’t find the ESP‑IDF files it needs and Ninja isn’t available either. To give you the definitive fix I’d need to see your full YAML. Right now I can only diagnose the toolchain issue from the logs, but the actual root cause is almost certainly inside the configuration file — especially the platform and framework sections. If you send me the complete YAML, I can pinpoint the exact conflict and tell you the cleanest way to fix it.