cannot open source file

      When I build a routine project, the terminal window shows that the build was successful, but the problems window reports a bunch of errors to me.

      I followed the solution of others at DEVZONE and added the following path to the c_cpp_properties.json file.

{
    "configurations": [
        {
            "name": "ARM",
            "compileCommands": "${workspaceRoot}/build/compile_commands.json",
            "intelliSenseMode": "clang-x64",
            "browse": {
               "path": [
                    "${workspaceFolder}",
                    "${default}" ,
                    " C:/ncs/zephyr/include/zephyr",
                    "C:\\ncs\\zephyr\\include\\zephyr\\sys",
                    "C:/ncs/zephyr/include/zephyr/sys",
                    "C:\\ncs\\nrf\\modules\\tfm\\tfm\\boards\\include\\zephyr\\sys",
                    "C:/ncs/nrf/modules/tfm/tfm/boards/include/zephyr/sys"
                ]
            },
            "cStandard": "c11",
            "cppStandard": "c++17",
            "configurationProvider": "ms-vscode.cmake-tools"
        }
    ],
    "version": 4
}

    But the error has not been resolved. Please give me some suggestions, thank you!

Parents
  • Hello,

    Please disregard the 'problems' tab in Visual Studio Code - it is unfortunately not quite accurate, as it is VSC's native attempt to analyze the code to identify issues, but it does not know the paths that exist within the nRF Connect SDK like the nRF Connect SDK VSC extension, and so the nRF Connect SDK extension will be able to find files and defines that the VSC 'problems' tab can not, and so the 'problems' tab complains. Apologies for any confusion this might have caused.

    Instead, you should just monitor the build log for issues when performing a build :) 

    Best regards,
    Karl

Reply
  • Hello,

    Please disregard the 'problems' tab in Visual Studio Code - it is unfortunately not quite accurate, as it is VSC's native attempt to analyze the code to identify issues, but it does not know the paths that exist within the nRF Connect SDK like the nRF Connect SDK VSC extension, and so the nRF Connect SDK extension will be able to find files and defines that the VSC 'problems' tab can not, and so the 'problems' tab complains. Apologies for any confusion this might have caused.

    Instead, you should just monitor the build log for issues when performing a build :) 

    Best regards,
    Karl

Children
Related