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:
CONFIG_BT_HCI_IPC
- set toy
in all Bluetooth LE samples for the application coreCONFIG_NRF_802154_SER_HOST
- set toy
in all Thread, Zigbee, and Matter samples for the application coreCONFIG_NCS_SAMPLE_EMPTY_APP_CORE_CHILD_IMAGE
- set toy
in all network core samples that require the nRF5340: Empty firmware for application core sample
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 |
---|---|---|
— |
||
— |
||
— |
||
— |
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
.