How to work with multiple build configurations - nRF Connect for VS Code
Skip to content

How to work with multiple build configurations

An application can have several build configurations that represent different CMake build systems. At any given time, you can only have one build configuration (and thus application) active.

You can create multiple build configurations for an application using the same setup steps as for setting up a single build configuration. The additional build configuration appears under the selected application. The active build configuration is indicated by the blue color of its icon in the treeview.

Applications with several build configurations

How to build multiple configurations

Each single build configuration is automatically built when you set up a build configuration with the Build after generating configuration checkbox option selected. However, when you have several build configurations, you can build them all at once. The extension offers a couple of options to do this, as described in the following sections.

How to build in the current workspace

To build several build configurations in the current workspace at once, use the Build All Configurations button, located in the Toolbar of the Applications View.

Build All Configurations

This will sequentially build all configurations for all existing applications in the current workspace.

Alternatively, you can use the nRF Connect: Build All Configurations command from Command Palette.

How to build within a specific application

To build several build configurations for one application at once, complete the following steps:

  1. Click on that application name within the Applications View.
  2. Hover to the right and click on Build All Configurations for Application.

    Build All Configurations for Application

All build configurations for the given application in a sequence.

How to flash multiple build configurations

To flash multiple build configurations at the same time, complete the following steps:

  1. Link each build configuration to one device of your choice.
  2. Flash the build configurations by using one of the following methods:

    • Click on the Flash All Linked Devices button from the Global actions in the Applications View.
    • Use the nRF Connect: Flash All Linked Devices command from Command Palette.

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

Flash all build configurations

To flash a single build configuration, use the Flash action in the Actions View after connecting the device to the terminal.