Secondary boot
This sample demonstrates how to boot a secondary application image on the nRF54H20 DK, where both the primary and secondary application images print Hello World messages.
Requirements
The sample supports the following development kit:
Hardware platforms |
PCA |
Board name |
|
|---|---|---|---|
PCA10175 |
|
Overview
The sample consists of two applications:
Primary Image: Runs initially on the application core (
cpuapp), prints aHello Worldmessage, and includes stub functions for the Secure Domain service calls to boot the secondary image.Secondary Image: Runs on the same application core after the primary image initiates the boot sequence and prints its own
Hello Worldmessage.
Building and running
This sample can be found under samples/ironside_se/secondary_boot_gen_uicr in the nRF Connect SDK folder structure.
For more security, it is recommended to use the */ns variant of the board target (see the Requirements section above.)
When built for this variant, the sample is configured to compile and run as a non-secure application using security by separation.
Therefore, it automatically includes Trusted Firmware-M that prepares the required peripherals and secure services to be available for the application.
To build the sample, follow the instructions in Building an application for your preferred building environment. See also Programming an application for programming steps and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.
Note
When building repository applications in the SDK repositories, building with sysbuild is enabled by default.
If you work with out-of-tree freestanding applications, you need to manually pass the --sysbuild parameter to every build command or configure west to always use it.
To build the sample for the nRF54H20 DK, run the following command:
west build -b nrf54h20dk/nrf54h20/cpuapp samples/secondary_boot
To program the sample on the device, run the following command:
west flash
Testing
After programming the test to your development kit, complete the following steps to test it:
Connect to the kit with a terminal emulator (for example, the Serial Terminal app). See Testing and optimization for the required settings and steps.
Reset the kit.
Observe the console output for both cores:
[00:00:00.123,456] === Hello World from Primary Image ===
[00:00:00.456,789] === Hello World from Secondary Image ===
Dependencies
This sample uses the following nRF Connect SDK subsystems:
IronSide SE bootmode service - Provides the interface to boot into secondary firmware mode
Sysbuild - Enables building multiple images in a single build process
UICR generation - Configures the User Information Configuration Registers for secondary boot mode
In addition, it uses the following Zephyr subsystems: