Want to know why Espressif IDF move to CMAKE

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Want to know why Espressif IDF move to CMAKE

Postby Ritesh » Sun Mar 03, 2019 8:59 am

Hi Espressif SDK Developer,

I have one generic question like is there any specific reason to move ESP32 IDF from existing make file based mechanism to CMake?

Any benefits or pros to move into CMake?

Also did you guys keep existing Make file based IDF or will absolute it at some point?
Regards,
Ritesh Prajapati

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Want to know why Espressif IDF move to CMAKE

Postby ESP_igrr » Sun Mar 03, 2019 11:24 am

Please see viewtopic.php?f=13&t=5559 for the motivation and notes about the future of CMake & Make support.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Want to know why Espressif IDF move to CMAKE

Postby Ritesh » Mon Mar 04, 2019 4:07 am

ESP_igrr wrote:
Sun Mar 03, 2019 11:24 am
Please see viewtopic.php?f=13&t=5559 for the motivation and notes about the future of CMake & Make support.
Thanks. I will check it but would you please let me know overview of requirement to move from Make file to CMake? It will be good if you provide few points regarding same.
Regards,
Ritesh Prajapati

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Want to know why Espressif IDF move to CMAKE

Postby ESP_Sprite » Mon Mar 04, 2019 7:30 am

Quoted from that post: we're trying to fix the following things by switching to Cmake:

* Windows users must use the Unix-like MSYS2 environment, which provides full functionality but is un-Windows-like and can be slow.
* Complex GNU Make build systems are difficult to integrate into IDEs. We support Eclipse, but people often have trouble getting their ESP-IDF Eclipse projects to work reliably. Third-party IDE support is also a mixed bag.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: Want to know why Espressif IDF move to CMAKE

Postby jcsbanks » Mon Mar 04, 2019 12:43 pm

When is a good time to move to CMAKE? Presently developing using esp-idf master branch and hope to release product in the summer. Could do without any more problems, so tempted not to move yet until it is official/matured/first line.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Want to know why Espressif IDF move to CMAKE

Postby Ritesh » Mon Mar 04, 2019 5:11 pm

ESP_Sprite wrote:
Mon Mar 04, 2019 7:30 am
Quoted from that post: we're trying to fix the following things by switching to Cmake:

* Windows users must use the Unix-like MSYS2 environment, which provides full functionality but is un-Windows-like and can be slow.
* Complex GNU Make build systems are difficult to integrate into IDEs. We support Eclipse, but people often have trouble getting their ESP-IDF Eclipse projects to work reliably. Third-party IDE support is also a mixed bag.
Thanks for providing useful details regarding that.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Want to know why Espressif IDF move to CMAKE

Postby Ritesh » Mon Mar 04, 2019 5:13 pm

jcsbanks wrote:
Mon Mar 04, 2019 12:43 pm
When is a good time to move to CMAKE? Presently developing using esp-idf master branch and hope to release product in the summer. Could do without any more problems, so tempted not to move yet until it is official/matured/first line.
Yes. Right now, We are also using normal IDF stable version without CMake into our products as well.

Still, Cmake based support is on going and they will declare once it will be fully or stable version included.
Regards,
Ritesh Prajapati

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

Re: Want to know why Espressif IDF move to CMAKE

Postby ESP_Angus » Tue Mar 05, 2019 5:10 am

jcsbanks wrote:
Mon Mar 04, 2019 12:43 pm
When is a good time to move to CMAKE? Presently developing using esp-idf master branch and hope to release product in the summer. Could do without any more problems, so tempted not to move yet until it is official/matured/first line.
We're going to make CMake the default build system in IDF V4.0, meaning that it will be the one mentioned first in Getting Started and other docs. V4.0 development is due to begin in the next week or so on the master branch. The GNU Make build system will still be supported in IDF V4.x, as the legacy build system.

Note that if you want to avoid surprises due to new developments, tracking the master branch is not advised - a release branch or a stable release may be preferable. This page in the docs explains the choices and the relevant tradeoffs involved: https://docs.espressif.com/projects/esp ... sions.html

(We just made a v3.3-beta2 prerelease and a release/v3.3 branch, so if you're relying on features currently only in master then switching to this release branch and waiting for the v3.3 stable release - predicted in April - may be your best option.)

If you're happy with the GNU Make build system then there's no compelling reason to switch at this point. If you were starting a new project, maybe consider starting with CMake. That said: if your project doesn't use many GNU make features directly, you should be able to convert it automatically.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: Want to know why Espressif IDF move to CMAKE

Postby jcsbanks » Tue Mar 05, 2019 8:50 am

Thanks, that is very helpful.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Want to know why Espressif IDF move to CMAKE

Postby Ritesh » Tue Mar 05, 2019 10:34 am

ESP_Angus wrote:
Tue Mar 05, 2019 5:10 am
jcsbanks wrote:
Mon Mar 04, 2019 12:43 pm
When is a good time to move to CMAKE? Presently developing using esp-idf master branch and hope to release product in the summer. Could do without any more problems, so tempted not to move yet until it is official/matured/first line.
We're going to make CMake the default build system in IDF V4.0, meaning that it will be the one mentioned first in Getting Started and other docs. V4.0 development is due to begin in the next week or so on the master branch. The GNU Make build system will still be supported in IDF V4.x, as the legacy build system.

Note that if you want to avoid surprises due to new developments, tracking the master branch is not advised - a release branch or a stable release may be preferable. This page in the docs explains the choices and the relevant tradeoffs involved: https://docs.espressif.com/projects/esp ... sions.html

(We just made a v3.3-beta2 prerelease and a release/v3.3 branch, so if you're relying on features currently only in master then switching to this release branch and waiting for the v3.3 stable release - predicted in April - may be your best option.)

If you're happy with the GNU Make build system then there's no compelling reason to switch at this point. If you were starting a new project, maybe consider starting with CMake. That said: if your project doesn't use many GNU make features directly, you should be able to convert it automatically.
Thanks for providing details for that.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Majestic-12 [Bot] and 156 guests