nRF Connect Example Function "Go to Definition" returns "No definition found... " in VS Code

Hi, 

I started using nRF Connect SDK in VS Code recently. Everything works well, start a new Application, configure a new board, build, and flash. 

While I found "Go to Definition" by right click on the function name or Macro always return "No definition found... ". 

I build a C project with multiple files in VS Code and this feature works well.

It looks like a SDK searching path problem. 

I explored a little bit on the internet, someone suggested to use the command "nRF Connect: Add nRF Connect SDK to Workspace". However, it doesn't work, or maybe I used it in a wrong way. 

Does anybody can help? 

Thanks, 

Ji

Parents
  • Thanks Dejan, 

    Yes, I installed C/C++ extension. 

    I can create a C project with multiple files and use “Go to definition" to traverse among the files. 

    For the command. "Ctr + Shift + p" and type "nRF Connect: Add nRF Connect SDK to Workspace", afterwards, I can see it in the Command list. 

    I'm new to VS Code, not sure does it mean the command has been excuted, please recommend. 

    I followed "nRF Connect for VS Code tutorials"

    https://www.youtube.com/watch?v=2cv_jjqk5hg&list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl

    I tried going through the VS code "Workspace" and add all the "zephyr", SDK version "v1.9.1" folders to the "Nordic_App.code-workspace"

    It does not work. 

    I think it's just a "Path" setting problem. I like the VS Code environment and don't want go back to SES, hopefully you can give me some guide to work it out, thanks, 

    - Ji

  • Hi,

    landing said:
    I can create a C project with multiple files and use “Go to definition" to traverse among the files. 

    "Go To Definition" did not originally work. Does "Go To Definition" work now?

    landing said:
    For the command. "Ctr + Shift + p" and type "nRF Connect: Add nRF Connect SDK to Workspace", afterwards, I can see it in the Command list. 

    What do you refer to as Command List? Can you show the Command List with it? It seems you uploaded something, probably an image. However, I am not able to see it. Could you reupload it?


    landing said:
    I tried going through the VS code "Workspace" and add all the "zephyr", SDK version "v1.9.1" folders to the "Nordic_App.code-workspace"

    Could you please show this?  Where is "Nordic_App.code-workspace" located? How did you add mentioned folders?

    Best regards,
    Dejan

Reply
  • Hi,

    landing said:
    I can create a C project with multiple files and use “Go to definition" to traverse among the files. 

    "Go To Definition" did not originally work. Does "Go To Definition" work now?

    landing said:
    For the command. "Ctr + Shift + p" and type "nRF Connect: Add nRF Connect SDK to Workspace", afterwards, I can see it in the Command list. 

    What do you refer to as Command List? Can you show the Command List with it? It seems you uploaded something, probably an image. However, I am not able to see it. Could you reupload it?


    landing said:
    I tried going through the VS code "Workspace" and add all the "zephyr", SDK version "v1.9.1" folders to the "Nordic_App.code-workspace"

    Could you please show this?  Where is "Nordic_App.code-workspace" located? How did you add mentioned folders?

    Best regards,
    Dejan

Children
No Data
Related