-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update eclipse-setup.rst : indexing library files #157
Conversation
Thanks for contributing this, I'm guessing these are the steps to remove the errors from missing symbols when Eclipse parses the source files. Do you have any idea why the Eclipse CDT makefile parser doesn't find these header files when it parses the Makefile output? |
The IDF_PATH has to be defined as an environnement variable inside the project and is not part of the Makefile. But even if it would, it's not the good way to include libraries. Seems that there is an option in general Eclipse preferences, in "C/C++ → New C/C++ Project Wizard → Makefile Project", inside "Discovery Options", there is an "Automate discovery of paths and symbols" checkbox. But when you check it there is a Warning telling you that this method is deprecated. And it doesn't seem to work anyway. It may be mentionned that if there is already a "components" folder inside the project, you must choose a different name for the linked folder. Maybe it's the occasion to suggest a standard virtual-name for the linked folder inside an Eclipse project, as "components" is a bit unclear. Maybe "idf-library" or "idf-components" ? |
I like this update. This is far better alternative to manually adding individual folders proposed in #17.
This is exactly what I had to do in first project I checked as it already had components folder! |
As it happens, I think we've found a fix for #17 that doesn't require manually adding any paths. Can you try the branch mentioned here: ... and please let us know if there are still any manual additions required for Eclipse to index esp-idf correctly? Thanks. |
Here are my notes following procedure described in https://github.com/espressif/esp-idf/blob/bugfix/eclipse_windows_paths/docs/eclipse-setup.rst 1. Step: Installing Eclipse IDE Same issue as reported under #166 (comment)
After changing Only a warning is shown:
No more issues observed. 2. Step: Project Properties I had no problems entering all listed configuration changes. 3. Step: Build Project Attempting to build
Changing This is really remarkable taken you have shorten respective |
I have checked couple of more projects. Finally, for the first time ever, I do not see red marks indicating issues besides the project names in the panel on left. AWESOME. If somebody is wondering, how to quickly set up a new project and enter all Project Properties, try the following:
Update: Another option, to skip step 3, is to set up and configure an empty project. |
@projectgus I tested it at home on OSX, seems to work fine but only after the first successful build. Is that normal? I also had to do the following in order to build correctly inside Eclipse on OSX:
|
Thanks to @motla who mentioned these on github: #157 (comment)
Thanks to @motla who mentioned these on github: #157 (comment)
Closing this PR as I think all of the issues mentioned in the thread are fixed in esp-idf master. If there are outsanding issues with configuring Eclipse, or getting Eclipse to find all source files, then please open new issues for them. |
I have changed the path as stated in #157 (comment). This only produces a pathing error for me. |
https://github.com/espressif/esp-idf/tree/bugfix/eclipse_windows_paths this link doesn't work anymore. Do you have the new link @projectgus ? |
@wnoliveira This change is merged in 8dede8f so any recent ESP-IDF master branch (or any stable release from v2.0 onwards) should have it. Are you seeing problems with Eclipse indexing on Windows? Often this is one of the minor fiddly parts of the setup steps mentioned here: (BTW, the new CMake-based build system is intended to make this process much less fiddly. Although we don't have Eclipse setup instructions yet.) |
@projectgus actually, I am having troubles with Linux environment too. Now, I can compile through Eclipse and no errors are displayed. However, when I go to Project Properties/ C/C++ General/ Paths and Symbols there is no includes paths. Do you know if it's normal? I will test the new CMake system too 👍 |
This is normal, because with the IDF build system the list of include paths can be different for each source file. Eclipse CDT parses the output of "make" in order to find the list of include paths for each source file in the build, and stores these in a "cache" for the project. If this cache is working correctly, after the first build all source files should have correct include path information, navigation, etc. If the cache is not working correctly, the build will succeed in Eclipse but when you open source files in the Eclipse editor they'll show errors (in the editor pane) about missing headers and missing symbols.
Awesome! |
I've made a pull-request #1990 with a solution that I find to make indexer works well. |
Alright. For those who are like me, and cannot figure out what to do; here's a quick solution
enjoy the quick and easy fix |
No description provided.