raspberrypi / pico-vscode

The official VS Code extension for Raspberry Pi Pico development. It includes several features to simplify project creation and deployment.
https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico
Mozilla Public License 2.0
132 stars 16 forks source link

c_cpp_properties has wrong forcedInclude path #30

Closed IvanVeloz closed 3 months ago

IvanVeloz commented 3 months ago

Using SDK 2.0.0, the Pico VS Code extension generates the following c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Pico",
            "includePath": [
                "${workspaceFolder}/**",
                "${userHome}/.pico-sdk/sdk/2.0.0/**"
            ],
            "forcedInclude": [
                "${userHome}/.pico-sdk/sdk/2.0.0/src/common/pico_base/include/pico.h",
                "${workspaceFolder}/build/generated/pico_base/pico/config_autogen.h"
            ],
            "defines": [],
            "compilerPath": "${userHome}/.pico-sdk/toolchain/13_2_Rel1/bin/arm-none-eabi-gcc",
            "compileCommands": "${workspaceFolder}/build/compile_commands.json",
            "cStandard": "c17",
            "cppStandard": "c++14",
            "intelliSenseMode": "linux-gcc-arm"
        }
    ],
    "version": 4
}

However, the path ${userHome}/.pico-sdk/sdk/2.0.0/src/common/pico_base/include/pico.h doesn't exist. Although ${userHome}/.pico-sdk/sdk/2.0.0/src/common/pico_base_headers/include/pico.h does exist. Changing that line fixes a VS Code warning on that line. I imagine it also fixes IntelliCode further down the line, but I haven't tested, I just got started on this project.

This is on macOS, if that makes a difference.

paulober commented 3 months ago

Thanks for reporting this issue. Will be fixed in the next release.

paulober commented 3 months ago

For now you can find a preview build here: Action run 10353453705.

IvanVeloz commented 3 months ago

Thank you for the fast response!