nRF Connect SDK Fundamentals – [Lesson 1] – Exercise 1 – Installing nRF Connect SDK and VS Code – v3.3.0-preview2

Installing nRF Connect SDK and VS Code

Follow the steps below to install the nRF Connect SDK, its toolchain, and VS Code IDE

1. Install SEGGER J-Link v8.76

Windows

Download the installer from SEGGER J-Link Software. Run the installer; when you reach the ‘Choose Optional Components’ window during installation, be sure to select ‘Install Legacy USB Driver for J-Link’ This driver is necessary for some old Development Kits.

Linux

1.1 Install J-Link Driver

Download the installer from SEGGER J-Link Software. We select “64-bit DEB Installer” and download the file. It is enough to just run the file and install the package.

Please note that there is no additional GUI (besides the package manager). Alternatively, we can install from the console terminal by running sudo dpkg -i JLink_Linux_V876_x86_64.deb from the directory where the file was downloaded.

1.2 Install nrf-udev

The udev rules are required to access Nordic USB devices with correct permissions. Download the latest DEB file from nrf-udev and run the following command to install nrf-udev:

sudo dpkg -i nrf-udev_1.0.1-all.deb

macOS

Download the installer from SEGGER J-Link Software. Run the installer to install the SEGGER J-Link

2. Install VS Code.

Go to https://code.visualstudio.com/download and install the version that matches your operating system.

In the Activity Bar, click the Extensions icon, then type nRF Connect for VS Code Extension Pack in the search field, and click on Install, as shown in the illustration below:

3. Install nRF Connect Extension Pack.

nRF Connect for VS Code extension pack allows developers to use the popular Visual Studio Code Integrated Development Environment (VS Code IDE) to develop, build, debug, and deploy embedded applications based on Nordic’s nRF Connect SDK (Software Development Kit). It includes an interface to the compiler, linker, the whole build system, an RTOS-aware debugger, a seamless interface to the nRF Connect SDK, the Devicetree Visual Editor, and an integrated serial terminal, among other valuable development tools.

nRF Connect for VS Code extension pack consists of the following components:

  • nRF Connect for VS Code: The main extension contains an interface to the build system and nRF Connect SDK. It also provides an interface to manage nRF Connect SDK versions and toolchains.
  • nRF DeviceTree: Provides Devicetree language support and the Devicetree Visual Editor.
  • nRF Kconfig: Provides Kconfig language support.
  • nRF Terminal: A serial and RTT terminal.
  • C/C++ from Microsoft: Adds language support for C/C++, including features such as IntelliSense.
  • CMake: CMake language support.
  • GNU Linker Map Files: Linker map files support.

We can download any nRF Connect SDK version of our preference and its toolchain through the extension. Complete documentation of the nRF Connect for VS Code is available here.

Note

It’s crucial to install the nRF Connect for VS Code Extension Pack, as shown in the video above, not just nRF Connect for VS Code, in order to get all the available features.

4. Install nRF Connect SDK.

In nRF Connect for VS Code, click on Install SDK in the left margin under the WELCOME panel. Through the Manage SDKs menu, we can install, uninstall nRF Connect SDK versions. Since this is our first time using the extension, we will see only two options. Click on Install SDK.

There are two installation options for the SDK: “nRF Connect SDK” and “nRF Connect SDK Bare Metal.” Please select the first option, as this is the focus of the course.

Then, it will display the available versions of the nRF Connect SDK that can be downloaded and installed on your machine. Select the nRF Connect SDK version you want to use for your project development.

Starting with nRF Connect SDK v3.1.0, the SDK, its toolchain, and nrfutil are bundled together inside one package “Pre-packaged SDKs & Toolchains”, making it simple and straightforward to install the SDK.

Early access program

Early Access Program for the nRF54LS05 DK

If you are part of the Early Access Program for the nRF54LS05 DK, install nRF Connect SDK v3.3.0-preview2 or higher. Preview2 is a development tag used for development/evaluation purposes. It is not recommended for use in a production environment. This preview tag will be replaced by a released tag in the future.

For the DevAcademy exercises, use the preview branch in the GitHub repository for this course.

Note

By default, nRF Connect for VS Code displays only released tags (also known as stable versions) of toolchains. If you are evaluating new features and want to use a preview tag or a different type of tag (for example, customer sampling -cs), click on “Show All Toolchain Versions.” as shown below:

Note that for production code, only released tags should be used.

Note

The nRF Connect for VS Code extension might prompt you to install a new supported version of SEGGER J-Link, if one is available.

In the illustration below, we are showing how to install nRF Connect SDK version 3.1.0. which is the latest released tag at the time of recording. Depending on your internet and machine speed, this will take some time to finish.

Important

We recommend installing the latest released tag of nRF Connect SDK listed to get all the latest features and patches.

With this, we have completed the installation of nRF Connect SDK and VS Code. The following exercise will teach us how to build and flash our first nRF Connect SDK application to our board.

It’s also worth noting that nRF Connect SDK is IDE agnostic, which means you can use it with the IDE of your choice or without an IDE. It is possible to download and install the nRF Connect using a command-line interface (CLI) through nRF Util (nrfutil). However, we highly recommend using VS Code with our nRF Connect for VS Code extension pack as it contains both a convenient graphical user interface (GUI) and an efficient command-line interface (CLI) in one place, in addition to many features that make firmware development much easier. Setting up another IDE to work with the nRF Connect SDK will require some extra manual steps that are out of the scope of this course.

Switch language?

Progress is tracked separately for each language. Switching will continue from your progress in that language or start fresh if you haven't begun.

Your current progress is saved, and you can switch back anytime.

Register an account
Already have an account? Log in
(All fields are required unless specified optional)

  • 8 or more characters
  • Upper and lower case letters
  • At least one number or special character

Forgot your password?
Enter the email associated with your account, and we will send you a link to reset your password.