Compiling the application

The nRF5 SDK provides example projects for Keil µVision, so compiling the application is very straightforward.

  1. In the nRF5 SDK directory, navigate to the folder that contains the example project that you want to run.
    For a first test, select the ble_app_uart example. It is located in the SDK_dir\examples\ble_peripheral\ble_app_uart\pca_number\SoftDevice\arm5_no_packs folder, where pca_number is the PCA number and SoftDevice is the SoftDevice that you use. For example, for an nRF52 DK for nRF52832, go to the following folder:

    SDK_dir\examples\ble_peripheral\ble_app_uart\pca10040\s132\arm5_no_packs

  2. Double-click the .uvprojx file to open the project in Keil.
  3. If Keil prompts you to install the nRF_DeviceFamilyPack (also known as nRF5 MDK), accept and install the Device Family Pack.
  4. If you are not using PCA10028 (nRF51 DK) or PCA10040 (nRF52 DK), define the correct kit in the project.
    1. Go to Projects > Options for Target or click the shortcut.
      Options for target
    2. In the C/C++ tab, change the BOARD_PCA10028 define to the kit that you are using.
      See the components\boards\boards.h file for a list of supported kits.
  5. Compile all files by clicking the build button.
    Build target files