-
Notifications
You must be signed in to change notification settings - Fork 227
Dependency error avr32/io.h #678
Comments
I think you need to add some defines to the configuration. Here is what I use for the MKRWAN1300:
Since you are using AVR, your defines will be different but conceptually, you need to add them the have the conditional defines work. Also, there is a file "includes.cache" in the build directory ... look inside that file and make sure all the includes listed in there are in your configuration. |
I don't know why but i deleted the .vscode folder and started the setup process again. It seems the intellisense works now. Maybe its because of that but i don't know that. Nevertheless I will add defines for my board if i can figure out what to type in there :). Where did you get your define values from? |
I am also getting this error using an Arduino/Genuino Uno board on Windows 10.
This is my
|
@ueberBrot Apologies, I missed your post back in October. Did you figure this one out? A good place to look is in the compiler and linker configurations. Recently I found that the platform.txt and boards.txt files have relevant configurations in them and I think if you pick the defines from these they are the only ones you need. You can also dig through the header files to figure out which ones you require. This is what I originally did but it is a more tedious process. Regarding the Tag Parser ... this is a sub optimal solution. You really are not getting the benefit of IntelliSense when you are using the Tag Parser. The difference is huge. |
@sslupsky thank you for your replay. I never figured it out and I stopped looking for it.
Yeah exactly. Working with it I had many problems during the build process and that's why I switched back to the Arduino IDE. |
FYI, I know this issue is closed by I was able to get around this issue in my case by doing the following two things:
Number 2 is needed as without it the SPI.h library has tons of IDE issues per MSVC. By doing this my project builds correctly and has no more squiggly lines issues. |
I believe this is a problem due to the All other libraries in the I posted this issue on the arduino github repo |
That's only a comment. It is indeed a typo, and I am not opposed to it being corrected (though I'm not in a position to merge PRs in the Arduino boards platform repositories), but a typo in a comment should never have any functional effect. If for some reason this project is parsing the comments in keywords.txt files (which I very much doubt), then that should be considered a faulty approach. There is no specification for any format for these comments. The library author is free to add anything they like in comments in these files, or no comments at all if they prefer. |
This problem still persists. Clean install of arduino and vscode extensions. First try with SPI library and got the exact same error that avr32/io.h can't be found. Why is this issue closed though? |
Having this problem too. Although Arduino IDE is compiling and VSCode also. All the dependency stuff is like Chinese to me! The dependency will probably be solved via another path. Which one????? stays a mystery. |
I'm having exactly the same problem on my windows 10 system. So I set it all up(arduino ide, vs code with arduino extension) on my macbook air and the problem went away. I set c/cc++ configuration(on both systems) using the UI method and put all the includes (obtained by using verbose mode and looking at compiler call from arduino ide) in the compiler arguments . Perplexed but don't want to spend any more time on it (unless I have to). |
I solved the problem by changing the order of the library locations in |
Is there any logic in the arrangement of the libraries in
c_cpp_properties.json?
Op vr 26 feb. 2021 21:54 schreef Voclav <[email protected]>:
… I solved the problem by changing the order of the library locations in
c_cpp_properties.json.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#678 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZUAX4QB4U3HAJ24Q5REOTTBADBBANCNFSM4F67ERCQ>
.
|
In my opinion, those libraries are searched in that order. And because they have the same names, the first one finds one that uses |
I don't see any json file content. To what json file are you referring? |
I changed the order in |
I am at the same spot, but what comes first? I put in workspace first than the Arduino and than the "external" libs. Please show me a copy of your includePath branch of json file. |
|
Thanks! I will have a try to apply that for my libraries |
After a good couple hours pulling my hair out I finally got a c_cpp_properties.json config that works in Windows for a mega 2560 board. Now if I could only make this the default config for any arduino files I open up in Visual Studio Code... anyone know a way??
|
I think I understand what is happening, and will try to explain it. SOLUTION Open your
Then restart VS Code (since sometimes restarting IntelliSense on its own doesn't seem to be enough). The dependency error should now disappear. If other IntelliSense errors appear, ensure your EXPLANATION There are several files named If you compile your code in the Arduino IDE with verbose output (Ctrl+Comma > Show verbose output during compilation), near the bottom of the output window you should see a message like this:
In my case, it was the
So that's the one VS Code should be picking up as well. Note that this file does not include the VS Code looks through the list of folders specified in the of
Note that all the others contain the line
so if we hit any of these, we'll get the IntelliSense error. My
Assuming VS Code is working through the
Therefore I modified it as suggested above to this:
Unlike others, I saw no problems with VS Code resolving the recursion ( |
Hey,
i started today using VS Code for programming Arduino sketches. I opened a sketch that I programmed with the Arduino IDE. After opening the file i selected my board and the arduino.json + c_cpp_properties.json files were created in the .vscode folder.
With the help of the "Show Fixes" dropdown menu I added the following to my c_cpp_properties.json file:
I still have 2 warnings:
#include errors detected. Please update your includePath. IntelliSense features for this translation unit (D:\My\Path\to\the\script\myscript.ino) will be provided by the Tag Parser.
cannot open source file "avr32/io.h" (dependency of "SPI.h")
When I peek the definition it clearly shows that its not defined.
However when I open the script with the Arduino IDE <SPI.h> works without any issues.
Why is that?
Hope you can help me.
Cheers
The text was updated successfully, but these errors were encountered: