How to debug an NRF5x with an Arduino project and GDB?

 FAQ    |    [No Additional USB Drivers Needed on Windows 10]

NRF5x based boards (such as the BBC Micro:Bit) are now available out of the box for debugging in vMicro, through external debuggers.

External Debug Interface: CMSIS-DAP

External Debugger Connections

Simply connect the USB lead to your board, no further connections are required!

GDB Connections for the BBC Micro:Bit

Software Setup

Ensure you have Visual Studio and the vMicro Extension Installed

Open your Sketch and select the Debug > Hardware, and the CMSIS-DAP (Built-In) Debugger as shown below:

NRF5x Debug Toolbar Settings

Start Debugger

  1. Ensure you have the Debug Configuration selected from the Configuration Manager Window
  2. If you know where you want the first breakpoint in your code, add it now
  3. To start the debugging process, you can either:
    • "Debug > Attach to Process" button if your code has already been uploaded to the NRF5x board
    • "Debug > Start Debugging" if your code has not been uploaded

NRF5x Debugging BBC Micro:Bit Arduino Sketch in vMicro and Visual Studio

Congratulations - you should have the debugger running, and further windows can be opened from the "Debug > Windows" menu once you have started debugging