Advamtage of C++ over C wrt ESP32 FreeRtos applications

vibnwis
Posts: 89
Joined: Thu Aug 24, 2017 1:13 am

Advamtage of C++ over C wrt ESP32 FreeRtos applications

Postby vibnwis » Mon Sep 04, 2017 5:52 am

Hi All,

My intention is start to right foot for the development I am about to work on. I see many C++ adopted from C libraries. At the same time, I see many C++ libraries developed by Chips manufacturer. The results of that, I am thinking, using C++ for my ESP32 project might the right thing to do. However, I am hesitate because firstly, I am new to C++ ( but I can still code though). Secondly I do not know how extensive (complete) of C++ libraries at this point of time. Assuming all the existing C libraries are accessible, hence, is possible to adopt it to C++, is it correct? Thirdly, I see there is a trend in commercial world adopting C++ in their development instead of C. Hence, being or wanting to be part of the trend, I am motivated to use C++.

Would anyone share their preference and justification of decision, please?

Thank you
Vib

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Advamtage of C++ over C wrt ESP32 FreeRtos applications

Postby loboris » Mon Sep 04, 2017 7:04 am

Maybe this article can help you decide.

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

Re: Advamtage of C++ over C wrt ESP32 FreeRtos applications

Postby permal » Mon Sep 04, 2017 10:21 am

As long as the tools for the platform supports C++, that is my choice. Like the article @loboris linked, C++ can do anything C can (with a few syntactical differences) so imho, there is no good reason to limit yourself to C.

A word of caution: The C++ thread support in the Xtensa-port used to compile C++ for ESP32 is currently lacking, but Espressif is currently working on it according to this post.

Who is online

Users browsing this forum: No registered users and 250 guests