Skip to content
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

still unresolved includes using latest idf-eclipse-plugin (IEP-99) #43

Closed
HarryHpd opened this issue Dec 27, 2019 · 39 comments
Closed

still unresolved includes using latest idf-eclipse-plugin (IEP-99) #43

HarryHpd opened this issue Dec 27, 2019 · 39 comments
Labels
bug Something isn't working Windows

Comments

@HarryHpd
Copy link

after building and flashing successfully the blink template I see still unresolved inclusions in my source file.
eclipse project has been created via https://github.com/espressif/idf-eclipse-plugin#create-a-new-project-using-esp-idf-templates

I use "latest" espressif plugin (see attached file)

grafik

I expect inclusions to be resolved after building for target

Environment Information:
eclipse info.log

ESP-IDF Tools Information:
Executing C:\Users\hpd\AppData\Local\Programs\Python\Python37\python.exe C:\Users\hpd\Documents\HPDPool\Privat\HpdDev2020\ESP32\ESPV4\tools\idf_tools.py list

  • xtensa-esp32-elf: Toolchain for Xtensa (ESP32) based on GCC
    • esp-2019r2-8.2.0 (recommended, installed)
  • esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
    • 2.28.51.20170517 (recommended, installed)
  • cmake: CMake build system
    • 3.13.4 (recommended, installed)
  • openocd-esp32: OpenOCD for ESP32
    • v0.10.0-esp32-20190313 (recommended, installed)
  • mconf: menuconfig tool
    • v4.6.0.0-idf-20190628 (recommended, installed)
  • ninja: Ninja build system
    • 1.9.0 (recommended, installed)
  • idf-exe: IDF wrapper tool for Windows
    • 1.0.1 (recommended, installed)
  • ccache: Ccache (compiler cache)
    • 3.7 (recommended, installed)
@HarryHpd
Copy link
Author

OK! I found a work around.
I tried again with eclipse 2019-09 and IDF-Eclipse Plugin Beta 3. Now includes are recognized as expected. I leave it for the team to figure out which one of both are causing the issue.

@Herschdorfer
Copy link

Herschdorfer commented Dec 28, 2019

I tried that and can confirm that 19-09 and beta 3 let the warnings disappear.

@krzychb
Copy link

krzychb commented Dec 30, 2019

This pesky issue finds it's way back over and over again, and that is really annoying.

To verify it I have just made fresh installation of the plugin Beta 4 with Eclipse 2019-12 on Windows 10 and Linux Ubuntu 18.04. The issue shows up for me on Windows only. I made the requisite Configuring Launch target.

I believe that #29 and #31 are reported for Windows as well.

Do other of you see the same? Or maybe some of you do not see it on Windows at all (for the latest Beta 4 with Eclipse 2019-12)? Hopefully we can narrow down the scope of troubleshooting.

@espressif-bot espressif-bot changed the title still unresolved includes using latest idf-eclipse-plugin still unresolved includes using latest idf-eclipse-plugin (IEP-99) Jan 6, 2020
@su-Koch
Copy link

su-Koch commented Jan 15, 2020

Can confirm this for windows and 2019-12 and current idf plugin. Is there a way to test it with beta 3? I don't know how to get it. Are there any suggested solutions?

@infoschwab
Copy link

I can conference this for Windows and Eclipse 2019-19 with esp-idf 4. No Problem on Ubuntu in Virtual Box with Same install Procedere. I already made a reinstall.
I copied the folder ...\esp-idf\components into the Projektfolder in the Workspace and the probleme is gone. This is not the solution, but it shows that the problem is, that the Indexes dies not find the path to this path. I realy new to Eclipse but i canˋt find a way to tell the indexer the Library path.
How can i do this?

@kolipakakondal kolipakakondal added the bug Something isn't working label Jan 24, 2020
@kolipakakondal
Copy link
Collaborator

Anyone up for the short call(15mins)? We can use the https://zoom.us/ for screen sharing. Let me know the timezone if anyone is interested to join the call.

@infoschwab
Copy link

Yes, i like to Support you, but My Englisch is Not Good. My timezone is gmt+1 Germany Near Stuttgart.

@su-Koch
Copy link

su-Koch commented Jan 24, 2020

@infoschwab this is so funny because I'm located near stuttgart too. I got it working with vscode. Here I'm pretty shure we're on the right track. It has to do with the indexer not finding the right path. So I expect exactly the same problem you do.

@infoschwab
Copy link

Yes, i do think, there must be a way to tell the indexer the path for the Librarys. I found a lot of tutorials to set the path, but in My Eclipse i dont find the menueentry. There Must be a way to do this but i am Not firm with Eclipse. Perhaps i change to vscode.

@su-Koch
Copy link

su-Koch commented Jan 24, 2020

I am doing basic tests with both eclipse and vscode at the moment. Both of them doesn't work properly in my opinion. There are still a lot of issues.

I think we cannot see these menus in eclipse because the example projects are cmake projects but I'm not 100% shure about that fact.

@HarryHpd
Copy link
Author

HarryHpd commented Jan 24, 2020 via email

@kolipakakondal
Copy link
Collaborator

kolipakakondal commented Jan 27, 2020

That's cool that you guys are from Germany :-) I was in Stuttgart in Oct for EclipseCon2019 and we presented this esp-idf eclipse plugin. Check this https://youtu.be/DqnZy4d03_s . It might be interesting to see an end-to-end flow

For guys, who could help me in understanding the issue, please use my skype name: kondal.kolipaka@gmail.com. I'll be available from CET 10AM to 12PM

@krzychb
Copy link

krzychb commented Jan 27, 2020

@kolipakakondal indeed https://youtu.be/DqnZy4d03_s from EclipseCon2019 attracted me to check the plugin!

Regarding the issue with unresolved includes on Windows, what diagnostic information or configuration details do you need? I would prepare it upfront.

@kolipakakondal
Copy link
Collaborator

kolipakakondal commented Jan 27, 2020

@krzychb Probably a couple of things:

Check these:

  • CDT Build Console - are you seeing any error during the build?
  • Project > C/C++ Index > Rebuild - Does it help?
  • Have you selected the esp launch target before the build?
  • Preferences > C/C++ > Indexer - Check "Index source and header files opened in the editor"

@krzychb
Copy link

krzychb commented Jan 27, 2020

@kolipakakondal please see below requested diagnostic information:

Logs

Checked

  • CDT Build Console - no build errors
  • Index Rebuild - Indexed 'blink' (9 sources, 35 headers) in 0.42 sec: 168 declarations; 2,354 references; 3 unresolved inclusions; 10 syntax errors; 33 unresolved names (1.3%)
  • ESP launch target selected
    image
  • Checked. Project cleaned and rebuild. Still see unresolved inclusions:
    image

@krzychb
Copy link

krzychb commented Jan 27, 2020

@kolipakakondal attached is another copy of compile_commands.json file discussed during our call.

compile_command_json.txt

@kolipakakondal
Copy link
Collaborator

Thanks @krzychb for providing the detailed info and joining the call. It seems to be headers indexing is not happening in Windows OS and I'm able to reproduce the issue. I'll update here once the fix is ready!

@HarryHpd
Copy link
Author

HarryHpd commented Jan 29, 2020 via email

@Arag0to
Copy link

Arag0to commented Feb 2, 2020

@kolipakakondal

You migth want to get rid of the "Windows" label since I have the same problem on Ubuntu 18.04 but only a bit more complicated.

On the main page, "main.c", no problem but when I create a new file or import a class. Then I get the unresolvel inclusion issues even if the compiler report 0 errors. There is also that problem with one of my cpp lib that I don't understand.

Here is a link to a screenshot of my Eclipse showing the problem.
https://servimg.com/view/20121761/8

My Unbuntu is install on a VMWare virtual machine so if you want I can send it to you. It takes around 15-20 go.

If you want me to create a new issue, tell me. I will do my best. 2 weeks ago I new nothing about all this.

@krzychb
Copy link

krzychb commented Feb 2, 2020

@Arag0to from the screenshot (of your Eclipse showing the problem) it looks like the launch target is not selected. Could you try selecting the target, cleaning and rebuilding the project?

@Arag0to
Copy link

Arag0to commented Feb 2, 2020

Thank you @krzychb, happy to know it wasn't a big problem. But i still got the cpp library not recognize in the main.c. I would like to know why. Tryed to include with the same problem, If you know the answer please tell me but I don't think this problem belongs to this issue.
Eclipse_lib_bug_#2

I would also like to understand why the target matter ? From what I understand, the target specifies on which port flashing the Esp32 but it worked and I have 0 port connected on my machine right now.

@JAICHANGPARK
Copy link

Hi there
I have some same problem about this issue in windows OS

image

any updates?

@kolipakakondal
Copy link
Collaborator

Could you guys check this build and provide the feedback. This should fix an issue related to "unresolved inclusion" errors in Windows OS

Here is the zip file to download
https://github.com/kolipakakondal/idf-eclipse-plugin-dev/blob/master/com.espressif.idf.update-1.0.0.202002101000.zip

Installation instructions:
https://github.com/espressif/idf-eclipse-plugin#installing-idf-plugins-from-local-archive

@krzychb
Copy link

krzychb commented Feb 11, 2020

@kolipakakondal the new build works great!

image

Thank you for resolving this issue 👍

@su-Koch
Copy link

su-Koch commented Feb 11, 2020

I can also confirm that the issue seams to be solved. Thanks a lot. Is there a function to flash without building ?

@kolipakakondal
Copy link
Collaborator

Hi All, IDF Eclipse Plugin v1.0.0-beta5 (Build: 1.0.0.202002120536) is published to the update site. Please get the latest https://dl.espressif.com/dl/idf-eclipse-plugin/updates/latest/

@HarryHpd
Copy link
Author

HarryHpd commented Feb 12, 2020 via email

@HarryHpd
Copy link
Author

HarryHpd commented Feb 13, 2020 via email

@niruhegde
Copy link

@kolipakakondal

I have just installed plugin. Still I am getting same issue.
Eclipse 2019-12
error.log

And when I clean the project I will get the below error :
ninja clean
ninja: error: loading 'build.ninja': No such file or directory
Build complete

I have also tried to download and updating archive. But as I have already installed latest plugin, archive is not installed.

Thanks
-Niru

@su-Koch
Copy link

su-Koch commented Feb 21, 2020

hei niruhegde,
did you download esp-idf via git clone or via zip? I had a similar error when downloading zip and dependencies got lost. I was able to solve it executing git clone in windows cmd line.

@niruhegde
Copy link

niruhegde commented Feb 21, 2020

Hi su-Koch,

I have cloned repo. My esp-idf version is ESP-IDF v4.2-dev-414-g132cc67c0-dirty.
I am using Ubuntu 19.10.

Do I need t update tool chain again?
All the environmental variables are set.
image

Thanks
-Niru

@eliaxyz
Copy link

eliaxyz commented Feb 21, 2020

The problem still remains in Mac OS.

After copying example project "blink", firstly no errors are shown and the build also works without errors.

But after restarting eclipse, the editor shows the errors as in the screenshot of JAICHANGPARK commented 16 days ago.

And while trying to build the project, there happens also a Java-Error:

Errors occurred during the build.
Errors running builder 'CDT Core Builder' on project 'test7'.
java.lang.NullPointerException

@mvgorban
Copy link

mvgorban commented Feb 26, 2020

Hi! The same issue. Windows10/Version: 2019-12 (4.14.0)/Build id: 20191212-1212/ Espressif IDF Plugins for Eclipse 1.0.0.202002201116.
But

  1. The unresolved inclusions are presented only till make build. After successfull build in Run launch Mode all is OK, they dissappers. For both situation building and flashing are OK, board is alive.
  2. Meanwhile, after switching into Debug Mode this unresolving issue is present again. Debug Configuration is made using GDB hardware debugging plugin ( C/C++ GDB Hardware Debugging 9.10.0.201911010936 ). If I switch to Run mode, all is OK again...
  3. I have tried to use Source Looking Path for the GDB, but without any success....

Updated:

  1. Reinstalled IDF-PLUGIN with com.espressif.idf.update-v999-71-g9550085e (bets 5)
  2. In RUN launch mode all is OK after building, and again after reloading of project. So, Indexer knows about includes only after build. OK.
  3. In Debug Launch mode the including issue is permanent. No ways here to say Indexer about required path to IDF components... "Source" tab in GDB Hardware Debugging configuration cannot to help unfortunatly... or can?
    So, how I could to fix this issue in Debug mode? Is it possible? Thanks!

3
1
2

@shivam5594
Copy link

If warnings doesn't resolve even after building the code, open terminal in that project and run idf.py fullclean. Somehow clean in eclipse is not cleaning, it builds the code again.

@Just-Eugene
Copy link

Guys, I have the same annoying issue.
I'd marked these options:
Screenshot_20200531_212158
and got:
Screenshot_20200531_212024
But it doesn't solve the issue cause I can reach only headers but not sources.
Earlier when I was using ESP IDF v3.3 with make build system without use the plugin I just added (linked) needed sources, e.g. IDF parent directory:
Screenshot_20200531_211142
But this submenu can't be accessible when the plugin is used.
Maybe did someone find any solution? Or is the only way to use my projects as CDT general ones without the Espressif plugin?

@kolipakakondal
Copy link
Collaborator

Hi @Just-Eugene - Paths and Symbols got removed with the latest Eclipse CDT.

You can follow the below instructions to link esp-idf to the project so that function definitions will be linked.
#33 (comment)

I hope that helps.

@Just-Eugene
Copy link

Hi @Just-Eugene - Paths and Symbols got removed with the latest Eclipse CDT.

You can follow the below instructions to link esp-idf to the project so that function definitions will be linked.
#33 (comment)

I hope that helps.

Thank you!

@fweiss
Copy link

fweiss commented Jul 22, 2020

I had this problem as well with fresh install Eclipse 2020-06 (4.16..0) and ESP_IDF Eclipse Plugin 1.1.1, after creating a new ESP_IDF project with the default template.

Resolved after Project > Build Project

There were also symbol errors in the editor, such as "NULL". Resolved this by:

Project > Properties > C++ General > C++ Indexer
Check the option Enable project-specific settings
Check the option Index source file not included in the build

@emsameen
Copy link

I just added the set(INCLUDE_DIRS ".") in the CMakeList.txt and the warnings are disappeared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows
Projects
None yet
Development

No branches or pull requests