Skip to content

How to work with boards and devices

The extension provides a variety of GUI options to interact with connected boards and devices. These options cover all required actions, from adding a custom device, linking boards to a build configuration, to flashing.

How to add a custom board

If you have a custom board, complete the following steps to add it to the list of the boards:

  1. Click Create a new board from the Welcome View.
    The Create New Board screen appears.

    Create New Board screen

  2. Enter your custom board information.
    See the tooltips next to the field names for more information.

  3. Click Create Board.
    The board files are added to the board root folder path you provided.

After the board is created, you can select it from the Add Build Configuration screen when you build an application.

The extension tracks the new custom board entries using the nrf-connect.boardRoots configuration setting.

To link a connected board to a build configuration, click on the button next to your selected build configuration. Once the device is linked, the icon of the button changes to indicate the link.

Link device

Performing actions such as Flash on a build configuration with a linked device will always perform the action on that linked device.

How to connect to a device

The nRF Connect extension pack includes an integrated serial port and RTT terminal, which allows you to connect and flash a board using either method.

To connect to a device:

  1. Plug the device into the same machine you are using to run the extension.
    The device appears in the Connected Device View.
  2. Connect to a device using one of the following buttons with a plug icon in the Connected Devices View:

    • Click the button to the right of the serial port entry to start a serial connection.
    • Click the button to the right of the RTT entry to connect over RTT.

    Button for starting a serial port connection in a terminal

How to flash boards

To flash a build configuration onto one device, complete the following steps:

  1. Make sure your board is connected to your machine.
  2. Click on the Flash option from the Actions View.
  3. If you have multiple boards connected, pick a device to flash when a prompt appears at the top of the screen.

Once the flashing starts, a small notification banner appears in the bottom right corner of VS Code to display the progress and confirm when the flashing is complete.

How to flash boards after changing an application

If you make any modification to your application, use one of the following options to flash your board:

  1. Depending on the type of changes:

    • If you only changed some code in your application, use Build from the Actions View.
    • If you have added or removed configuration files, use the Pristine Build option to the right of Build.
  2. Click on Flash to flash to the board again.

How to flash multiple build configurations

To flash multiple build configurations in parallel, use one of the following methods:

  • Use the nRF Connect: Flash All Linked Devices command.
  • Click the icon located in the Applications View Actions.

This will flash all linked build configurations. This feature is not available if a board is linked to more than one build configuration.

Flash all build configurations

How to customize flashing actions

You can use the following customization options with the flashing action: