0

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/**"
            ],

screenshoot

Does anyone know how to remove this squiggly lines when including pico headers ?

2
  • In your test program must be a cmake file. Can you show this file? Commented Jul 27, 2022 at 14:01
  • You must include the library pico in your cmake file and recompile it. Commented Jul 27, 2022 at 14:25

1 Answer 1

1

"/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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.