Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nRF Connect SDK Devcontainer

Docker

.devcontainer/Dockerfile specifies a dockerized installation of:

  • nrfutil
  • Nordic's Toolchain installed to /opt/ncs via nrfutil toolchain-manager install
  • a .bashrc that sets up the toolchain environment

It's roughly equivalent to the Docker image Nordic provides: https://github.com/nrfconnect/sdk-nrf/tree/main/scripts/docker

Host-side prerequisites for flashing / debugging

Linux hosts only. USB passthrough (--device=/dev/bus/usb) and the /run/udev bind-mount don't translate to macOS/Windows Docker Desktop, so flashing hardware requires a Linux host with the DK attached. Building still works anywhere.

The devcontainer passes /dev/bus/usb through and bind-mounts /run/udev, which is enough for JLink inside the container to see the probe — but only if the host has already granted your user permission to the probe's device node. Install SEGGER's J-Link pack on the host (or at minimum its udev rules package) so the rules file ends up in /etc/udev/rules.d/ and add yourself to the plugdev group. Download: https://www.segger.com/downloads/jlink/ . After installing, log out and back in so the group membership takes effect, then replug the probe. No container rebuild needed — /run/udev is bind-mounted at runtime.

Without this, west flash will see no probes even though the container is configured correctly.

Devcontainer

The devcontainer:

  • Uses that Dockerfile
  • Runs west init to create a west workspace from our west.yml (This workspace is what Nordic calls the nRF Connect SDK)
  • Mounts the local project directory inside that west workspace (as opposed to the default of /workspaces)

Background

This is essentially a crystalization of my protracted attempt to both follow and deeply understand the instructions here. They present two paths: Using their vscode plugin, and "Using the command line." Since this is all so incredibly hard to grok (what is the "SDK"? What is their "toolchain"? How would I source control any of this?), I decided to skip the magical vscode plugin and pin it all down myself.

Read more about the nRF Connect SDK, aka ncs, here

Add your app

There's a minimal example_app here, mostly just to illustrate where an app would go. For a more comprehensive example app, see https://github.com/nrfconnect/ncs-example-application

There's no reason to do this, but for the record you can build example_app:

west build -b nrf54l15dk/nrf54l15/cpuapp example_app

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages