Advanced building procedures

You can customize the basic building procedures in a variety of ways, depending on the configuration of your project.

Advanced compiler settings

The application has full control over the build process.

Using Zephyr’s configuration options is the standard way of controlling how the system is built. These options can be found under Zephyr’s menuconfig Build and Link Features > Compiler Options. For example, to turn off optimizations, select CONFIG_NO_OPTIMIZATIONS.

Compiler options not controlled by the Zephyr build system can be controlled through the CONFIG_COMPILER_OPT Kconfig option.

Common sample components for development

Code found in the samples/common are not intended to be used independently, but in addition to other compatible samples for development purposes. For example, the file path samples/common/mcumgr_bt_ota_dfu contains the source for the CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU Kconfig option. This Kconfig option can be used with specific Nordic Semiconductor devices to enable MCUmgr to perform firmware over-the-air (FOTA) updates using Bluetooth® Low Energy.

To learn more about how to use the CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU Kconfig option, see the respective device guides for nRF52 Series and the nRF5340 DK.

Optional build parameters

The parameters and options passed in the command line always take precedence over west config settings.

Here are some of the possible options you can use:

For more information on other optional build parameters, run the west build -h help text command.