Page 1 of 1

Eclipse and ESP32

Posted: Thu Aug 24, 2017 1:42 am
by vibnwis
Hi there,
I managed to configure Eclipse to build and flash using the examples. Nevertheless, I had also tried using the methods shown by Kolban using the template from esp32 and then configured Eclipse the C/C++ environment, etc.

Here are my experiment and its questions.

1. With the ESP application template. I created an myApp and then make menuconfig. I proceed to use Eclipse to import existing code myApp. With that, I managed to build without the steps shown by Kolban. To be honest, I had configured the Eclipse to build ESP32 examples.I followed the steps from https://esp-idf.readthedocs.io/en/lates ... setup.html . The questions I have:
i) The steps of https://esp-idf.readthedocs.io/en/lates ... setup.html do not configure path of header files and it works. On contrary, Kolban's method would need to configure the path of header files.
ii) Since ESP32 app template is being used, I think the ESP32's method is much cleaner. If I am not, would someone enlighten me please?

2. My intention is to create a new empty project. However, I have some questions I am not able to answer myself.
a. Is EsP32 methods creating from the template, the only way?
b. if not, would you share how to get it done please?

Thank you
vibnwis

Re: Eclipse and ESP32

Posted: Fri Aug 25, 2017 12:52 pm
by vibnwis
My further investigation is.

One needs to use the ESP template to create new project. In addition, in Eclipse one needs to add the paths of the header files. Without it, Eclipse will indicates unresolved variables although it compiles without errors.

However, I could not resolve this problems, despite it has been mentioned in Kolban's video. Yet I could not get it work.
Having added the header files, under the symbols and paths of general C/C++. I exported each items, and click export settings. It created a xml file. However, when I import it into a another project, it shows empty header file paths.

Anyone has tried this successfully? please advise.

Re: Eclipse and ESP32

Posted: Fri Aug 25, 2017 3:00 pm
by kolban
However, I could not resolve this problems, despite it has been mentioned in Kolban's video. Yet I could not get it work.
Having added the header files, under the symbols and paths of general C/C++. I exported each items, and click export settings. It created a xml file. However, when I import it into a another project, it shows empty header file paths.
Can you elaborate on this section. Maybe pastebins of XML files or links to screen shots?

Re: Eclipse and ESP32

Posted: Sat Aug 26, 2017 12:02 am
by vibnwis
Very pleased to hear from you, sir.

Please find the screen shots attached.

1. ScreenShot-1. It shows the each path has been exported (exp at the end of each item, I was not sure if it is necessary, but I had to try). At the lower part of the screen-shot, a button of export Settings, I clicked to the settings to a file.

2. The export file. It shows the paths are there.

Many thanks

Re: Eclipse and ESP32

Posted: Sat Aug 26, 2017 1:25 am
by vibnwis
Hi Kolban, Regarding step of not using the "use default make command", I have experimented with and without this option, they all work. Hence, I am puzzled what is it for (of both cases)?

In video, ESP32 Technical Tutorials: Building a C++ Application, you changed gcc the "CDT GCC built-in Compiler Settings" to xtensa.....gcc. However, in the video configuring Eclipse for ESP32, it was CDT Cross GCC Builit-in Compiler Settings". It looks like, there are more than one way?

Best regards,

Re: Eclipse and ESP32

Posted: Sat Aug 26, 2017 4:35 pm
by kolban
Howdy,
So much of our hobby is a learning exercise and a process of recording what we learn in a form that is as easy as possible for others to understand. While many of us (including me) love watching technical videos, they aren't easy to "change" as new learnings come along. We can either patch them or re-record them. When I had a go at making some notes on Eclipse when I first got an ESP32 I made the video showing what I learned. Many months later, I was working on C++ programming, and it needed some new recipe steps that weren't apparently necessary for just C programming.

Please don't use my video efforts as definitively correct now and into the future.

What I'll try and do is keep the book of notes as accurate and correct as possible. If there is a mistake or new knowledge, I'll try and fix.

Re: Eclipse and ESP32

Posted: Sun Aug 27, 2017 10:46 am
by vibnwis
No worries, I am holding responsible for it. Just out of curiousity.

Back to exporting include paths in Eclipse, I saw in the other video you managed to import an exported settings. Would you try to import my file please ? if it works or I can try import you file, if you can share a file please?

Thank you
Lim

Re: Eclipse and ESP32

Posted: Mon Aug 28, 2017 11:15 pm
by vibnwis
Finally after hours of investigation, i found the resolution. The point here is workspace. Within the workspace, the "import settings" does not work. To share "path and symbols" simply hit the export button (not the "export settings" button) and open the project ( in the same workspace) and General C/C++ -> Path and Symbols -> Reference (tap) and choose the project which sharing out the item.

The import settings is meant for projects of different workspace.