Target Board : LOLIN32-Lite
Hey guys,
I am a newb and using eclipse IDE for developing my project.
I could successfully compiled and downloaded my project into my ESP32 board.
But I could see the ESP-IDF library files that was compiled with my project files. This is uncomfortable for rapid checking the reference code. Is there a way to see the ESP-IDF library files in my project on using eclipse?
Thanks,
weyoui
Seeing ESP-IDF source codes in my eclipse project
Re: Seeing ESP-IDF source codes in my eclipse project
Howdy and welcome to the forum.
The answer to your question is "yes". Eclipse is super powerful but with power comes a LOT of complexity and features. For example, the ESP-IDF is distributed in source form. This means that the source files for ESP-IDF are available to you. Find where you downloaded the ESP-IDF and you will find a directory called components. Go into that directory and you will find a directory for each major ESP32 component and underneath there, the source of those files.
In eclipse, you can add directories to your projects ... one of the options of adding a directory is to create a "link" to an existing directory. If you take your own project and add a link to the source directory for the ESP-IDF components, then from within Eclipse, you can browse and navigate down into those directories and you are good to go.
The answer to your question is "yes". Eclipse is super powerful but with power comes a LOT of complexity and features. For example, the ESP-IDF is distributed in source form. This means that the source files for ESP-IDF are available to you. Find where you downloaded the ESP-IDF and you will find a directory called components. Go into that directory and you will find a directory for each major ESP32 component and underneath there, the source of those files.
In eclipse, you can add directories to your projects ... one of the options of adding a directory is to create a "link" to an existing directory. If you take your own project and add a link to the source directory for the ESP-IDF components, then from within Eclipse, you can browse and navigate down into those directories and you are good to go.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Seeing ESP-IDF source codes in my eclipse project
Kolan,
Thank you for your kind replying on my question.
As you commented, adding the folder as a link was the solution that I found.
I also downloaded your book and start reading this book.
Thanks,
weyoui
Thank you for your kind replying on my question.
As you commented, adding the folder as a link was the solution that I found.
I also downloaded your book and start reading this book.
Thanks,
weyoui
Re: Seeing ESP-IDF source codes in my eclipse project
Neil,
Could you elaborate on how to add the link in Eclipse? I tried this in the latest Eclipse version (2019-09) using Add Folder to the project and selecting in the advanced menu to add a link to the ESP-IDF/components folder which created a folder named components. I could bring up the source files in the editor, but there's a lot of other stuff in this folder. This resulted in a lot of undefines in my app main when I did a build. Am I missing some steps?
Thanks, Max
Could you elaborate on how to add the link in Eclipse? I tried this in the latest Eclipse version (2019-09) using Add Folder to the project and selecting in the advanced menu to add a link to the ESP-IDF/components folder which created a folder named components. I could bring up the source files in the editor, but there's a lot of other stuff in this folder. This resulted in a lot of undefines in my app main when I did a build. Am I missing some steps?
Thanks, Max
Re: Seeing ESP-IDF source codes in my eclipse project
I'm running on a Windows 10 desktop using Eclipse 2019-09.
I got a little further working on this, but it still isn't working satisfactorily. I tried adding a link in the project properties C/C++ General -> Paths and Symbols -> Source Location and adding a link to the ESP-IDF/components folder. Error indicators in the editor window with main.c were greatly reduced, but this resulted in an error like the one in the attached PDF screenshot.
I then tried extracting all the .c files in the ESP-IDF/components folder using WinZip and making a "source" folder using just those files. I added this using the add folder with a link in the Eclipse project explorer. This resulted in the same error as above (and is what I took the screenshot from). I have no idea why this caused int32_t to be unresolved. I have an include for stdint.h in app_main.c
The build all runs without error. And I rebuilt the C/C++ index after adding the source folder.
I also add that when running in debug mode using OpenOCD I can set a breakpoint and bring up the source files in the thread list. As in the original post here, I'd like to be able to browse through the source files in the C/C++ mode.
I got a little further working on this, but it still isn't working satisfactorily. I tried adding a link in the project properties C/C++ General -> Paths and Symbols -> Source Location and adding a link to the ESP-IDF/components folder. Error indicators in the editor window with main.c were greatly reduced, but this resulted in an error like the one in the attached PDF screenshot.
I then tried extracting all the .c files in the ESP-IDF/components folder using WinZip and making a "source" folder using just those files. I added this using the add folder with a link in the Eclipse project explorer. This resulted in the same error as above (and is what I took the screenshot from). I have no idea why this caused int32_t to be unresolved. I have an include for stdint.h in app_main.c
The build all runs without error. And I rebuilt the C/C++ index after adding the source folder.
I also add that when running in debug mode using OpenOCD I can set a breakpoint and bring up the source files in the thread list. As in the original post here, I'd like to be able to browse through the source files in the C/C++ mode.
- Attachments
-
- EclipseScreen.pdf
- (214.21 KiB) Downloaded 417 times
Who is online
Users browsing this forum: No registered users and 281 guests