Skip to content

BSP Example


The Board Support Package (BSP) Example shows how to use the Board Support Package (BSP) module.

In this example, when the USER button is pressed, this callback function will change the BSP state and then configure BSP indicators to the required state.


Before you start building, remember to set up the nRF5 SDK development environment first. See Setup the nRF5 SDK for details.

Building the example

The source code and the project file of the example are located in the following folder: examples/nrf5-sdk/bsp.

Open terminal and navigate to the directory with the example Makefile:

cd ./examples/nrf5-sdk/bsp/armgcc

Run make to build the example:


Programming the firmware

After compiled, the firmware is located in bsp/armgcc/_build with the name nrf52840_xxaa.hex.

Connect the debugger USB port to your PC using the provided USB-C Cable. A disk drive called M2-DOCK will be automatically detected by the computer.

Run the following command in blinky/armgcc to program the board:

make flash_all


See Programming section for details about how to program the nRF52840 M.2 Module.


Test the example by performing the following steps:

  1. Run a terminal application like PuTTY or screen:

    screen /dev/cu.usbmodem14102 115200
  2. Press the USER button and observe the LEDs and output of the terminal.

Create an Issue

Interested in contributing to this project? Want to report a bug? Feel free to click here: