Page 3 of 7

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Mon May 21, 2018 12:48 pm
by Deouss
ESP_Angus wrote: Without seeing more details of error output, etc then it's hard to tell what this means. However, one thing to note is that the convert_to_cmake.py tools assumes that you have the "old" build system (it uses "make" from the old build system to parse the project). So this might be the reason for any total failures you're seeing.
Yes I believe that's the case.

ESP_Angus wrote:
Deouss wrote: Also - do you consider writing extensions for VSC - it is all very simple in javascripts.
We have considered this, and should hopefully be announcing something soon...
How soon you think that VSC extension will be announced?

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Thu May 31, 2018 1:42 pm
by PaulVdBergh
Hi,

Is there any progress re the use of the cmake features in an (Windows) IDE? Or is this put on hold/abandoned ?

Thanks for info.

Paul.

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Thu May 31, 2018 8:03 pm
by Deouss
Anyone who's converting Make to CMake projects - few tips that help:

Link: https://docs.espressif.com/projects/esp ... ure-cmake/

In components folders CMakeLists.txt
set(COMPONENT_ADD_INCLUDEDIRS .)

set(COMPONENT_SRCDIRS .)

set(COMPONENT_PRIV_REQUIRES lwip)

register_component()
add or replace 1st line set(COMPONENT_ADD_INCLUDEDIRS include)

There is no particular approach for conversion - just manipulate directory paths
use add_subdirectories() abd include_directories() syntax and all works great

For build use fast command like idf.py flash -p COM3 monitor
For config use powershell idf.py menuconfig

cheers

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Thu May 31, 2018 11:23 pm
by ESP_Angus
PaulVdBergh wrote: Is there any progress re the use of the cmake features in an (Windows) IDE? Or is this put on hold/abandoned ?
Still in progress, but nothing released yet I'm afraid.

Informally, I've heard of people having success using the CMake support for editing & building projects in QT Creator, Visual Studio 2017 & CLion. I know people are also working with Visual Studio Code & Eclipse.

Official IDE support is definitely still planned and on the way.

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Tue Jun 05, 2018 7:50 am
by ESP_Angus
The "feature/cmake" branch has just been updated on Github. Includes a number of CMake fixes, finished idf_monitor support (can set a custom monitor baud rate and rebuild/flash from inside monitor), and updates to the latest commits from the IDF master branch.

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Tue Jun 12, 2018 10:23 pm
by Agree007
I use this with Clion and it works great, but I would like also to be able to use Arduino as a component, but there is no Branche for this of any guide I can find.
So my questions is if this is possible and if yes, how to install it ?

Thx in advance for your support

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Sun Jun 17, 2018 2:54 pm
by permal
Haven't read these forums in a while, but now that I'm starting my next project this was a really nice find. I've been maintaining a CMake project in parallel to the regular makefiles for use in CLion (to compile my apps for both Linux and ESP32 for easier debugging). Having a single build system will make it so much easier. I'm super excited to try this out.

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Mon Jun 18, 2018 7:38 am
by ESP_Angus
Agree007 wrote:I use this with Clion and it works great, but I would like also to be able to use Arduino as a component, but there is no Branche for this of any guide I can find.
So my questions is if this is possible and if yes, how to install it ?
I've just written a component CMakeLists.txt file for arduino-esp32 and submitted it here:
https://github.com/espressif/arduino-esp32/pull/1508

Feel free to take it for a spin. :)

Angus

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Mon Jun 18, 2018 3:45 pm
by Agree007
ESP_Angus wrote:
Agree007 wrote:I use this with Clion and it works great, but I would like also to be able to use Arduino as a component, but there is no Branche for this of any guide I can find.
So my questions is if this is possible and if yes, how to install it ?
I've just written a component CMakeLists.txt file for arduino-esp32 and submitted it here:
https://github.com/espressif/arduino-esp32/pull/1508

Feel free to take it for a spin. :)

Angus
Great thx, I will give it a spin or two :-)

Re: Preview release: CMake-based build system for ESP-IDF

Posted: Mon Jun 18, 2018 9:05 pm
by chrismerck
Glad you are making something great even better! (The ESP-IDF build system is impressive... kudos to whomever came up with it. I learned a few tricks reading project.mk).

We have a parallel GNU make build system for our cross-platform firmware that needs to interoperate with the ESP-IDF build system. We'd be willing to move to cmake, but I'd have to wait until the cmake implementation is solid.

So, hopefully there will be a period of time where we can still use the latest ESP-IDF updates without forcing us to move to cmake. And, hopefully you will have all of the bugs worked out of the cmake system before dropping support for the pure GNU make system. That way we never have a period where we cannot easily pull in updates via git fetch.