1. Before proceeding with the topic, first select the tab that matches your choice of nRF Connect SDK version:
-For v2.8.0 and above – v2.7.0 (default), use the tab:
-For any version between v2.6.2-v2.0.0 , use the tab:
-For any version between v1.6.0 and v1.9.1, use the tab:
2. When progressing through the lessons, make sure to complete all the topics, before taking a quiz. The quiz is considered to be the last step in lesson completion. If the lesson is completed in a different order, make sure to re-take the quiz to mark the lesson as completed.
Follow the steps below to install the nRF Connect SDK, its toolchain, and VS Code IDE. Starting September 2023, It is now possible to download nRF Connect SDK and its toolchain directly from within VS Code, as explained in this guide.
Either watch the YouTube video or go through the text below.
1. Install nRF Command Line Tools.
Download the latest version that matches your operating system.
Download link: https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download?lang=en#infotabs.
As stated on the product page, the nRF Command Line Tools is in the process of being archived. In a future release of nRF Connect SDK, nRF Util will be necessary. We recommended downloading both tools in the transition period.
Follow the instructions as shown in the video below to install nRF Command Line Tools on your machine :
On Ubuntu and macOS, make sure to manually trigger the installation of the SEGGER J-Link Software that comes bundled with nRF Command Line Tools. The installation on Windows starts automatically.
nRF Command Line Tools are needed to install the SEGGER J-Link package, which is a requirement to flash firmware to your board. However, in a future release, another method of obtaining the SEGGER J-Link package will be available, and nRF Command Line Tools will not be needed.
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 supported Development Kits.
2. Install VS Code.
Go to https://code.visualstudio.com/download and install the version that matches your operating system.
3. Install nRF Connect Extension Pack.
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:
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:
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.
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 Toolchain.
The toolchain is a set of tools that are used together to build nRF Connect SDK applications. It includes the assembler, compiler, linker, and CMake, among other tools.
The first time you open nRF Connect for VS Code, it will prompt you to install a toolchain. This usually happens when the extension does not find any installed toolchain on your machine.
Click on Install Toolchain. It will list the available versions of toolchains that can be downloaded and installed on your machine. Select the toolchain version that matches the nRF Connect SDK version you plan to use. We always recommend using the latest tagged version of the nRF Connect SDK.
Installing the toolchain will take some time, depending on your development platform specifications and internet speed. The video below is sped up.
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.
5. Install nRF Connect SDK.
In nRF Connect for VS Code, click on Manage SDK. Through the Manage SDK, 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. It will list the available versions of the nRF Connect SDK that can be downloaded and installed on your machine. Choose the nRF Connect SDK version you wish to use for your project development.
If you have opened the SDK folder in VS Code, the Manage SDK menu option will not be present, and you will instead see Manage west workspace. To fix this, open another window or folder in VS Code.
If you don’t see either options, make sure you have the latest version of the nRF Connect for VS Code extension pack.
In the illustration below, we are showing how to install nRF Connect SDK version 2.4.2. 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. The video below is sped up.
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.
Follow the steps below to install the nRF Connect SDK, its toolchain, and VS Code IDE. Starting September 2023, It is now possible to download nRF Connect SDK and its toolchain directly from within VS Code, as explained in this guide.
Either watch the YouTube video or go through the text below.
1. Install nRF Command Line Tools.
Download the latest version that matches your operating system.
Download link: https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download?lang=en#infotabs
Follow the instructions as shown in the video below to install nRF Command Line Tools on your machine :
On Ubuntu and macOS, make sure to manually trigger the installation of the SEGGER J-Link Software that comes bundled with nRF Command Line Tools. The installation on Windows starts automatically.
nRF Command Line Tools contains nrfjprog
which is an essential tool for flashing firmware to your development kits.
2. Install VS Code.
Go to https://code.visualstudio.com/download and install the version that matches your operating system.
3. Install nRF Connect Extension Pack.
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:
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:
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.
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 Toolchain.
The toolchain is a set of tools that are used together to build nRF Connect SDK applications. It includes the assembler, compiler, linker, and CMake, among other tools.
The first time you open nRF Connect for VS Code, it will prompt you to install a toolchain. This usually happens when the extension does not find any installed toolchain on your machine.
Click on Install Toolchain. It will list the available versions of toolchains that can be downloaded and installed on your machine. Select the toolchain version that matches the nRF Connect SDK version you plan to use. We always recommend using the latest tagged version of the nRF Connect SDK.
Installing the Toolchain will take some time, depending on your development platform specifications and internet speed. The video below is sped up.
5. Install nRF Connect SDK.
In nRF Connect for VS Code, click on Manage SDK. Through the Manage SDK, we can install, uninstall, and set the active nRF Connect SDK version. Since this is our first time using the extension, we will see only two options. Click on Install SDK. It will list the available versions of the nRF Connect SDK that can be downloaded and installed on your machine. Choose the nRF Connect SDK version you wish to use for your project development.
If you have opened the SDK folder in VS Code, the Manage SDK menu option will not be present, and you will instead see Manage west workspace. To fix this, open another window or folder in VS Code.
If you don’t see either options, make sure you have the latest version of the nRF Connect for VS Code extension pack.
Please note that the use of main
is not encouraged. The main
branch is the most current development status. It is not thoroughly tested, and no technical support is available. You only use main
if you need to test the latest features earlier.
Development tags (ending with -dev
) are temporary tags between two released tags.
Customer sampling tags (ending with -cs
) are intended for customers participating in a customer sampling program for a new product.
In the illustration below, we are showing how to install nRF Connect SDK version 2.4.2. 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. The video below is sped up.
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.
In this part, we will simply follow the steps explained in the below video. Either watch the video or follow the steps below to install the nRF Connect SDK, its dependencies, and the VS Code IDE.
1. Install nRF Command Line Tools.
Download link: https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools
Download the latest version that matches your operating system.
Follow the instructions as shown in the image below:
2. Download nRF Connect for Desktop.
nRF Connect for Desktop is a software suite that contains several applications for testing and development with Nordic’s products.
Download link: https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-desktop
Download the latest version that matches your operating system
3. Install nRF Connect for Desktop.
Once the download is complete, click on the installer file as shown in the illustration below.
4. Install nRF Connect SDK.
On Linux, complete steps 1 through 5 found on the Installing manually page, to install the nRF Connect SDK.
When complete, skip down to step 7 here in Lesson 1 Exercise 1.
4. Install and open the Toolchain Manager.
In nRF Connect for Desktop, scroll down through all the available applications until you see the Toolchain Manager. Install the application, then open it as shown in the image below:
The Toolchain Manager manages the nRF Connect SDK and toolchain versions on your computer. It is the recommended way to download, install, and uninstall the nRF Connect SDK for Windows and macOS machines.
5. Configure the installation directory for the nRF Connect SDK.
This is the directory where the SDK will be downloaded and installed. We recommend calling this directory nordicsemi
or something similar in length, and save it as close as possible to the root directory. E.g: C:\nordicsemi
. Do not use a name that contains spaces.
6. Install the nRF Connect SDK.
The Toolchain Manager will list the available versions of the nRF Connect SDK that can be downloaded and installed on your machine. Choose the nRF Connect SDK version you wish to use for your project development.
In the illustration below, we are showing how to install version 1.6.1. This will take some time to finish depending on your internet and machine speed.
Once you see the new buttons like Open VS Code (see image above), the installation of the nRF Connect SDK is complete.
7. Set up nRF Connect for VS Code.
Now that we have the SDK installed, the next step is to set up an integrated development environment (IDE) to simplify the application development process. We will use the nRF Connect for VS Code.
nRF Connect for VS Code is an extension pack that allows developers to use the popular Visual Studio Code Integrated Development Environment (VS Code IDE) to develop, build, test, and deploy embedded applications based on Nordic’s nRF Connect SDK (Software Development Kit). It includes an interface to the compiler and linker, an RTOS-aware debugger, a seamless interface to the nRF Connect SDK, and an integrated serial terminal among other valuable development tools. Full documentation of the nRF Connect for VS Code is available here.
7.1 Install VS Code.
Go to https://code.visualstudio.com/download and install the version that matches your operating system.
7.2 Open VS Code.
In the Activity Bar, click the Extensions icon, then type Nordic
in the search field. Choose nRF Connect Extension Pack and click on Install as shown in the illustration below:
In addition to Cortex-Debug, GNU Linker Map files, and CMake, the bundle consists of the following components:
7.3 Open nRF Connect for VS Code.
Open the extension by clicking the icon (1). Set up the basic configuration (2) by selecting the nRF Connect SDK and nRF Connect Toolchain. You’re now ready to build an application.
The illustration above shows how to set up the extension with a version (1.8.0) of the nRF Connect SDK. Choose the version that you plan to use for your project development.
nRF Connect SDK is IDE agnostic, which means you can use it with the IDE of your choice or without an IDE at all. 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.