Skip to content

Commit e202838

Browse files
committed
ironside: Generate periphconf from Zephyr images instead of sysbuild
Rewrite the periphconf CMake code to have each individual Zephyr image generate periphconf instead of doing it from the sysbuild image. This aligns better with how upstream has moved gen_uicr.py out of SYSBUILD. Also, add a sample that uses this infrastructure. Signed-off-by: Sebastian Bøe <[email protected]>
1 parent 3a7a3f9 commit e202838

File tree

26 files changed

+347
-89
lines changed

26 files changed

+347
-89
lines changed

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,3 @@ add_subdirectory(subsys)
3535
add_subdirectory(modules)
3636
add_subdirectory(drivers)
3737
add_subdirectory(tests)
38-
39-
# TEMPHACK: Add a source file generated by cmake/sysbuild/periphconf_migrate.cmake
40-
if(SYSBUILD AND CONFIG_NRF_HALTIUM_GENERATE_UICR)
41-
file(TOUCH ${APPLICATION_BINARY_DIR}/../periphconf_migrated.c)
42-
zephyr_sources(${APPLICATION_BINARY_DIR}/../periphconf_migrated.c)
43-
endif()

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@
527527
/samples/nrf5340/empty_app_core/ @nrfconnect/ncs-si-muffin
528528
/samples/nrf5340/extxip_smp_svr/ @nrfconnect/ncs-pluto
529529
/samples/nrf54h20/empty_app_core/ @nrfconnect/ncs-aurora
530+
/samples/ironside_se/ @nrfconnect/ncs-aurora
530531
/samples/nrf_compress/ @nordicjm
531532
/samples/nrf_profiler/ @nrfconnect/ncs-si-bluebagel
532533
/samples/nrf_rpc/protocols_serialization/ @nrfconnect/ncs-protocols-serialization
@@ -637,6 +638,7 @@
637638
/samples/event_manager_proxy/*.rst @nrfconnect/ncs-si-muffin-doc
638639
/samples/gazell/**/*.rst @nrfconnect/ncs-si-muffin-doc
639640
/samples/hw_id/*.rst @nrfconnect/ncs-cia-doc
641+
/samples/ironside_se/**/*.rst @nrfconnect/ncs-aurora-doc
640642
/samples/ipc/ipc_service/*.rst @nrfconnect/ncs-si-muffin-doc
641643
/samples/keys/**/*.rst @nrfconnect/ncs-aegir-doc
642644
/samples/matter/**/*.rst @nrfconnect/ncs-matter-doc

cmake/sysbuild/periphconf_migrate.cmake

Lines changed: 0 additions & 66 deletions
This file was deleted.

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,8 @@ Wi-Fi samples
472472
Other samples
473473
-------------
474474

475+
* Added the :ref:`secondary_boot_sample` sample that demonstrates how to build and boot a secondary application image on the nRF54H20 DK.
476+
475477
* :ref:`nrf_profiler_sample` sample:
476478

477479
* Added a new testing step demonstrating how to calculate event propagation statistics.

doc/nrf/samples/other.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ This section lists single |NCS| samples for various uses that are not part of ot
2121
../../../samples/mpsl/*/README
2222
../../../samples/benchmarks/*/README
2323
../../../samples/nrf_compress/*/README
24+
../../../samples/ironside_se/*/README
2425
../../../tests/benchmarks/multicore/*/README
2526
../../../samples/zephyr/smp_svr_mini_boot/README
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
cmake_minimum_required(VERSION 3.13.1)
8+
9+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10+
11+
project(secondary_boot_primary)
12+
13+
target_sources(app PRIVATE
14+
src/main.c
15+
)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.. _secondary_boot_sample:
2+
3+
Secondary boot
4+
##############
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
This sample demonstrates how to boot a secondary application image on the nRF54H20 DK board, where both the primary and secondary application images print ``Hello World`` messages.
11+
12+
Overview
13+
********
14+
15+
The sample consists of two applications:
16+
17+
* *Primary Image*: Runs initially on the application core (``cpuapp``), prints a ``Hello World`` message, and includes stub functions for the Secure Domain service calls to boot the secondary image.
18+
19+
* **Secondary Image**: Runs on the same application core (cpuapp/secondary) after the primary image initiates the boot sequence and prints its own hello world message.
20+
21+
Requirements
22+
************
23+
24+
The sample supports the following development kit:
25+
26+
.. table-from-sample-yaml::
27+
28+
Building and running
29+
********************
30+
31+
.. |sample path| replace:: :file:`samples/ironside_se/secondary_boot_gen_uicr`
32+
33+
.. include:: /includes/build_and_run_ns.txt
34+
35+
To build the sample for the nRF54H20 DK, run the following command:
36+
37+
.. code-block:: console
38+
39+
west build -b nrf54h20dk/nrf54h20/cpuapp samples/secondary_boot --sysbuild
40+
41+
The ``--sysbuild`` flag is required as this sample builds multiple images.
42+
43+
To program the sample on the device, run the following command:
44+
45+
.. code-block:: console
46+
47+
west flash
48+
49+
Sample output
50+
*************
51+
52+
When the sample runs successfully, you should see output similar to the following:
53+
54+
.. code-block:: console
55+
56+
[00:00:00.123,456] === Hello World from Primary Image ===
57+
[00:00:00.456,789] === Hello World from Secondary Image ===
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# Enable console and UART
8+
CONFIG_CONSOLE=y
9+
CONFIG_UART_CONSOLE=y
10+
11+
# Enable printk
12+
CONFIG_PRINTK=y
13+
14+
CONFIG_NRF_IRONSIDE_BOOTMODE_SERVICE=y
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
sample:
2+
name: Secondary Boot Sample
3+
description: |
4+
Sample demonstrating secondary application image boot on nRF54H20DK.
5+
The primary image prints hello world, calls stub functions for UICR
6+
update and secure domain service to boot the secondary image. The
7+
secondary image prints its own hello world message.
8+
9+
common:
10+
sysbuild: true
11+
harness: console
12+
harness_config:
13+
type: multi_line
14+
regex:
15+
- "=== Hello World from Primary Image ==="
16+
- "=== Hello World from Secondary Image ==="
17+
18+
tests:
19+
samples.secondary_boot.nrf54h20dk:
20+
tags:
21+
- sysbuild
22+
- ci_samples_secondary_boot
23+
platform_allow:
24+
- nrf54h20dk/nrf54h20/cpuapp
25+
integration_platforms:
26+
- nrf54h20dk/nrf54h20/cpuapp
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
3+
4+
cmake_minimum_required(VERSION 3.13.1)
5+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
6+
project(secondary_boot_secondary)
7+
8+
# Create empty marker file at configure-time
9+
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/is_secondary_firmware.txt "")
10+
11+
target_sources(app PRIVATE src/main.c)

0 commit comments

Comments
 (0)