Setting up your toolchain
7.4 Installing the nRF5x Command Line Tools
The nRF5x Command Line Tools are used for developing, programming, and debugging of Nordic
Semiconductor's nRF5x SoCs (System on Chip).
When installing on macOS or Linux, the SEGGER software must be installed in its default location, or the
shared library must be placed so that dlopen() can find it. The default location is:
• On macOS: /Applications/SEGGER/JLink
• On Linux: /opt/SEGGER/JLink
The SEGGER software can be installed by downloading and running the installer from SEGGER Software.
When installing the nRF5x Command Line Tools on Windows, SEGGER software is automatically installed in
addition to the tools.
Complete the following steps to install the nRF5x Command Line Tools:
1. Download the software for your operating system:
• Windows: nRF5x-Command-Line-Tools for Win32
• Linux 32-bit: nRF5x-Command-Line-Tools-Linux-i386
• Linux 64-bit: nRF5x-Command-Line-Tools-Linux-x86_64
• macOS: nRF5x-Command-Line-Tools for Os X
2. Install the software by running the installer and following the given instructions, or by extracting the
.tar archive anywhere on your file system and adding the extracted folders to your path.
3. Enter the following command in a command line to make sure that nrfjprog is installed correctly:
nrfjprog --version
If you get an error message that the command cannot be found, nrfjprog must be manually added to
the PATH. On Windows:
a) Go to the Windows Advanced system settings and click Environment Variables.
b) Select the Path variable and click Edit.
c) Add the following text at the end of the variable value: ;C:\Program Files (x86)\Nordic
Semiconductor\nrf5x\bin
Make sure that you add a semicolon (;) between entries in the PATH values: path1;path2
d) Click OK twice.
On Linux, assuming that you have extracted the .tar archive into /opt/nrfjprog:
a) Add the following command to the configuration file for your command line, for example, to
~/.bashrc:
export PATH=$PATH:/opt/nrfjprog
Open a new command prompt and repeat the command. It should now succeed.
1159720_163 v1.1
14