Page 1 of 1

关于CLion IDE在使用ESP-IDF刷新固件时的问题

Posted: Wed Sep 20, 2023 10:27 am
by TritiumX
我已经配置好了clion的IDF开发环境。并且成功构建了固件,但是我在烧录时却出现了如下错误

```
====================[ 构建 | flash | ESP32 ]======================================
"F:\Program Files\JetBrains\CLion 2021.3.4\bin\cmake\win\bin\cmake.exe" --build F:\espressif__led_strip\examples\led_strip_spi_ws2812\cmake-build-esp32 --target flash
[1/6] cmd.exe /C "cd /D F:\espressif__led_strip\examples\led_strip_spi_ws2812\cmake-build-esp32\esp-idf\esptool_py && C:\Users\Tritium\.espressif\python_env\idf5.1_py3.10_env\Scripts\python.exe F:/Espressif/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app F:/espressif__led_strip/examples/led_strip_spi_ws2812/cmake-build-esp32/partition_table/partition-table.bin F:/espressif__led_strip/examples/led_strip_spi_ws2812/cmake-build-esp32/led_strip_spi_ws2812.bin"
led_strip_spi_ws2812.bin binary size 0x327b0 bytes. Smallest app partition is 0x100000 bytes. 0xcd850 bytes (80%) free.
[2/6] Performing configure step for 'bootloader'
FAILED: bootloader-prefix/src/bootloader-stamp/bootloader-configure F:/espressif__led_strip/examples/led_strip_spi_ws2812/cmake-build-esp32/bootloader-prefix/src/bootloader-stamp/bootloader-configure
cmd.exe /C "cd /D F:\espressif__led_strip\examples\led_strip_spi_ws2812\cmake-build-esp32\bootloader && "F:\Program Files\JetBrains\CLion 2021.3.4\bin\cmake\win\bin\cmake.exe" -DSDKCONFIG=F:/espressif__led_strip/examples/led_strip_spi_ws2812/sdkconfig -DIDF_PATH=F:/Espressif/esp-idf -DIDF_TARGET=esp32 -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:/Users/Tritium/.espressif/python_env/idf5.1_py3.10_env/Scripts/python.exe -DEXTRA_COMPONENT_DIRS=F:/Espressif/esp-idf/components/bootloader -DPROJECT_SOURCE_DIR=F:/espressif__led_strip/examples/led_strip_spi_ws2812 -GNinja F:/Espressif/esp-idf/components/bootloader/subproject && "F:\Program Files\JetBrains\CLion 2021.3.4\bin\cmake\win\bin\cmake.exe" -E touch F:/espressif__led_strip/examples/led_strip_spi_ws2812/cmake-build-esp32/bootloader-prefix/src/bootloader-stamp/bootloader-configure"
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.
-- Configuring incomplete, errors occurred!
See also "F:/espressif__led_strip/examples/led_strip_spi_ws2812/cmake-build-esp32/bootloader/CMakeFiles/CMakeOutput.log".
ninja: build stopped: subcommand failed.

```

对于这项问题,我翻遍了Github的Issue和ESP32的论坛,并且在Google上搜索都找不到相关答案,除了手动刷写固件,还有没有办法能在clion内使用内置的cmake刷写?

IDF版本为5.1.1 ,Clion版本为2021.3.4