-
Notifications
You must be signed in to change notification settings - Fork 227
cannot open source file "avr32/io.h" #1228
Comments
What version of the extension are you using? |
This problem occurs when libraries have files with names like in the IDE, that is, when linking, it picks up the first file found by name, without taking into account the priorities of the local location of the source. The correct solution would be to first search in the directory hierarchy of the current file and then in the list of included directories. I have this problem occurred when connecting ESP 01, I decided to rearrange the directories. |
I am using Arduino 0.4.0 and C/C++ 1.3.0-insiders5 |
I have the error with the example DigitalPotControl which comes with the SPI library to be found in Arduino->hardware->arduino->avr->libraries. I can find nothing to help with this in the Arduino reference for SPI at https://www.arduino.cc/en/Reference/SPI. The folder Arduino->hardware->tools->avr->avr->include->avr has io.h I cannot find avr32 anywhere. |
I think I have resolved this using the work documented here:
The problem is that Intellisense does not generate them. In my main problem case SPI.h was not a top level include. |
It also seems to be necessary for this to be searched first:
|
I think I have worked out what is going on here. I've written a full explanation under issue 678. |
I am working with VS Code and the Arduino extension. When I attempt to use a file which include <SPI.h> it fails with an error saying cannot open source file "avr32/io.h". The file works in the Arduino IDE. Several people have reported a similar error on the web and suggest that it is a problem with the ordering of include files.
The text was updated successfully, but these errors were encountered: