Hi, I have installed and updated pio, espidf, and CLion. I can create a new project using the PlatformIO plugin, however, building the project fails with “Couldn’t find the main target of the project!”
When I take a look at CMakeLists.txt, it sets empty.c as app source file and I have copied the Blink example to that, as well as to main.c in the same directory. Both lead to the same error.
When I copy the espidf examples and build them using esp.py build, that works so I assume the toolchain works. Using CLion to generate an Arduino project works and can compile. But I’d like to use the espidf framework. I just cannot figure out how to get it running. I’d very much appreciate some help diagnosing the issue. Thanks!
====================[ Build | Debug | esp32doit-devkit-v1 ]=====================
"/Users/joris/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/201.6668.126/CLion.app/Contents/bin/cmake/mac/bin/cmake" --build /Users/joris/Projects/test2/cmake-build-esp32doit-devkit-v1 --target Debug -- -j 12
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: espidf)
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 1.12.0 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-espidf 3.40000.200303 (4.0.0)
- tool-cmake 3.16.4
- tool-esptoolpy 1.20600.0 (2.6.0)
- tool-ninja 1.9.0
- toolchain-esp32ulp 1.22851.190618 (2.28.51)
- toolchain-xtensa32 2.80200.200226 (8.2.0)
Reading CMake configuration...
Error: Couldn't find the main target of the project!
[FAILED] Took 0.57 seconds
make[3]: *** [CMakeFiles/Debug] Error 1
make[2]: *** [CMakeFiles/Debug.dir/all] Error 2
make[1]: *** [CMakeFiles/Debug.dir/rule] Error 2
make: *** [Debug] Error 2