Skip to content

Commit 38b0f12

Browse files
committed
[nrf fromlist] samples: cleanup sysbuild/hello_world sample
Remove the prompt for REMOTE_BOARD. REMOTE_BOARD should not be having a prompt or be configurable on command line. Instead REMOTE_BOARD should be defined based on the SoC as this will allow creation of new boards using the same SoC, and thereby be able to build the sample out-of-the-box for any supported SoC. This allows us to remove several single line config files. For SoCs with more than two CPU clusters, such as the nRF54h20, then a choice is provided to select specific core. Remove the REMOTE_BOARD restriction, as this sample will build and run even for single core SoCs, and may be useful for testing other sysbuild multi-image features even for single cores SoCs. Upstream PR #: 95745 Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent b13fb55 commit 38b0f12

12 files changed

+49
-59
lines changed

samples/sysbuild/hello_world/Kconfig.sysbuild

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,34 @@
33

44
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
55

6+
choice REMOTE_NRF54H20_CORE
7+
prompt "Remote nRF54h20 core"
8+
default REMOTE_NRF54H20_CPUFLPR_CORE
9+
depends on SOC_NRF54H20_CPUAPP
10+
11+
config REMOTE_NRF54H20_CPUFLPR_CORE
12+
bool "flpr core"
13+
14+
config REMOTE_NRF54H20_CPUFLPR_XIP_CORE
15+
bool "flpr/xip core"
16+
17+
config REMOTE_NRF54H20_CPUPPR_CORE
18+
bool "ppr core"
19+
20+
config REMOTE_NRF54H20_CPUPPR_XIP_CORE
21+
bool "ppr/xip core"
22+
23+
config REMOTE_NRF54H20_CPURAD_CORE
24+
bool "cpurad"
25+
26+
endchoice
27+
628
config REMOTE_BOARD
7-
string "The board used for remote target"
29+
string
30+
default "$(BOARD)/nrf5340/cpunet" if SOC_NRF5340_CPUAPP
31+
default "$(BOARD)/nrf54l15/cpuflpr" if SOC_NRF54L15_CPUAPP
32+
default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPURAD_CORE
33+
default "$(BOARD)/nrf54h20/cpuppr" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPUPPR_CORE
34+
default "$(BOARD)/nrf54h20/cpuppr/xip" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPUPPR_XIP_CORE
35+
default "$(BOARD)/nrf54h20/cpuflpr" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPUFLPR_CORE
36+
default "$(BOARD)/nrf54h20/cpuflpr/xip" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPUFLPR_XIP_CORE

samples/sysbuild/hello_world/sample.yaml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,75 +18,57 @@ tests:
1818
- nrf5340dk/nrf5340/cpuapp
1919
integration_platforms:
2020
- nrf5340dk/nrf5340/cpuapp
21-
extra_args: SB_CONF_FILE=sysbuild/nrf5340dk_nrf5340_cpunet.conf
2221

2322
sample.sysbuild.hello_world.nrf54h20dk_cpuapp_cpurad:
2423
platform_allow:
2524
- nrf54h20dk/nrf54h20/cpuapp
2625
integration_platforms:
2726
- nrf54h20dk/nrf54h20/cpuapp
2827
extra_args:
29-
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf
28+
- SB_CONFIG_REMOTE_NRF54H20_CPURAD_CORE=y
3029
- hello_world_CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y
3130
sample.sysbuild.hello_world.nrf54h20dk_cpuapp_cpuppr:
3231
platform_allow:
3332
- nrf54h20dk/nrf54h20/cpuapp
3433
integration_platforms:
3534
- nrf54h20dk/nrf54h20/cpuapp
3635
extra_args:
37-
38-
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpuppr.conf
36+
- SB_CONFIG_REMOTE_NRF54H20_CPUPPR_CORE=y
3937
- hello_world_SNIPPET=nordic-ppr
4038
sample.sysbuild.hello_world.nrf54h20dk_cpuapp_cpuppr_xip:
4139
platform_allow:
4240
- nrf54h20dk/nrf54h20/cpuapp
4341
integration_platforms:
4442
- nrf54h20dk/nrf54h20/cpuapp
4543
extra_args:
46-
47-
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpuppr_xip.conf
44+
- SB_CONFIG_REMOTE_NRF54H20_CPUPPR_XIP_CORE=y
4845
- hello_world_SNIPPET=nordic-ppr-xip
49-
sample.sysbuild.hello_world.nrf54l15dk_nrf54l15_cpuflpr:
46+
sample.sysbuild.hello_world.nrf54l15_cpuflpr:
5047
platform_allow:
5148
- nrf54l15dk/nrf54l15/cpuapp
5249
- ophelia4ev/nrf54l15/cpuapp
50+
- bl54l15_dvk/nrf54l15/cpuapp
51+
- bl54l15u_dvk/nrf54l15/cpuapp
5352
integration_platforms:
5453
- nrf54l15dk/nrf54l15/cpuapp
5554
- ophelia4ev/nrf54l15/cpuapp
55+
- bl54l15_dvk/nrf54l15/cpuapp
56+
- bl54l15u_dvk/nrf54l15/cpuapp
5657
extra_args:
57-
58-
- SB_CONF_FILE=sysbuild/nrf54l15dk_nrf54l15_cpuflpr.conf
5958
- hello_world_SNIPPET=nordic-flpr
6059
sample.sysbuild.hello_world.nrf54h20dk_cpuapp_cpuflpr:
6160
platform_allow:
6261
- nrf54h20dk/nrf54h20/cpuapp
6362
integration_platforms:
6463
- nrf54h20dk/nrf54h20/cpuapp
6564
extra_args:
66-
67-
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpuflpr.conf
65+
- SB_CONFIG_REMOTE_NRF54H20_CPUFLPR_CORE=y
6866
- hello_world_SNIPPET=nordic-flpr
6967
sample.sysbuild.hello_world.nrf54h20dk_cpuapp_cpuflpr_xip:
7068
platform_allow:
7169
- nrf54h20dk/nrf54h20/cpuapp
7270
integration_platforms:
7371
- nrf54h20dk/nrf54h20/cpuapp
7472
extra_args:
75-
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpuflpr_xip.conf
73+
- SB_CONFIG_REMOTE_NRF54H20_CPUFLPR_XIP_CORE=y
7674
- hello_world_SNIPPET=nordic-flpr-xip
77-
sample.sysbuild.hello_world.bl54l15_dvk_nrf54l15_cpuflpr:
78-
platform_allow:
79-
- bl54l15_dvk/nrf54l15/cpuapp
80-
integration_platforms:
81-
- bl54l15_dvk/nrf54l15/cpuapp
82-
extra_args:
83-
- SB_CONF_FILE=sysbuild/bl54l15_dvk_nrf54l15_cpuflpr.conf
84-
- hello_world_SNIPPET=nordic-flpr
85-
sample.sysbuild.hello_world.bl54l15u_dvk_nrf54l15_cpuflpr:
86-
platform_allow:
87-
- bl54l15u_dvk/nrf54l15/cpuapp
88-
integration_platforms:
89-
- bl54l15u_dvk/nrf54l15/cpuapp
90-
extra_args:
91-
- SB_CONF_FILE=sysbuild/bl54l15u_dvk_nrf54l15_cpuflpr.conf
92-
- hello_world_SNIPPET=nordic-flpr
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# Copyright (c) 2024 Nordic Semiconductor ASA
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if("${SB_CONFIG_REMOTE_BOARD}" STREQUAL "")
5-
message(FATAL_ERROR "REMOTE_BOARD must be set to a valid board name")
6-
endif()
7-
8-
ExternalZephyrProject_Add(
9-
APPLICATION remote
10-
SOURCE_DIR ${APP_DIR}/remote
11-
BOARD ${SB_CONFIG_REMOTE_BOARD}
12-
)
4+
if(DEFINED SB_CONFIG_REMOTE_BOARD)
5+
ExternalZephyrProject_Add(
6+
APPLICATION remote
7+
SOURCE_DIR ${APP_DIR}/remote
8+
BOARD ${SB_CONFIG_REMOTE_BOARD}
9+
)
1310

14-
add_dependencies(${DEFAULT_IMAGE} remote)
15-
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} remote)
11+
add_dependencies(${DEFAULT_IMAGE} remote)
12+
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} remote)
13+
endif()

samples/sysbuild/hello_world/sysbuild/bl54l15_dvk_nrf54l15_cpuflpr.conf

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

samples/sysbuild/hello_world/sysbuild/bl54l15u_dvk_nrf54l15_cpuflpr.conf

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

samples/sysbuild/hello_world/sysbuild/nrf5340dk_nrf5340_cpunet.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/sysbuild/hello_world/sysbuild/nrf54h20dk_nrf54h20_cpuflpr.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/sysbuild/hello_world/sysbuild/nrf54h20dk_nrf54h20_cpuflpr_xip.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/sysbuild/hello_world/sysbuild/nrf54h20dk_nrf54h20_cpuppr.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/sysbuild/hello_world/sysbuild/nrf54h20dk_nrf54h20_cpuppr_xip.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)