Skip to content

Commit 5d6e0d7

Browse files
committed
tests: benchmarks: multicore: Test idle benchmarks with MCUBoot
Add testing configuration with MCUBoot enabled for the idle benchmarks. Signed-off-by: Bartosz Miller <[email protected]>
1 parent d185e0f commit 5d6e0d7

File tree

12 files changed

+161
-13
lines changed

12 files changed

+161
-13
lines changed

tests/benchmarks/multicore/idle/sysbuild.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ set_property(GLOBAL APPEND PROPERTY PM_CPUNET_IMAGES remote)
2020
set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET remote)
2121
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION remote CACHE INTERNAL "")
2222

23+
if(SB_CONFIG_BOOTLOADER_MCUBOOT AND SB_CONFIG_SOC_NRF54H20)
24+
set_target_properties(remote PROPERTIES
25+
IMAGE_CONF_SCRIPT ${ZEPHYR_BASE}/share/sysbuild/image_configurations/MAIN_image_default.cmake
26+
)
27+
UpdateableImage_Add(APPLICATION remote)
28+
endif()
29+
2330
# Add a dependency so that the remote image will be built and flashed first
2431
add_dependencies(${DEFAULT_IMAGE} remote)
2532
# Add dependency so that the remote image is flashed first.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_LOG=n
2+
CONFIG_SERIAL=n
3+
4+
CONFIG_PM=y
5+
CONFIG_PM_S2RAM=y
6+
CONFIG_PM_S2RAM_CUSTOM_MARKING=y

tests/benchmarks/multicore/idle/testcase.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,39 @@ tests:
124124
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption"
125125
tags: ppk_power_measure
126126

127+
benchmarks.multicore.idle.nrf54h20dk_cpuapp_cpurad.s2ram.mcuboot:
128+
platform_allow:
129+
- nrf54h20dk/nrf54h20/cpuapp
130+
integration_platforms:
131+
- nrf54h20dk/nrf54h20/cpuapp
132+
extra_args:
133+
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf
134+
- CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y
135+
- CONFIG_FIRST_SLEEP_OFFSET=y
136+
- CONFIG_PM=y
137+
- CONFIG_PM_S2RAM=y
138+
- CONFIG_POWEROFF=y
139+
- CONFIG_PM_S2RAM_CUSTOM_MARKING=y
140+
- CONFIG_CONSOLE=n
141+
- CONFIG_UART_CONSOLE=n
142+
- CONFIG_SERIAL=n
143+
- CONFIG_GPIO=n
144+
- CONFIG_BOOT_BANNER=n
145+
- remote_CONFIG_PM=y
146+
- remote_CONFIG_POWEROFF=y
147+
- remote_CONFIG_CONSOLE=n
148+
- remote_CONFIG_UART_CONSOLE=n
149+
- remote_CONFIG_SERIAL=n
150+
- remote_CONFIG_GPIO=n
151+
- remote_CONFIG_BOOT_BANNER=n
152+
- SB_CONFIG_BOOTLOADER_MCUBOOT=y
153+
harness: pytest
154+
harness_config:
155+
fixture: lfclk_at_lfxo
156+
pytest_root:
157+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption"
158+
tags: ppk_power_measure
159+
127160
benchmarks.multicore.idle.nrf54h20dk_cpuapp_cpurad.s2ram.fpu:
128161
platform_allow:
129162
- nrf54h20dk/nrf54h20/cpuapp

tests/benchmarks/multicore/idle_spim/sysbuild.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,11 @@ if(SB_CONFIG_SOC_NRF54H20)
1212
BOARD ${SB_CONFIG_BOARD}/${SB_CONFIG_SOC}/cpurad
1313
BOARD_REVISION ${BOARD_REVISION}
1414
)
15+
16+
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
17+
set_target_properties(remote PROPERTIES
18+
IMAGE_CONF_SCRIPT ${ZEPHYR_BASE}/share/sysbuild/image_configurations/MAIN_image_default.cmake
19+
)
20+
UpdateableImage_Add(APPLICATION remote)
21+
endif()
1522
endif()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_LOG=n
2+
CONFIG_SERIAL=n
3+
4+
CONFIG_PM=y
5+
CONFIG_PM_S2RAM=y
6+
CONFIG_PM_S2RAM_CUSTOM_MARKING=y

tests/benchmarks/multicore/idle_spim/testcase.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@ tests:
2323
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_spim"
2424
timeout: 90
2525

26+
benchmarks.multicore.idle_spim.nrf54h20dk_cpuapp_cpurad.s2ram.mcuboot:
27+
tags:
28+
- ci_build
29+
- ci_tests_benchmarks_multicore
30+
- spim
31+
- ppk_power_measure
32+
filter: not CONFIG_COVERAGE
33+
harness: pytest
34+
platform_allow:
35+
- nrf54h20dk/nrf54h20/cpuapp
36+
integration_platforms:
37+
- nrf54h20dk/nrf54h20/cpuapp
38+
extra_args:
39+
- SHIELD=pca63566
40+
- SB_CONFIG_BOOTLOADER_MCUBOOT=y
41+
- mcuboot_EXTRA_DTC_OVERLAY_FILE="${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/multicore/idle_spim/boards/nrf54h20dk_nrf54h20_cpuapp.overlay"
42+
harness_config:
43+
fixture: pca63566
44+
pytest_root:
45+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_spim"
46+
timeout: 90
47+
2648
benchmarks.multicore.idle_spim.nrf54h20dk_cpuapp_cpurad.coverage:
2749
tags:
2850
- ci_build

tests/benchmarks/multicore/idle_twim/sysbuild.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ ExternalZephyrProject_Add(
1515
BOARD ${SB_CONFIG_REMOTE_BOARD}
1616
BOARD_REVISION ${BOARD_REVISION}
1717
)
18+
19+
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
20+
set_target_properties(remote PROPERTIES
21+
IMAGE_CONF_SCRIPT ${ZEPHYR_BASE}/share/sysbuild/image_configurations/MAIN_image_default.cmake
22+
)
23+
UpdateableImage_Add(APPLICATION remote)
24+
endif()
1825

1926
# Add a dependency so that the remote image will be built and flashed first
2027
add_dependencies(idle_twim remote)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_LOG=n
2+
CONFIG_SERIAL=n
3+
4+
CONFIG_PM=y
5+
CONFIG_PM_S2RAM=y
6+
CONFIG_PM_S2RAM_CUSTOM_MARKING=y

tests/benchmarks/multicore/idle_twim/testcase.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ tests:
2525
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_twim_gated"
2626
timeout: 90
2727

28+
benchmarks.multicore.idle_twim.nrf54h20dk_cpuapp_cpurad.s2ram.mcuboot:
29+
tags:
30+
- ci_build
31+
- ci_tests_benchmarks_multicore
32+
- twim
33+
- ppk_power_measure
34+
filter: not CONFIG_COVERAGE
35+
harness: pytest
36+
platform_allow:
37+
- nrf54h20dk/nrf54h20/cpuapp
38+
integration_platforms:
39+
- nrf54h20dk/nrf54h20/cpuapp
40+
extra_args:
41+
- SHIELD=pca63566
42+
- SB_CONFIG_BOOTLOADER_MCUBOOT=y
43+
- mcuboot_EXTRA_DTC_OVERLAY_FILE="${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/multicore/idle_twim/boards/nrf54h20dk_nrf54h20_cpuapp.overlay"
44+
harness_config:
45+
fixture: pca63566
46+
pytest_root:
47+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_twim_gated"
48+
timeout: 90
49+
2850
benchmarks.multicore.idle_twim.nrf54h20dk_cpuapp_cpurad.coverage:
2951
tags:
3052
- ci_build

tests/benchmarks/multicore/idle_uarte/sysbuild.cmake

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,23 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
if(SB_CONFIG_SOC_NRF54H20)
8-
if(SB_CONFIG_REMOTE_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING)
9-
set(REMOTE_SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/multicore/common/remote_gdf_switching)
10-
else()
11-
set(REMOTE_SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/power_consumption/common/remote_sleep_forever)
12-
endif()
7+
if(SB_CONFIG_REMOTE_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING)
8+
set(REMOTE_SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/multicore/common/remote_gdf_switching)
9+
else()
10+
set(REMOTE_SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/power_consumption/common/remote_sleep_forever)
11+
endif()
12+
13+
# Add remote project
14+
ExternalZephyrProject_Add(
15+
APPLICATION remote
16+
SOURCE_DIR ${REMOTE_SOURCE_DIR}
17+
BOARD ${SB_CONFIG_BOARD}/${SB_CONFIG_SOC}/cpurad
18+
BOARD_REVISION ${BOARD_REVISION}
19+
)
1320

14-
# Add remote project
15-
ExternalZephyrProject_Add(
16-
APPLICATION remote
17-
SOURCE_DIR ${REMOTE_SOURCE_DIR}
18-
BOARD ${SB_CONFIG_BOARD}/${SB_CONFIG_SOC}/cpurad
19-
BOARD_REVISION ${BOARD_REVISION}
21+
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
22+
set_target_properties(remote PROPERTIES
23+
IMAGE_CONF_SCRIPT ${ZEPHYR_BASE}/share/sysbuild/image_configurations/MAIN_image_default.cmake
2024
)
25+
UpdateableImage_Add(APPLICATION remote)
2126
endif()

0 commit comments

Comments
 (0)