include relative path .dtsi and .h in a project

Good Morning,

I create a workspace with a custom board (n52840_dtsi) but in my file n52840_v1.dtsi the #include indicate this:

No such file: nordic/nrf52840_qiaa.dtsi
View Problem (Alt+F8)
No quick fixes available
or Unknown path label when select &sram0 for example!

 

my workspace:

nordic

| -- .west

| -- application

| -- boards

| -- external

Can you tell me how to make to access  <nordic/nrf52840_qiaa.dtsi> but relative with my workspace ?

On the forun stackover I found an explaination on the c_cpp_proprietes.json but I always see squiggle under my header?

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.22000.0",
            "compilerPath": "cl.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64"
        }
    ],
    "version": 4
}

thanks for help

alexandre

Parents
  • Hi Alexandre,

    Relative paths are the norm and what is used throughout the SDK. I do not see any errors in your screenshot either, and the build seems to be successful. Regarding the error squiggles you see in VS code that is independent of the toolchain and only a problem within VS Code. As VS code is more an extensible editor than a fully integrated IDE you will sometimes see these and also invalid problems under "PROBLEMS". We are aware that this is not ideal, but for now the best is to ignore it ( relevant errors and warnings show up in the build log, and those should not be ignored.

    Einar

  • Dear Einar,

    thanks for explains, but when I want access to library for example "<zephyr/kernel.h> in the main.c or access to &sram in the .dtsi with go to definition (F12) VS code indicate "No such file", how to make?

    Alexandre

Reply Children
Related