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 Reply
  • ah. that explains it, so yeah like i said eventually i created an "action" that caused it to create, i use the command to edit it...
    but for adding: "nrf-connect.applications": ["${workspaceFolder}/app"] i had to look in an automatically created app imported from examples.

    I think there should be for the very least an automated action that will add folder X (app in this case) as an application and will add it to the settings, especially for west workspaces.

Children
  • Eyal_Gal said:

    ah. that explains it, so yeah like i said eventually i created an "action" that caused it to create, i use the command to edit it...
    but for adding: "nrf-connect.applications": ["${workspaceFolder}/app"] i had to look in an automatically created app imported from examples.

    I think there should be for the very least an automated action that will add folder X (app in this case) as an application and will add it to the settings, especially for west workspaces.

    Hm, I am not clear what kind of feature you require here.

    If you open a directory that has the files necessary for a Zephyr application, the extension should be able to automatically detect the directory as containing an application and put it under the Application panel.

    The setting "nrf-connect.applications": ["${workspaceFolder}/app"] is only relevant when you add more applications.

    If you expect the extension to parse recursively into the folder and detect all applications, I am not sure that would work well with the nature of Zephyr. Within Zephyr are tens if not hundreds of samples, demo applications, and test applications.

  • my bad, seems like if i take the ncs-application-example tag 2.7.0 and then west update + cd ncs_application-example/app && code . 
    It Does recognizes the app. For some reason it does not for my workspace and i'm pretty sure it did not for 'main' on the ncs-application-example so the only question is what's the difference...

    Thanks anyway.

  • So after retesting in a competently new ws all the steps described above did work, so i conclude there is an issue with the current workspace i'm in (or one of the updates to VScode solved it and i'm unaware).

    In any case the answer will be accepted and case closed,

    Thanks Hieu.

Related