ESP IDF 4.0 + Clion
See original GitHub issueAfter upgrade to framework 3.4 (IDF 4.0) nothing works, I can’t compile for the ESP32 anymore, I can generate the ide files (pio init --ide clion) and the result doesn’t match what is described at https://docs.platformio.org/en/latest/frameworks/espidf.html#project-structure, in particular it’s missing
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Then again, where does that environment variable supposedly come from? Usually platformio provided that (it still does) and it didn’t have to be installed again separately.
Well, the result is that compiling only results in:
Reading CMake configuration...
Error: Couldn't find the main target of the project!
from the commandline and IDE, doesn’t matter. I created a new empty project for testing and that’s the same, what do I have to do to make that work? Just using pio init --ide <something>
doesn’t work anymore, maybe it shouldn’t have ever been working, I don’t know, but it used to be enough to create a new project. Now I’m stuck… guess I’m gonna switch to the actual IDF if I need to do all kinds of things before I’m able to compile. Btw. adding the IDF_PATH line above produces other isses, could be the right way to go but will be removed when re-initializing the project anyhow.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:21 (3 by maintainers)
Top GitHub Comments
Hi @MonoAnji ! Starting with version
4.0
,ESP-IDF
uses a build system based on CMake. In order to provide more seamless integration we also switched to CMake as the source of project build configuration. Unfortunately, there is a conflict betweenCMakeLists.txt
used byESP-IDF
andCMakeLists.txt
which we generate forCLion
. At the moment we’re working on better integration withCLion
without this intermediate “hacky”CMakeLists.txt
, but there is no ETA for this feature.In a nutshell, I’d recommend you to rollback to the previous version of the
espressif32
platform, e.g.:I think this should be reopened since ESP IDF 4.x is still not compatible with the CLion build…