Issue
I am trying to get the Pico SDK working with VS-Code on Mac OSX.
As you can see in the screenshot below the include is not recognised.
I set the SDK path in PICO_SDK_PATH
and stored this path as an environment variable.
Inside VSCode if I use the CMake Tool extension the build works correctly.
in the c_cpp_properties.json
I explicitly included the SDK location
"includePath": [
"${workspaceFolder}/**",
"/Users/MY_USER/pico/pico-sdk/**"
],
Does anyone know how to remove this squiggly lines when including pico headers ?
Solution
"/Users/MY_USER/pico/pico-sdk/**"
This seems incorrect. Try this:
"includePath": [
"${workspaceFolder}/**",
"~/pico/pico-sdk/**"
],
~
points to the home directory. On Windows this is C:\Users\USERNAME
and on Linux /home/USERNAME
.
Inside VSCode if I use the CMake Tool extension the build works correctly.
This is because the compiler does not use the settings from c_cpp_properties.json
. Instead they are used for IntelliSense to work correctly, see this article.
Answered By - Terra Answer Checked By - Senaida (WPSolving Volunteer)