CMake / CLion
CMake / CLion
Hi,
Are there any plans to provide a guide on how to setup an ESP32/IDF build using CMake (and thus enabling use of all the build generators it supports) just as is provided for Eclipse? So far my attempts to get xtensa-gcc to work with CMake fails at the stage where CMake tries to compile a test program to determine the capabilities of the compiler.
I've setup my CLion to build using the regular CLI/make and a CMakeLists.txt to get code completion working. While this is a good step forward, it'd be even better to actually utilize the power of CMake and eventually debug via GDB from within CLion.
Cheers.
Are there any plans to provide a guide on how to setup an ESP32/IDF build using CMake (and thus enabling use of all the build generators it supports) just as is provided for Eclipse? So far my attempts to get xtensa-gcc to work with CMake fails at the stage where CMake tries to compile a test program to determine the capabilities of the compiler.
I've setup my CLion to build using the regular CLI/make and a CMakeLists.txt to get code completion working. While this is a good step forward, it'd be even better to actually utilize the power of CMake and eventually debug via GDB from within CLion.
Cheers.
Re: CMake / CLion
We don't have plans for CMake support, but we can help with compilation issues you are seeing. Can you attach compiler output and the test program which CMake is trying to compile?
Re: CMake / CLion
I tried to get the source CMake tries to build, but it seems to delete it immediately after failing to compile.
Since I wrote the initial question I've also realized that it'll take a lot of more work to get it all up and running so I'm refocusing on learning ESP-IDF instead. After all, I have code completion working and it all compiles directly from CLion via make.
Since I wrote the initial question I've also realized that it'll take a lot of more work to get it all up and running so I'm refocusing on learning ESP-IDF instead. After all, I have code completion working and it all compiles directly from CLion via make.
-
- Posts: 14
- Joined: Sun Jan 03, 2016 12:15 am
Re: CMake / CLion
Following this thread for progress. It will be great if ESP32 works for CMake / CLion!
Currently manually add include_directories() in CMakeLists.txt for looking into code.
Currently manually add include_directories() in CMakeLists.txt for looking into code.
Re: CMake / CLion
Hi,
I've got the same wish. But going to walk through another way:
https://github.com/espressif/esp-idf/issues/921
This is still not Finished. Because the library will not be used shortly. But with the help from the AWESOME esp-idf Team, The library which use cmake to compile firstly get compiled beautifully.
Stay tune.
Su
I've got the same wish. But going to walk through another way:
https://github.com/espressif/esp-idf/issues/921
This is still not Finished. Because the library will not be used shortly. But with the help from the AWESOME esp-idf Team, The library which use cmake to compile firstly get compiled beautifully.
Stay tune.
Su
Re: CMake / CLion
Can you explain for a rookie how you achieved this? Haven't coded C for a whilepermal wrote:After all, I have code completion working and it all compiles directly from CLion via make.
Thanks in advance!
Re: CMake / CLion
I simply set up the CMakeLists.txt like any other project. Then I configured Clion to parse the output of an external tool that calls the correct make.
Since I asked the original question I’ve expanded my project to also include the ability to compile large parts on Linux, but since that is mostly only code you can still gain some info from my repo.
https://github.com/PerMalmberg/Smooth-test
Since I asked the original question I’ve expanded my project to also include the ability to compile large parts on Linux, but since that is mostly only code you can still gain some info from my repo.
https://github.com/PerMalmberg/Smooth-test
-
- Posts: 107
- Joined: Wed Jan 02, 2019 8:55 am
Re: CMake / CLion
Does anyone have a clear walk through for setting up CLion to use with an esp-idf project.
I have burnt several days trying to get configured, but I suspect it's falling down somewhere in the tool chain setup.
William
I have burnt several days trying to get configured, but I suspect it's falling down somewhere in the tool chain setup.
William
-
- Posts: 69
- Joined: Thu Nov 01, 2018 8:32 am
Re: CMake / CLion
Hi,
Configuring CLion with CMake IDF build system is very simple, that is: no configuration needed Just open an existing project, where your project CMakeLists.txt resides, possibly set your IDF_PATH and a generation path (to be in line with `idf.py` so you can conveniently run flash/monitor from IDE).
At least this is true for linux and mac, on windows might be a bit tricky, because you cannot simply configure which generator CMake uses when executed from CLion. The easiest way was to install visual studio (at least at the time I've tried), which would cause run CMake with VS's nmake generator and build correctly. Of course standard windows tools like cmake, python (+packages), mconf-idf (for native windows terminal, not MSYS) need to be installed per https://docs.espressif.com/projects/esp ... setup.html
Configuring CLion with CMake IDF build system is very simple, that is: no configuration needed Just open an existing project, where your project CMakeLists.txt resides, possibly set your IDF_PATH and a generation path (to be in line with `idf.py` so you can conveniently run flash/monitor from IDE).
At least this is true for linux and mac, on windows might be a bit tricky, because you cannot simply configure which generator CMake uses when executed from CLion. The easiest way was to install visual studio (at least at the time I've tried), which would cause run CMake with VS's nmake generator and build correctly. Of course standard windows tools like cmake, python (+packages), mconf-idf (for native windows terminal, not MSYS) need to be installed per https://docs.espressif.com/projects/esp ... setup.html
-
- Posts: 107
- Joined: Wed Jan 02, 2019 8:55 am
Re: CMake / CLion
Yes, I should have mentioned I am using Windows.
Thanks for the link.
Thanks for the link.
Who is online
Users browsing this forum: No registered users and 112 guests