Since nRF51 SDK version 8.0.0 SoftDevices binary files have become a part of the release. In order to make it easier to flash proper type and version of SoftDevice a new feature was added: each project that is using SoftDevice contains additional target called ‘flash_softdevice’ which can be used to program SoftDevice. Solution works with ARM Keil uVision 4 and 5 (with and without CMSIS Packs) and Makefiles. It is ensured that SoftDevice binary file matches SoftDevice header files used by the example.
Flashing SoftDevice with ARM Keil uVision
- Open an example project which is using SoftDevice.
- From list of available targets pick ‘flash_softdevice’.
- Choose ‘Erase’ from ‘Flash’ menu (this step is needed only if SoftDevice was earlier programmed by nRFgo Studio).
- Press ‘Download’ button.
- Switch back to default target and program or debug example application. Note that order of flashing application and SoftDevice is not important.
Flashing SoftDevice with Makefile (GCC)
Flashing SoftDevice using Makefile target works only on Windows platform. It is using command line tool called ‘nrfjprog.exe’ which is a part of the nRF51-Tools package. Location of ‘nrfjprog.exe’ must be in PATH environmental variable.
- Open command line in directory where Makefile is located in example application which is using SoftDevice.
- Type make flash_softdevice. SoftDevice is programmed by ‘nrfjprog’ tool.
- Application can be programmed using command make target_name flash (for example: make nrf51422_xxac_s110 flash). Type make help to list available targets.