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

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

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

Postby Deouss » Mon May 21, 2018 12:48 pm

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?

User avatar
PaulVdBergh
Posts: 58
Joined: Fri Feb 23, 2018 4:45 pm
Location: Brasschaat, Belgium

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

Postby PaulVdBergh » Thu May 31, 2018 1:42 pm

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.

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

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

Postby Deouss » Thu May 31, 2018 8:03 pm

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

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

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

Postby ESP_Angus » Thu May 31, 2018 11:23 pm

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.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

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

Postby ESP_Angus » Tue Jun 05, 2018 7:50 am

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.

Agree007
Posts: 103
Joined: Mon Sep 18, 2017 7:11 pm
Location: Copenhagen

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

Postby Agree007 » Tue Jun 12, 2018 10:23 pm

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

permal
Posts: 384
Joined: Sun May 14, 2017 5:36 pm

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

Postby permal » Sun Jun 17, 2018 2:54 pm

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.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

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

Postby ESP_Angus » Mon Jun 18, 2018 7:38 am

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

Agree007
Posts: 103
Joined: Mon Sep 18, 2017 7:11 pm
Location: Copenhagen

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

Postby Agree007 » Mon Jun 18, 2018 3:45 pm

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 :-)

chrismerck
Posts: 76
Joined: Tue May 29, 2018 8:00 pm

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

Postby chrismerck » Mon Jun 18, 2018 9:05 pm

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.

Who is online

Users browsing this forum: Baidu [Spider] and 53 guests