Build and configuration system

The nRF Connect SDK build and configuration system is based on the one from Zephyr, with some additions.

Zephyr’s build and configuration system

Zephyr’s build and configuration system uses the following building blocks as a foundation:

  • CMake, the cross-platform build system generator.

  • Kconfig, a powerful configuration system also used in the Linux kernel.

  • Devicetree, a hardware description language that is used to describe the hardware that the nRF Connect SDK is meant to run on.

Since the build and configuration system used by the nRF Connect SDK comes from Zephyr, references to the original Zephyr documentation are provided here in order to avoid duplication. See the following links for information about the different building blocks mentioned above:

nRF Connect SDK additions

The nRF Connect SDK adds some functionality on top of the Zephyr build and configuration system. Those additions are automatically included into the Zephyr build system using a Zephyr Build Configuration CMake packages.

You must be aware of these additions when you start writing your own applications based on this SDK.

  • The Kconfig option CONFIG_WARN_EXPERIMENTAL is enabled by default. It gives warnings at CMake configure time if any experimental feature is enabled.

    For example, when building a sample that enables CONFIG_BT_EXT_ADV, the following warning is printed at CMake configure time:

    warning: Experimental symbol BT_EXT_ADV is enabled.

    For more information, see Software maturity levels.

  • The nRF Connect SDK provides an additional boilerplate.cmake file that is automatically included when using the Zephyr CMake package in the CMakeLists.txt file of your application:

    find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
  • The nRF Connect SDK allows you to create custom build type files instead of using a single prj.conf file.

  • The nRF Connect SDK build system extends Zephyr’s with support for multi-image builds. You can find out more about these in the Multi-image builds section.

  • The nRF Connect SDK adds a Partition Manager, responsible for partitioning the available flash memory.

  • The nRF Connect SDK build system generates zip files containing binary images and a manifest for use with nRF Cloud FOTA.

nRF Connect SDK configuration tools

The nRF Connect for VS Code extension provides the following configuration tools for the build system components: