Nordic VS Code extension in a devcontainer

I want to setup a development environment for a Nordic device (nRF5340-DK board). I want to use a devcontainer in VS Code to share the same environment with CI pipeline. Nordic provides a ready docker image : https://hub.docker.com/r/nordicplayground/nrfconnect-sdk. I opened it in VS code with following configuration (devcontainer.json):

{

        "name": "nRF-Dev",

        "image": "nordicplayground/nrfconnect-sdk:v2.0-branch",

    "workspaceMount": "source=${localWorkspaceFolder},target=/workdir/project,type=bind",

    "workspaceFolder": "/workdir/project",

        "customizations": {

               // Configure properties specific to VS Code.

               "vscode": {

                       "settings": {},

                       "extensions": [

                               "streetsidesoftware.code-spell-checker",

                               "ms-vscode.cpptools-extension-pack",

                               "ms-vscode.cmake-tools",

                               "mcu-debug.debug-tracker-vscode",

                               "marus25.cortex-debug",

                               "nordic-semiconductor.nrf-connect-extension-pack"

                       ]

               }

        }

}

The image has correctly exported ZEPHYR environment variables:

ZEPHYR_BASE=/workdir/zephyr

ZEPHYR_TOOLCHAIN_VARIANT=zephyr

ZEPHYR_SDK_INSTALL_DIR=/workdir/zephyr-sdk

Configuration and compilation a sample project in commandline works fine. However, problems arise when I want to use the nRF Connect extansion ( nRF Connect for VS Code - Visual Studio Marketplace ). In the welcome screen, it cannot find the SDK, showing the following message (see image)

 

When I set the path to /workdir, (where the zephyr-sdk directory resides), it says enigmatically:

 

Has anyone succeeded in setting up this extension in a devcontainer?

Parents Reply Children
Related