Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

warning with default includePath after initialize, cannot open source file "avr/pgmspace.h" #818

Closed
bbukaty opened this issue May 16, 2019 · 8 comments

Comments

@bbukaty
Copy link

bbukaty commented May 16, 2019

when I did a normal initialize in a new folder just now and made a default ino file, I immediately got this error:
cannot open source file "avr/pgmspace.h" (dependency of "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\Arduino.h")
well, warning not error. nevertheless, to fix it I had to add this to includePath:
"C:\\\\Program Files (x86)\\\\Arduino\\\\hardware\\\\tools\\\\avr\\\\avr**"
If a default ino script with no additional libraries or anything is giving me this warning because that wasn't in includePath, should that not just be in includePath by default?
I'm on the latest version, 0.2.25.

@bbukaty bbukaty changed the title warning with default includePath after initialize, cannot open source file "avr/pgmspace.h" warning with default includePath after initialize, cannot open source file "avr/pgmspace.h" May 16, 2019
@ShixiangWang
Copy link

same issue in linux

@stale
Copy link

stale bot commented Jul 13, 2019

This issue has been automatically marked as stale and closed because it has not had recent activity. Please feel free to open a new issue if you would like further discussion. Thank you for your contributions.

@stale stale bot added the stale label Jul 13, 2019
@stale stale bot closed this as completed Jul 18, 2019
@BasixKOR
Copy link

BasixKOR commented Jul 30, 2019

Having same issue. Here is error message:

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\basix\Documents\Arduino\testservo\testservo.ino).

@ghost
Copy link

ghost commented Oct 20, 2019

Same issue under Ubuntu 18.04

I searched for the file using find -name 'pgmspace.h' from within my Arduino installation folder and found the file there. Was required to add "/home/[your_username]/.bin/arduino-1.8.10/hardware/tools/avr/avr/**" to my c_cpp_properties.json file under includePath. Adding the full path doesn't work.

Change the /home/[your_username]/.bin/arduino-1.8.10/ part to wherever you have installed your Arduino IDE and you should be fine.

@lguilhot
Copy link

lguilhot commented Apr 10, 2020

thank you schupat,
for me it worked with "..hardware/tools/avr/**" and not "...hardware/tools/avr/avr/**"

@ah3243
Copy link

ah3243 commented May 10, 2020

thank you schupat,
for me it worked with "..hardware/tools/avr/**" and not "...hardware/tools/avr/avr/**"

could you quote the absolute path, it's still throwing up errors

@justummar
Copy link

I get the same thing in windows? I added to settings.json file which has this in it
"arduino.defaultBaudRate": 9600, "arduino.logLevel": "verbose", "arduino.path": "C:\\Program Files (x86)\\Arduino", "C_Cpp.default.includePath": ["C:\\Program Files (x86)\\Arduino", "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\avr\\include\\avr\\", "C:\\Program Files (x86)\\Arduino\\hardware\tools\\avr\\avr\\include" ],
I added the C_cpp.default stuff but still get the squiggly lines...

@brunosacom
Copy link

I solve it adding the follow line in the file: c_cpp_properties.json
"includePath":[
"C:\Program Files (x86)\Arduino\hardware\tools\**"
]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants