Creating Projects for the Nordic nRF52840 Chip with VisualGDB

This tutorial shows how to create a basic project for the nRF52840 chip using VisualGDB. We will create a basic “Blinking LED” project based on the example from the Nordic SDK and show how to build and debug it.

  1. Open the VisualGDB Embedded Project Wizard and select the MSBuild subsystem:03-msb
  2. On the next page select the nRF52840_XXAA device and enable the “Provide default stubs for system calls” checkbox:04-device
  3. On the next page select a sample. We recommend starting with the LEDBlink (BSP) sample to test out the board connectivity before trying anything more complex. Select the PCA10056 board type that corresponds to the nRF52840 development kit:05-pca10056
  4. Install Segger J-Link software, then select “Segger J-Link” on the Debug Method page and press “Finish” to generate the project:06-debug
  5. Now you can build the project with Ctrl-Shift-B:07-build
  6. Press F5 to begin debugging. Observe how the 4 LEDs on the board are blinking:board
  7. Set a breakpoint somewhere in the main loop to quickly check that breakpoints and stepping work:08-bkpt
  8. Now you can try creating projects based on more complex samples. Keep in mind that the Alpha release of the SDK is unstable and some of the examples may not work. E.g. in our tests the BLE Mouse example did not work on the nRF52832 chip and only worked first time after erasing bonds on nRF52840.