question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESP IDF 4.0 + Clion

See original GitHub issue

After 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:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:21 (3 by maintainers)

github_iconTop GitHub Comments

16reactions
valeroscommented, Mar 26, 2020

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 between CMakeLists.txt used by ESP-IDF and CMakeLists.txt which we generate for CLion. At the moment we’re working on better integration with CLion 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.:

platform = espressif32@1.11.2
12reactions
g5pwcommented, Dec 19, 2020

I think this should be reopened since ESP IDF 4.x is still not compatible with the CLion build…

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESP-IDF | CLion Documentation - JetBrains
ESP -IDF is the official development framework for the ESP32 and ESP32-S Series SoCs. This article is an introductory guide for working with ......
Read more >
Help using CLion + CMake + ESP-IDF v4.0+ - ESP32 Forum
Hi, Now that the ESP-IDF is moving away from Make to Ninja (and Clion doesn't support Ninja) do any of the ESP engineers...
Read more >
Setting up esp-idf on CLion for ESP32 development on Apple ...
Esp -IDF comes with project templates. You can just copy a project and then open it in CLion. ... Get the required variables...
Read more >
IDF Component Manager - ESP32 - Espressif Systems
The IDF Component manager is a tool that downloads dependencies for any ESP-IDF CMake project. The download happens automatically during a run of...
Read more >
Newly generated espidf project doesn't build in CLion
Hi, I have installed and updated pio, espidf, and CLion. ... olimex-jtag-tiny, tumpa) PACKAGES: - framework-espidf 3.40000.200303 (4.0.0) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found