nRF5 SDK v14.0.0
Running examples that use a SoftDevice

Before you can run more advanced examples that use Bluetooth or ANT, you must program the SoftDevice on the board.

After you programmed the SoftDevice, follow the steps described in Running the example to run an example that uses the SoftDevice. For example, test the Heart Rate Application, ANT Broadcast,  or BLE Heart Rate Collector Example examples.

Programming SoftDevices

The SoftDevice binary is located in folder components\softdevice\SoftDevice\hex in the SDK, where SoftDevice is the name of the SoftDevice. You can also download SoftDevices from nordicsemi.com. Note that ANT SoftDevices are not distributed by Nordic Semiconductor. See the Running ANT examples section for information about how to run examples that use these SoftDevices.

There are several methods to program the SoftDevice:

All methods erase the contents of the board, including (if present) the existing SoftDevice, application, and application data. nRFgo Studio and the GCC makefile erase the board automatically. In ARM Keil, you must erase the board manually before programming the SoftDevice.

nRFgo Studio

To program the SoftDevice using nRFgo Studio, perform the following steps:

  1. Open nRFgo Studio.
  2. In the Device Manager, select the nRF5 Development board that you are working with (identified by the SEGGER serial number).
  3. Select the Program SoftDevice tab.
  4. Click Browse and navigate to the SoftDevice file that you want to use.
  5. Click Program.

nRFgo Studio will erase any existing SoftDevice and program the selected SoftDevice.

ARM Keil

To program the SoftDevice using an example project in Keil, perform the following steps:

  1. Erase the board.
  2. Open an example project in Keil. The example must require a SoftDevice.
  3. Instead of the default target, select the target to flash the SoftDevice, for example, flash_s132_nrf52_2.0.0_softdevice.
  4. Click Options for Target.
  5. Select the Debug pane and click the Settings button for the J-Link / J-TRACE Cortex.
  6. Select the J-Link / J-Trace Adapter corresponding to the serial number that is printed on your device.
  7. Click OK to close the dialogs.
  8. In the main window, click Download to program the SoftDevice.

Keil will program the appropriate SoftDevice for the example.

GCC makefile

To program the SoftDevice using a GCC makefile, perform the following steps:

  1. Open a command prompt in the folder that contains the makefile of an example. The example must require a SoftDevice.
  2. Ensure that nrfjprog.exe (part of the nRF5x Command Line Tools) is in the path, thus the path to nrfjprog.exe is part of the PATH environment variable. The makefile issues a call to the nrfjprog tool.
  3. Run the following command: make flash_softdevice

Running the makefile will erase any existing SoftDevice and program the appropriate SoftDevice for the example.

Running ANT examples

ANT SoftDevices for the nRF52 Series are not distributed by Nordic Semiconductor. You can download them from thisisant.com.

There are no Keil or GCC targets to program these SoftDevices. You must therefore use nRFgo Studio to program them.

The SDK does not include the header files for the ANT SoftDevices. Therefore you must add them to your project before you can compile your application. To do so, extract the downloaded zip file that contains the SoftDevice and copy the SoftDevice headers to components/softdevice/SoftDevice/headers.

Make sure that ANT_LICENSE_KEY is uncommented in the nrf_sdm.h file that you copied. The included license key can be used for evaluation, but before releasing a product, it must be replaced with a valid commercial license key. For more information about licensing, see thisisant.com.


Documentation feedback | Developer Zone | Subscribe | Updated