samples: Bluetooth: Support sysbuild for central_hr and peripheral_hr
Add support for using sysbuild for central_hr and peripheral_hr samples so that hci_ipc sample is built for nRF53x SoCs boards. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
b7012f1555
commit
12b39307f3
15
samples/bluetooth/central_hr/Kconfig.sysbuild
Normal file
15
samples/bluetooth/central_hr/Kconfig.sysbuild
Normal file
|
@ -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 != ""
|
|
@ -0,0 +1,3 @@
|
|||
# Set same the ACL RX buffer size as in hci_ipc on netcore so that
|
||||
# HCI Controller to Host Flowcontrol is supported.
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=255
|
24
samples/bluetooth/central_hr/sysbuild.cmake
Normal file
24
samples/bluetooth/central_hr/sysbuild.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Copyright (c) 2023 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 ""
|
||||
)
|
||||
|
||||
native_simulator_set_child_images(${DEFAULT_IMAGE} ${NET_APP})
|
||||
endif()
|
||||
|
||||
native_simulator_set_final_executable(${DEFAULT_IMAGE})
|
15
samples/bluetooth/peripheral_hr/Kconfig.sysbuild
Normal file
15
samples/bluetooth/peripheral_hr/Kconfig.sysbuild
Normal file
|
@ -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 != ""
|
|
@ -0,0 +1,3 @@
|
|||
# Set same the ACL RX buffer size as in hci_ipc on netcore so that
|
||||
# HCI Controller to Host Flowcontrol is supported.
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=255
|
24
samples/bluetooth/peripheral_hr/sysbuild.cmake
Normal file
24
samples/bluetooth/peripheral_hr/sysbuild.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Copyright (c) 2023 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 ""
|
||||
)
|
||||
|
||||
native_simulator_set_child_images(${DEFAULT_IMAGE} ${NET_APP})
|
||||
endif()
|
||||
|
||||
native_simulator_set_final_executable(${DEFAULT_IMAGE})
|
Loading…
Reference in a new issue