Programming the SoftDevice

Getting started with nRF5 SDK and Keil (nRF51 & nRF52 Series)

If your application uses Bluetooth® or ANT™, you must program a SoftDevice in addition to the application.

There are several ways to program the SoftDevice to the kit. You can program the SoftDevice directly from Keil, use the command line tool nrfjprog (part of the nRF Command Line Tools), or use nRF Connect Programmer.

The Bluetooth SoftDevices are included in the nRF5 SDK and can be found in the SDK_dir\components\softdevice\ folder. Check SoftDevices for information about which SoftDevice is compatible with your development kit.

Note: The nRF5 SDK does not contain ANT SoftDevices. You can download them from thisisant.com. The nRF5 SDK does not provide Targets to program ANT SoftDevices. Therefore, you must use nrfjprog or nRF Connect Programmer to program them.
  • To program the SoftDevice with Keil, complete the following steps:
    1. Instead of the default Target, select the Target to flash the SoftDevice, for example, flash_s132_nrf52_6.0.0_softdevice.
      Flash SoftDevice target
    2. Click Options for Target.
    3. Select the Debug pane and click the Settings button for the J-Link / J-TRACE Cortex.
    4. Select the J-Link / J-Trace Adapter corresponding to the serial number that is printed on your device.
    5. Click OK to close the dialogs.
    6. In the main window, click the Load button to program the SoftDevice.
  • To program the SoftDevice with nrfjprog, enter the following command, where HEX is the path and file name of the SoftDevice HEX file:
    • For nRF51 devices: nrfjprog --family nRF51 --program HEX
    • For nRF52 devices: nrfjprog --family nRF52 --program HEX
  • To program the SoftDevice with nRF Connect Programmer, follow the instructions in Programming a Development Kit or the nRF51 Dongle.