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.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).
Programming in C++
Re: Programming in C++
Read the very next post from ESP_iggr ... here is what it said:
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Programming in C++
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...
Cool stuff. I have to say I'm impressed so far with this little device. Now to get sockets working...
Re: Programming in C++
Hi, I need help on converting arduno esp32 library to use in esp-idf. I want to use touch ic which uses i2c .
Re: Programming in C++
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.
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.
-
- Posts: 26
- Joined: Wed Dec 20, 2017 9:39 am
Re: Programming in C++
You are very generous if you say c++ is working so far.
Re: Programming in C++
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.RA5040 wrote: ↑Mon Sep 03, 2018 9:09 pmI 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.
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.
-
- Posts: 1
- Joined: Thu Mar 21, 2019 3:43 pm
Re: Programming in C++
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
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
Re: Programming in C++
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.grimravus@gmail.com wrote: ↑Thu Mar 21, 2019 4:18 pmpermal,
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
Re: Programming in C++
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 ?
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 55 guests