Skip to main content

Compiling the Software

Prerequisite

Make sure the Toolchain is set up as described.


Adding a Build Configuration

  1. Open VS Code with the nRF Connect extension.

  2. In the nRF Connect sidebar, under Application, select app.

  3. Click Add build configuration.

    • Target:
      Select the board or target you want to compile for.

    • Extra Kconfig fragments:
      Add any required Kconfig fragments.

      Example for builds with debug logs (where x is rtt, uart, or usb):
      debug.conf, log_on_x.conf
    • Extra Devicetree overlays:
      Add any required overlay files.

      Example:
      log_on_x.overlay
    • Build Directory (optional):
      You can name the build directory, e.g. build_devkit for the ZSWatch devkit.

  4. Click Generate and Build.


success

Done! Your firmware will be compiled with the selected configuration.

tip

Under Actions in the nRF Connect plugin, you can quickly rebuild, debug, flash, and perform other tasks on your firmware.