nRF51 SDK v9.0.0
Running a first example

You should start by running a very simple example that does not use a SoftDevice, for example the Blinky Example.

Make sure that you have all required tools installed. See section 3 (Getting started) in the nRF51 Development Kit User Guide for detailed instructions.

The steps for running the example differ depending on if you use the zip archive of the SDK or CMSIS Packs.

Zip archive

If you use the zip archive of the SDK, perform the following steps to run the example:

  1. Navigate to the folder that contains the example project:
    1. Open the folder that contains the SDK files, thus the folder where you extracted the SDK zip file.
    2. Select the example that you want to run, for example, ...\examples\peripheral\blinky.
    3. Select the board that you want to use, for example, ...\pca10028.
    4. If you want to run the example with a SoftDevice, select the SoftDevice. Otherwise, select blank. So for running the Blinky Example without a SoftDevice, select ...\blank.
    5. Select the toolchain that you want to use. The following steps assume that you are using Keil 5 without packs, so select ...\arm5_no_packs.

      gs_example_location_51.png
      Navigate to the example project

  2. Double-click the uvprojx file to open the project in Keil.
  3. Build the project to compile all files.

    gs_build_project_51.png
    Rebuild all target files

  4. Download the code to flash memory to flash the project to the board. If Keil prompts you to update to the latest firmware version, select Yes.

    gs_download_code_51.png
    Download code to flash memory

  5. Test the example as described in the Testing section of the example documentation (Testing Blinky).

CMSIS Packs

If you use CMSIS Packs, perform the following steps to run the example:

  1. In Keil, open the Pack Installer.

    gs_pack_installer_51.png
    Open the Pack Installer

  2. In the left pane, select the Examples tab.
  3. In the right pane, select Nordic Semiconductor to filter the examples that are displayed in the left pane and display only Nordic Semiconductor examples. You can also filter by boards by selecting the desired board on the Boards tab.
  4. In the left pane, locate the example that you want to run, for example blinky_blank_pca10028.
  5. Click the Copy button next to the example.

    gs_pack_copy_example_51.png
    Copy the example

  6. In the window that is displayed, enter the folder where you want to store the example code and select both options.
  7. Click OK. The project is copied to the directory that you specified and opened in Keil.
  8. Build the project to compile all files.

    gs_build_project_51.png
    Rebuild all target files

  9. Download the code to flash memory to flash the project to the board. If Keil prompts you to update to the latest firmware version, select Yes.

    gs_download_code_51.png
    Download code to flash memory

  10. Test the example as described in the Testing section of the example documentation (Testing Blinky).

This document was last updated on Thu Jul 9 2015.
Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone.