问题
I use VSCode to edit Xilinx SDK files. The VSCode issues "problems" that include path can't be found.
I used the bulb "show fixes":
Add to "includePath": D:/Other/Xilinx/SDK/2017.4/gnu/aarch32/nt/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/6.2.1/include
But VSCode is still complaining about the missing include path, although each Add to "includePath"
adds a correct path to "c_cpp_properties.json" in the projects .vscode folder.
What's wrong with the include configuration?
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/standalone_bsp_0/ps7_cortexa9_0/include",
"D:/Other/Xilinx/SDK/2017.4/gnu/aarch32/nt/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/6.2.1/include",
"D:/Other/Xilinx/SDK/2017.4/gnu/aarch32/nt/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/6.2.1/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "8.1",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64"
}
],
"version": 4
}
That's the line complained by VSCode:
#include <stdint.h>
Edit:
Each accepting of the "fix" causes an additional line with the same path in "includePath", but this doesn't solve the problem. So what you see in the c_cpp_properties.json
dump is caused by the "fix".
回答1:
Your c_cpp_properties.json
appears to have the same problems as in another answer I recently posted. To summarize:
- Add
compilerPath
. - Change
intelliSenseMode
togcc-x86
orgcc-x64
. (Not sure which, there is nogcc-arm
option.) - Check out the tutorial.
- Try running "C/C++: Log Diagnostics" and "gcc -v -E -dD".
See the linked answer for a few more hints and details.
来源:https://stackoverflow.com/questions/53369537/configure-vscode-include-path