Skip to content

Commit

Permalink
samples: Bluetooth: iso_central: Add sysbuild to build hci_ipc
Browse files Browse the repository at this point in the history
Add sysbuild support to build corresponding hci_ipc
firmware for net core on nRF53x boards.

Example build commandline:
  # west build -b nrf5340dk/nrf5340/cpuapp
    -d build/iso_central samples/bluetooth/iso_central

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
  • Loading branch information
cvinayak committed Nov 27, 2024
1 parent 8bc628d commit 7e2aba8
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
15 changes: 15 additions & 0 deletions samples/bluetooth/iso_central/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2023-2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

source "share/sysbuild/Kconfig"

config NET_CORE_BOARD
string
default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk"
default "nrf5340_audio_dk/nrf5340/cpunet" if $(BOARD) = "nrf5340_audio_dk"
default "nrf5340bsim/nrf5340/cpunet" if $(BOARD_TARGET_STRING) = "NRF5340BSIM_NRF5340_CPUAPP"

config NET_CORE_IMAGE_HCI_IPC
bool "HCI IPC image on network core"
default y
depends on NET_CORE_BOARD != ""
6 changes: 5 additions & 1 deletion samples/bluetooth/iso_central/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ sample:
tests:
sample.bluetooth.iso_central:
harness: bluetooth
platform_allow: qemu_x86
platform_allow:
- qemu_x86
- nrf5340dk/nrf5340/cpuapp
integration_platforms:
- qemu_x86
- nrf5340dk/nrf5340/cpuapp
tags: bluetooth
sysbuild: true
sample.bluetooth.iso_central.bt_ll_sw_split:
harness: bluetooth
platform_allow:
Expand Down
35 changes: 35 additions & 0 deletions samples/bluetooth/iso_central/sysbuild.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (c) 2023-2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

if(SB_CONFIG_NET_CORE_IMAGE_HCI_IPC)
# For builds in the nrf5340, we build the netcore image with the controller

set(NET_APP hci_ipc)
set(NET_APP_SRC_DIR ${ZEPHYR_BASE}/samples/bluetooth/${NET_APP})

ExternalZephyrProject_Add(
APPLICATION ${NET_APP}
SOURCE_DIR ${NET_APP_SRC_DIR}
BOARD ${SB_CONFIG_NET_CORE_BOARD}
)

set(${NET_APP}_CONF_FILE
${NET_APP_SRC_DIR}/nrf5340_cpunet_iso-bt_ll_sw_split.conf
CACHE INTERNAL ""
)

set(${NET_APP}_SNIPPET
"bt-ll-sw-split"
CACHE INTERNAL ""
)

# Necessary to match the ACL RX size between APP and NET core
set(CONFIG_BT_BUF_ACL_RX_SIZE
"255"
CACHE INTERNAL ""
)

native_simulator_set_child_images(${DEFAULT_IMAGE} ${NET_APP})
endif()

native_simulator_set_final_executable(${DEFAULT_IMAGE})

0 comments on commit 7e2aba8

Please sign in to comment.