Multi-image builds on the nRF5340 DK using child and parent images

Note

This feature is deprecated and is being replaced by Zephyr’s Sysbuild (System build). You can continue to use it until the transition is complete in the nRF Connect SDK and the feature is removed in one of the upcoming nRF Connect SDK releases. For more information, see Sysbuild (System build), Sysbuild images, Using Zephyr samples with sysbuild, and Sysbuild forced options.

If a sample consists of several images (in this case, different images for the application core and for the network core), you can build these images separately or combined as a multi-image build, depending on the sample configuration.

In a multi-image build, the image for the application core is usually the parent image, and the image for the network core is treated as a child image in a separate domain. For this to work, the network core image must be explicitly added as a child image to one of the application core images. See Defining and enabling a child image for details.

Note

When using the nRF5340: Empty firmware for application core sample, the image hierarchy is inverted. In this case, the network core image is the parent image and the application core image is the child image.

Default build configuration

By default, the two images are built together for all Bluetooth LE, Thread, Zigbee, and Matter samples in the nRF Connect SDK. Samples that are designed to run only on the network core include the nRF5340: Empty firmware for application core sample as a child image. For other samples, the images are built separately.

The build configuration depends on the following Kconfig options that must be set in the configuration of the parent image:

The combination of these options determines which (if any) sample is included in the build of the parent image:

Enabled options

Child image sample for the network core

Child image sample for the application core

CONFIG_BT_HCI_IPC

HCI IPC

CONFIG_NRF_802154_SER_HOST

IEEE 802.15.4 over RPMsg

CONFIG_BT_HCI_IPC and CONFIG_NRF_802154_SER_HOST

nRF5340: Multiprotocol RPMsg

CONFIG_NCS_SAMPLE_EMPTY_APP_CORE_CHILD_IMAGE

nRF5340: Empty firmware for application core

Configuration of the child image

When a network sample is built automatically as a child image in a multi-image build, you can define the relevant Kconfig options (if required) in a .conf file. Name the file network_sample*.conf, where network_sample is the name of the child image (for example, hci_ipc.conf). Place the file in a child_image subfolder of the application sample directory. See Image-specific variables for more information.

This way of defining the Kconfig options allows to align the configurations of both images.

For example, see the Bluetooth: Throughput child image configuration in nrf/samples/bluetooth/throughput/child_image/hci_ipc.conf.