Newly generated espidf project doesn't build in CLion

@valeros

It’s been almost a year, and I can appreciate that you and your team have your priorities, and CLion/ESP-IDF compatibility may not be one of them. But I would like to make a plea for getting PlatformIO’s CMake system to work nicely with ESP-IDF’s CMake system a higher priority:

I use a wroom 32, which supports WiFi out of the gate. Many of the aspects of the WiFi are configured using sdkconfig in ESP-IDF, including buffers - which dramatically impact the speed at which WiFi operates. The defaults are set in such a conservative manner as to not use much memory, at the expense of any reasonable speed (28.8k modem download speeds).

It is my understanding that the esp32-arduino project uses pre-compiled libraries, which would require re-compiling separately from PlatformIO using my own version of sdkconfig just so that I can use my board’s built-in features. In other words, I would basically need to fork my own copy of esp32-arduino and maintain it for the remainder of my project.

Alternatively, I could either abandon CLion altogether and use an IDE that I am not comfortable with using, just to build the project, or I can use an outdated version of ESP-IDF. I have tried VSCode, and I personally find it painful to use in comparison to CLion. While I could imagine that might not be the most compelling argument to sway your decision one way or the other, it would require having to set up a whole new environment, and relearn an entire new workflow, all of which take an inordinate amount of time and effort. I challenge you to try using a different IDE for your every day work to see what I mean. I would also prefer to not have to use an older version of the framework, and miss out on possibly important bug fixes and features that are in the v4.0 branch. I think this argument speaks for itself without my further justifying it.

TL;DR, Please reconsider your team’s stance on the importance of using CLion with the espidf (v4.0) framework. We shouldn’t be forced to choose between our IDE and/or using an older version of ESP-IDF just so we can take advantage of our board’s built-in features.

Thank you. I look forward to your response.

5 Likes

Is there any update on this issue?

1 Like

Yes please, please, please fix! I do not want to switch to VSCode for ESP32 dev with esp-idf.

For anyone stuck on this in Jan 2022, the PlatformIO CLI works with the latest ESP-IDF but the CLion plugin does not. You can still use CLion as your IDE without the plugin. You just have to run your builds using pio run. When the plugin eventually works, you can switch your CLion project over to it. In the meantime, I suggest disabling it entirely.

If you want the nice “click-able” build buttons that the plugin tries to provide, you can create Shell Script configurations that simply run the pio cli. The cli command to build is pio run and the command to build and upload is pio run -t upload.

EDIT: The above solution works but results in none of the advantages typically wanted from an IDE. For example, CLion isn’t able to introspect the project at all. My new recommended solution is to completely abandon CLion. The VSCode extension is top notch and while it’s a bit of a pain to learn a new IDE, it’s worth it to get proper code inspection. Maybe I’ll switch back to CLion if the plugin ever gets fixed.

1 Like

Any update on this ?