nRF Connect for VS Code - Opening project with NCS as a descendant

Hello, I wanted to test the VS Code extension but it failed for the following use case...

In our company, we are building our product-related SDK that uses nRF Connect SDK "as a child". This is how a west workspace looks like:


.
├── application
├── bootloader
├── chester
├── mbedtls
├── modules
├── nrf
├── nrfxlib
├── test
├── tools
└── zephyr

The directory application is the user's private Git project which "includes" our SDK (directory chester in our tree).

This is what we have in application/west.yml:

manifest:
  version: "0.10"
  remotes:
    - name: hardwario-chester
      url-base: [email protected]:chester
  projects:
    - name: sdk.git
      remote: hardwario-chester
      path: chester
      import: true
  self:
    path: application

This is what we have in chester/west.yml:

manifest:
  version: "0.10"
  remotes:
    - name: nrfconnect
      url-base: https://github.com/nrfconnect
  projects:
    - name: sdk-nrf
      remote: nrfconnect
      revision: v1.7.0
      path: nrf
      import: true

Back to the problem: I am unable to open such a structure with the VS Code extension. I am able to open the application folder which includes prj.conf, but the extension asks for this:

The application version is different to the one in nrf/VERSION. Would you like to change manifest and update the west workspace?

I select No as this would break my workspace. Then I want to provide it with the build configuration, but our custom board defined in chester/boards/... is not available in the list.

Thank you. P.

  • Happy new year to Hubpav, 
    Most of us came from holidays today. so no updates in this. 
    I will ping the team to see if there any new updates.

  • Hi Pavel,

    An internal ticket is now made to remove the hardcodec "nrf/VERSION" string from then notification and replace it with the path to the current active manifest.
    The latest release of the extension has an "nrf Connect: West Set Active Manifest" command. Please try to use this and see if it helps you move ahead from this isssue.
    About the BOARD_ROOT issue, it shouldn't have been necessary to change the CMakeCache.txt file. I am assuming that you are using the latest version of the extension and they have made some changes regarding this where the workspace directory that directly includes the boards  folder added to the BOARD_ROOT when calling west. But seems like there are other scenarios that might not be covered. But for now use the West Set Active Manifest command to see if that fully or partly solves your problem.
  • Hello Susheel, perfect, thank you for the update, and all the best in 2022 to you too!

    I have now tried again. I confirm I have the latest VS Code extension - 2021.12.137

    I have tested the command West Set Active Manifest as you advise and selected west.yml from our CHESTER SDK - still it did not help. Only if I tweak "nrf-connect.boardRoots" in JSON, then the "Custom boards" option is added in the extension build configuration settings and I can pick chester_nrf52840 board.

    If interested, do not hesitate to approach me via email and we can set up a quick call with you / the extension developer where I will demonstrate the behavior.

    Cheers! P.

  • Thanks for the update Pavel,

    hubpav said:
    I have tested the command West Set Active Manifest as you advise and selected west.yml from our CHESTER SDK - still it did not help. Only if I tweak "nrf-connect.boardRoots" in JSON, then the "Custom boards" option is added in the extension build configuration settings and I can pick chester_nrf52840 board.

    This is bad news but I guess not surprising. I will ask the team to keep this in mind to fix for next releases. 

  • Yeah, once you resolve it, the UX experience for our SDK customers will be just superb. We appreciate this VS Code extension a lot.

Related