In the Arduino development process of VSCode, there are include errors open error detected, and avr/pgmspace.h cannot be found

properties are required for the correct path

After the high school biology test, it c_cpp_properties.jsonis finally found that it is the key. If there is no relevant file, you can first try to move the used ones c_cpp_properties.jsonto the workspace folder. Add the corresponding configuration. For
detailed configuration, please refer to the blog to use Visual Studio Code to develop Arduino related configuration.
Theoretically, when the configuration of the related environment is completed, the environment and path in this file will be automatically added. When adding manually, pay attention to the path:

 "{path-to-arduino}/hardware/tools/avr/lib/gcc/avr/4.*.*/include/",

Among them {path-to-arduino}is the path of your own computer Arduino installation, which 4.*.*is the version number. When I am writing this blog, I have entered 7.3.0. Manually change this version number to 7.3.0 to work.

Still can't find the avr/pgmspace.h file?

If an exception still occurs (although this exception does not affect the use), we can settings.jsonadd related options, such as:

"C_Cpp.intelliSenseEngine": "Tag Parser"

After adding this entry to my VSCode, the error was resolved. The original question is in IntelliSense throws #include errors when working with Arduino in VS Code

Guess you like

Origin blog.csdn.net/weixin_45502929/article/details/108359448