This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Visual code: boards.h not found

I'm using visual code for my development. I've tested a basic hello world app, this works fine so c/cpp is correctly installed.

I'm now testing a basic app, but I'm getting the error, boards.h: No such file or directory. When I "F12" on the functions I do get into the boards.h file. I've added the SDK to my settings.json in visual code (which is why i can F12 to the correct file):

    "C_Cpp.default.includePath": [
        "D:/nRF5_SDK_17.0.0_9d13099/**",
        "D:/nRF5_SDK_17.0.0_9d13099/components/**",
        "D:/nRF5_SDK_17.0.0_9d13099/components/libraries/**",
        "D:/nRF5_SDK_17.0.0_9d13099/components/boards/**",
        "{$workspaceFolder}/components/libraries/**",
        "{$workspaceFolder}/libraries/**",
        "{$workspaceFolder}/**",
    ],
But I think the compiler (I'm using GCC from mingw) isn't including the sdk. Which step do I have to take to enable it to use the SDK, or did I make another mistake?

For those trying the same:

To setup my Visual code to use c/cpp I followed this video: https://www.youtube.com/watch?v=Ubfgi4NoTPk
In Visual code I've added two extension: "c/cpp" & "code runner"
To adjust my json config I followed the answer of Vitox in: https://stackoverflow.com/questions/37522462/visual-studio-code-includepath 

Parents Reply Children
No Data
Related