Configuring placement of the SoftDevice

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

Note:

If your application does not use a SoftDevice, you can skip this step.

If you are using a SEGGER Embedded Studio (SES) project from nRF5 SDK v14.2.0 or later, the placement of the SoftDevice is already configured correctly and you can skip this step.

If your application requires a SoftDevice, the flash and SRAM position where the compiled binary will be placed must be configured as follows:

  1. In SES, right-click your project and select Edit Options.
  2. Select Linker.
  3. In the Section Placement Macros field, add values for FLASH_START and SRAM_START.
    To find the correct values, check the Keil project that you imported (in Keil µVision, select Options for Target > Target), or program the firmware with approximate values, run it, and check the log output in the debug terminal for the recommended values.
    For example, when running the ble_app_uart example application from nRF5 SDK v12.3.0 on PCA10028 with SoftDevice S130 v2.0.1, specify the section placement macros as shown:
    Linker macros
  4. Select Build > Rebuild project_target to rebuild the project.
    Alternatively, press ALT + F7.
    The output should now look similar to this, with space reserved for the SoftDevice:
    Reserved space
  5. Right-click your project and select Edit Options.
  6. Select Preprocessor.
  7. Add the definition NO_VTOR_CONFIG to the Preprocessor Definitions.
    This definition tells SES to expect a SoftDevice to be present that will forward exceptions and interrupts to the application.
    Preprocessor definitions
  8. In the Debug section of the project options, select Loader.
  9. Add the absolute path to the SoftDevice to the Additional Load File[0] field, for example, ../../../../../../components/softdevice/s130/hex/s130_nrf51_2.0.1_softdevice.hex.
    Add SoftDevice to additional load files