Skip to content

Commit ca13ceb

Browse files
committed
samples: subsys: usb: hid-keyboard: Add sysbuild
Hack in sysbuild to load an empty network core image to properly iniatialize power domains and clocks. Signed-off-by: Karsten Koenig <[email protected]>
1 parent 1f8f3dc commit ca13ceb

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
8+
9+
config REMOTE_BOARD
10+
string "The board used for remote target"

samples/subsys/usb/hid-keyboard/sample.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
sample:
22
name: USB HID keyboard sample
33
common:
4+
sysbuild: true
45
harness: button
56
filter: dt_alias_exists("sw0") and dt_alias_exists("led0")
67
depends_on:
@@ -17,6 +18,8 @@ common:
1718
tests:
1819
sample.usbd.hid-keyboard:
1920
tags: usb
21+
extra_args:
22+
- SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf
2023
sample.usbd.hid-keyboard.out-report:
2124
tags: usb
2225
extra_args:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
if("${SB_CONFIG_REMOTE_BOARD}" STREQUAL "")
8+
message(FATAL_ERROR "REMOTE_BOARD must be set to a valid board name")
9+
endif()
10+
11+
# Add remote project
12+
ExternalZephyrProject_Add(
13+
APPLICATION remote
14+
SOURCE_DIR ${SYSBUILD_NRF_MODULE_DIR}/tests/benchmarks/power_consumption/common/remote_sleep_forever
15+
BOARD ${SB_CONFIG_REMOTE_BOARD}
16+
BOARD_REVISION ${BOARD_REVISION}
17+
)
18+
19+
# Add a dependency so that the remote image will be built and flashed first
20+
add_dependencies(hid-keyboard remote)
21+
# Add dependency so that the remote image is flashed first.
22+
sysbuild_add_dependencies(FLASH hid-keyboard remote)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad"

0 commit comments

Comments
 (0)