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:
  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:
    1. Go to the Windows Advanced system settings and click Environment Variables.
    2. Select the Path variable and click Edit.
    3. 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
    4. Click OK twice.
    On Linux, assuming that you have extracted the .tar archive into /opt/nrfjprog:
    1. 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.