The Build Configuration page is where you can set up and edit configuration parameters for your applications. You can access this page by clicking the Add Build Configuration button next to the application name or by using the Edit Build Configuration button.
The page includes different configuration fields. The following table provides a short overview of each of these options:
| Field | Description |
|---|---|
| CMake Presets | Select a CMake preset from the list of build configurations you have saved as presets. If you saved none, this menu is hidden. |
| SDK | Select an installed nRF Connect SDK version to use for the application. The pre-selected version is always the last one used. If you change the SDK or the toolchain (or both), the extension runs a validation check, which you can also run manually (Manage toolchains > Validate toolchain). This will check for incompatibility issues, which will be listed in a notification. |
| Toolchain | Select an installed toolchain version to use for the application. The pre-selected version is always the last one used. If you change the SDK or the toolchain (or both), the extension runs a validation check, which you can also run manually (Manage toolchains > Validate toolchain). This will check for incompatibility issues, which will be listed in a notification. |
| Board target | Select target hardware platform from among Compatible, Nordic SoCs, Nordic Development Kits, or All. - The Compatible supported boards are also listed in the application or sample documentation in the nRF Connect SDK, in the Requirements section of each application or sample documentation page. - The icon next to the board target indicates its support status within the SDK. The status descriptions come from the SDK and are available from the nRF Connect SDK v3.4.0. The descriptions are also listed in the Visual Studio Code's Problems panel. - If you want to use a new custom board, make sure to add the new board first. - Specifying the board revision is optional. |
| Revision | This optional field is greyed out until you select a board that has revisions. In such cases: - If you specify the board revision in this field, then its value will be passed to the west build command using the <board>@<revision> syntax.- If you leave the field blank, the build system will match the revision to the best available board revision configuration files. If there is a discrepancy, the build system will set the available board revision as active. |
| Base configuration files | Select the Kconfig configuration file. With no file selected, the build system will autoselect the file. |
| Extra Kconfig fragments | Select a file with extra Kconfig configuration options to be applied over the base configuration files. |
| Base Devicetree overlays | Select Devicetree overlays. With no file selected, the build system will autoselect the file. |
| Extra Devicetree overlays | Select extra Devicetree overlays that will extend the base devicetree overlays. |
| Snippets | Snippets provide a way to save common build system settings in one place and apply them to any Zephyr or nRF Connect SDK application. In the nRF Connect SDK, predefined snippets are located in the nrf/snippets directory or in subdirectories of single samples or applications. |
| Optimization level | Select one of the options to optimize your build for a specific purpose. Each of these options extends the build command with corresponding CMake variables from the CONFIG_COMPILER_OPTIMIZATIONS Kconfig group. These are applied on top of the Kconfig options set for your application. If you Optimize for debugging, you can use debugging features with the nrf-connect debug type and see the memory content in the Memory Explorer.For more information, see Debugging concepts and How to enable debugging. |
| Include debug thread information | When enabled, debugging information about threads is added to your build. You can also see thread information in the Thread Viewer, but only if you also select the Optimize for debugging optimization level. For more information, see Debugging concepts and How to enable debugging. |
| Extra CMake arguments | Pass extra CMake arguments to the invocation performed by west build. Use the -DMACRO=value format.For example: -DCONFIG_DEBUG_THREAD_INFO=y |
| Build directory name | Enter a custom name for the build directory or browse to select a folder. This option is only available when you are adding the build configuration. It is not available when editing an existing build configuration. |
| Generate only | Select to only generate build system configuration files, without building the final binaries. This option is always deselected by default. When selected, it changes the button at the bottom of the page to Generate. Checking this setting is not saved persistently, so you need to select it every time you add or edit the build configuration settings if you want to skip the generation of the final binaries. |
| Sysbuild | Sysbuild is a high level build system for combining multiple build images or domains. In the nRF Connect SDK, sysbuild is enabled by default, while in Zephyr it is not. You can select the build system default or choose to explicitly use --sysbuild or --no-sysbuild for your build configuration.Sysbuild is recommended for applications for multiple cores or domains. See also How to work with sysbuild domains. (Sysbuild is available in the nRF Connect SDK from the v2.7.0 release.) |
| Generate and Build or Generate | Click the button to generate and build the configuration. If you select Generate only, the button changes to Generate. |