Programming in C++

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Programming in C++

Postby kolban » Tue Mar 27, 2018 8:52 pm

Read the very next post from ESP_iggr ... here is what it said:
The fact that -lstdc++ has to be explicitly added to build flags is a bug, and is on the list to be fixed pre-1.0. (Just adding a flag is not fully sufficient, though. There's a bit more to this).
We also need to look at the date of this thread ... 2016 ... the ESP32 was just newly released and EVERYTHING was beta. I'll edit the post and flag that one shouldn't take everything that was said in olden days as still being applicable.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: Programming in C++

Postby mzimmers » Tue Mar 27, 2018 9:20 pm

Oh pshaw...the next thing you'll be telling me is that Eisenhower's out of office...

Cool stuff. I have to say I'm impressed so far with this little device. Now to get sockets working...

ramsay
Posts: 4
Joined: Wed Apr 04, 2018 7:59 am

Re: Programming in C++

Postby ramsay » Wed Apr 04, 2018 8:14 am

Hi, I need help on converting arduno esp32 library to use in esp-idf. I want to use touch ic which uses i2c .

RA5040
Posts: 26
Joined: Mon Jul 30, 2018 1:20 pm

Re: Programming in C++

Postby RA5040 » Mon Sep 03, 2018 9:09 pm

I have built and run a couple of small C++ applications following Neil Kolgan's tutorial ... seems to work fine. However, looking at this thread it's not clear to me how solid the C++/esp-idf environment is at this point. Is it solid enough for serious development, or is it still a work in progress?

I have quite a bit of code written in Arduino using the Eclipse Arduino plugin and I would like to convert over to C++ to get over some of the limitations of Eclipse Arduino (for instance JTAG debugging is very limited compared to debugging in C++ ... not sure of the reason at this stage).

I've tried to include the Arduino code as a component, but I have build errors and haven't had any luck getting help with it ... so at this point I'm thinking of biting the bullet and converting the code manually. But I'm a bit worried that I will end up doing a lot of work only to find that there are still issues with the C++ environment.

arnold.braun@gmx.de
Posts: 26
Joined: Wed Dec 20, 2017 9:39 am

Re: Programming in C++

Postby arnold.braun@gmx.de » Tue Mar 05, 2019 6:16 pm

You are very generous if you say c++ is working so far. :roll:

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

Re: Programming in C++

Postby permal » Tue Mar 05, 2019 9:53 pm

RA5040 wrote:
Mon Sep 03, 2018 9:09 pm
I have built and run a couple of small C++ applications following Neil Kolgan's tutorial ... seems to work fine. However, looking at this thread it's not clear to me how solid the C++/esp-idf environment is at this point. Is it solid enough for serious development, or is it still a work in progress?

I have quite a bit of code written in Arduino using the Eclipse Arduino plugin and I would like to convert over to C++ to get over some of the limitations of Eclipse Arduino (for instance JTAG debugging is very limited compared to debugging in C++ ... not sure of the reason at this stage).

I've tried to include the Arduino code as a component, but I have build errors and haven't had any luck getting help with it ... so at this point I'm thinking of biting the bullet and converting the code manually. But I'm a bit worried that I will end up doing a lot of work only to find that there are still issues with the C++ environment.
C++ is absolutely viable for ESP32 at this point. I use it exclusively in my project. If you want an example, have a look at my abstraction layer for IDF: https://github.com/PerMalmberg/Smooth (it is undergoing some changes atm that requires a temporary fork of IDF, FYI). Also check my G3 repo, it uses Smooth as its base.

It must be said that IDF is written in C, so it's not that you get a lot of ready to use classes just because you "switch to C++" I fact, you likely get less help than with the arduino platform, unless they can be easily brought over.

That said, the compilers for C++ that Espressif ships are very capable. There is also a new v8 of xtensa-gcc coming so that'll make it even better.

grimravus@gmail.com
Posts: 1
Joined: Thu Mar 21, 2019 3:43 pm

Re: Programming in C++

Postby grimravus@gmail.com » Thu Mar 21, 2019 4:18 pm

permal,
I really like what it looks like you're doing in Smooth -- I've been trying to use it for the past few weeks, but my learning curve was pretty steep. I've got decades worth of experience as a developer, but mostly in the Microsoft world, and my last serious effort was a decade ago. Because of that, I have not used CMake before, and I'm new to Github -- so I'm finding your use of CMake in Smooth to be dauntingly sophisticated. Also, you kind of lost me right at the end of your instructions for Smooth. I've got it set up on a Linux VM, using VSCode as my development environment. Is there any chance you could give me some guidance getting started with it?

Grimravus

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

Re: Programming in C++

Postby permal » Fri Mar 22, 2019 7:55 am

grimravus@gmail.com wrote:
Thu Mar 21, 2019 4:18 pm
permal,
I really like what it looks like you're doing in Smooth -- I've been trying to use it for the past few weeks, but my learning curve was pretty steep. I've got decades worth of experience as a developer, but mostly in the Microsoft world, and my last serious effort was a decade ago. Because of that, I have not used CMake before, and I'm new to Github -- so I'm finding your use of CMake in Smooth to be dauntingly sophisticated. Also, you kind of lost me right at the end of your instructions for Smooth. I've got it set up on a Linux VM, using VSCode as my development environment. Is there any chance you could give me some guidance getting started with it?

Grimravus
Absolutely. Just let me know what the difficulty is and I'll update the instructions. I suggest you file an issue on GitHub. FYI I've just switched back to CLion since the CMake integration there works near-perfectly.

eldadcicc
Posts: 2
Joined: Mon Dec 21, 2020 6:53 am

Re: Programming in C++

Postby eldadcicc » Mon Dec 21, 2020 11:57 am

Hi,

I have existing long code in C written by esp-idf with eclipse and the ESP32 works fine.
I got recommendation of using a BMX160 library in C++ for Arduino ESP32.
here: https://github.com/DFRobot/DFRobot_BMX160

Can you help me and advise me how to use this C++ arduino library code with my existing C esp-idf code ?

Who is online

Users browsing this forum: No registered users and 90 guests