nrf-connect app with west workspace vscode configuration.

Hi.

We have an application (nrf connect 2.7.0). the applications is based on sys build and is encapsulated in a west workspace.

so the app folder includes west.yml, app folder with the app CmakeList.txt and driver directory etc...

Much like the example for the very same structure in here : https://github.com/nrfconnect/ncs-example-application there is no .vscode/settings.json file in the repo, also i have added it to .gitignore.

I was sure west init will take care of it, though it doesn't.

So after west init && west update and

cd my-app-in_west_ws
code .

the vscode identifies the workspace and nrf-connect sdk version, but not the app, i can't add build configuration, even though it's a standalone app.

The only thing i can do is manually add a workspace config file.

I was sure the nrf-connect plugin will have some automatic way to do it, am i missing something ?

Parents
  • Hi Eyal_Gal,

    From which folder are you opening VS Code? If you want the app detected automatically, you need to open the app folder.

    Otherwise, you need to add the application manually by using the "Open an existing application" action.

    Please also go over the nRF Connect for VS Code Extension guides: Guide overview (nordicsemi.com).

    Hieu

  • 1. i have opened the app from the my-app-in_west_ws as i wrote above, the parallel from the nrf-connect example is the ncs-example-application. indeed it's not the app folder. it's one folder up the chain, the one that contains the sysbuild file.

    2. i did try to "open an existing application" action, i get "this folder does not contain nrf-connect application" error. As i said the only thing i could do is edit the workspace settings json manually and edit it.

    3. if non of the above work (i'll check it with the app folder, if that works, ok, it's a start) then except manual action there is no automatic handling for that ?

  • just tried opening the 'app' folder, still .vscode/settings.json was not created.

  • Eyal_Gal said:

    1. i have opened the app from the my-app-in_west_ws as i wrote above, the parallel from the nrf-connect example is the ncs-example-application. indeed it's not the app folder. it's one folder up the chain, the one that contains the sysbuild file.

    2. i did try to "open an existing application" action, i get "this folder does not contain nrf-connect application" error. As i said the only thing i could do is edit the workspace settings json manually and edit it.

    I have actually attempted to reproduce your issue before my last answer. However, things work correctly for me. I also verified both opening the app folder and adding an application via the "Open an existing application" action.

    Thus, I understand that you said it is similar to the ncs-example-application, but I would still like to check.

    Eyal_Gal said:
    still .vscode/settings.json was not created.

    This folder isn't necessarily created at all times. Only when something about the editing session should be saved that it is created.

    You could try to change the toolchain version, and it should be created just fine.

Reply
  • Eyal_Gal said:

    1. i have opened the app from the my-app-in_west_ws as i wrote above, the parallel from the nrf-connect example is the ncs-example-application. indeed it's not the app folder. it's one folder up the chain, the one that contains the sysbuild file.

    2. i did try to "open an existing application" action, i get "this folder does not contain nrf-connect application" error. As i said the only thing i could do is edit the workspace settings json manually and edit it.

    I have actually attempted to reproduce your issue before my last answer. However, things work correctly for me. I also verified both opening the app folder and adding an application via the "Open an existing application" action.

    Thus, I understand that you said it is similar to the ncs-example-application, but I would still like to check.

    Eyal_Gal said:
    still .vscode/settings.json was not created.

    This folder isn't necessarily created at all times. Only when something about the editing session should be saved that it is created.

    You could try to change the toolchain version, and it should be created just fine.

Children
Related