Porting from Arduino

mjmorrison
Posts: 26
Joined: Thu Nov 03, 2016 9:06 pm

Porting from Arduino

Postby mjmorrison » Thu Nov 03, 2016 9:26 pm

Hi All,

I have some code written for the arduino IDE, and I'm looking to port it to the 32 for testing purposes. Its all written in "C++" or at least the arduino version.

I'm struggling with the distinction between freeRTOS and esp-idf.

It looks like freeRTOS supports C++, but that esp-idf does not. Is that the case?

Does esp-idf implement freeRTOS? Or are they separate entities?

This might be subject to opinion, but if I want to get my code ported over as quickly as possible, should I be moving toward freeRTOS or esp-idf? I'd really like to stay in C++ land (vs C land) because much of my code is object oriented.

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

Re: Porting from Arduino

Postby ESP_igrr » Fri Nov 04, 2016 1:04 am

ESP-IDF is a framework which includes a bunch of libraries (components as we call them). FreeRTOS is one of them. Pretty much any ESP-IDF applications is going to use FreeRTOS.
You can write C++ applications in ESP-IDF, although at this point you may need to add "-lstdc++" flag to the list of linker flags, if you want to use some of the libstdc++ functionality, such as strings, vectors, and lists. See docs/build-system.rst on how to do it.

mjmorrison
Posts: 26
Joined: Thu Nov 03, 2016 9:06 pm

Re: Porting from Arduino

Postby mjmorrison » Fri Nov 04, 2016 10:45 pm

Ok thank you for the quick reply! And all your work on the various SDKs throughout this process.

Now to learn freeRTOS...

Who is online

Users browsing this forum: Google [Bot] and 135 guests