Skip to content

Commit

Permalink
sysbuild: Add support for OpenThread
Browse files Browse the repository at this point in the history
Added support for OT to sysbuild

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
  • Loading branch information
maciejbaczmanski committed May 21, 2024
1 parent 9ec27c6 commit 02f1b53
Show file tree
Hide file tree
Showing 17 changed files with 145 additions and 11 deletions.
3 changes: 3 additions & 0 deletions samples/openthread/cli/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ CONFIG_OPENTHREAD_SHELL=y
CONFIG_SHELL_ARGC_MAX=26
CONFIG_SHELL_CMD_BUFF_SIZE=416

# Increase Settings storage size
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000

# Enable OpenThread features set
CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y

Expand Down
14 changes: 8 additions & 6 deletions samples/openthread/cli/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tests:
nrf54l15pdk/nrf54l15/cpuapp
nrf54l15pdk@0.3.0/nrf54l15/cpuapp
extra_args: >
SNIPPET="ci;logging;multiprotocol;tcp"
cli_SNIPPET="ci;logging;multiprotocol;tcp"
SB_CONFIG_OPENTHREAD_MULTIPROTOCOL=y
integration_platforms:
- nrf52840dk/nrf52840
- nrf52840dongle/nrf52840
Expand All @@ -37,7 +38,7 @@ tests:
nrf54l15pdk/nrf54l15/cpuapp
nrf54l15pdk@0.3.0/nrf54l15/cpuapp
extra_args: >
SNIPPET="ci;logging;tcp"
cli_SNIPPET="ci;logging;tcp"
integration_platforms:
- nrf52840dk/nrf52840
- nrf21540dk/nrf52840
Expand All @@ -55,7 +56,8 @@ tests:
nrf5340dk/nrf5340/cpuapp
nrf5340dk/nrf5340/cpuapp/ns
extra_args: >
SNIPPET="ci;logging;multiprotocol;tcp;usb"
cli_SNIPPET="ci;logging;multiprotocol;tcp;usb"
SB_CONFIG_OPENTHREAD_MULTIPROTOCOL=y
integration_platforms:
- nrf52840dk/nrf52840
- nrf21540dk/nrf52840
Expand All @@ -69,7 +71,7 @@ tests:
nrf52840dk/nrf52840
nrf5340dk/nrf5340/cpuapp
extra_args: >
SNIPPET="ci;low_power"
cli_SNIPPET="ci;low_power"
integration_platforms:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
Expand All @@ -82,7 +84,7 @@ tests:
nrf52840dk/nrf52840
nrf5340dk/nrf5340/cpuapp/ns
extra_args: >
SNIPPET=ci
cli_SNIPPET=ci
CONFIG_NRF_SECURITY=y
integration_platforms:
- nrf5340dk/nrf5340/cpuapp/ns
Expand All @@ -99,7 +101,7 @@ tests:
nrf54l15pdk/nrf54l15/cpuapp
nrf54l15pdk@0.3.0/nrf54l15/cpuapp
extra_args: >
SNIPPET="ci;tcat;tcp"
cli_SNIPPET="ci;tcat;tcp"
integration_platforms:
- nrf52840dk/nrf52840
- nrf21540dk/nrf52840
Expand Down
7 changes: 7 additions & 0 deletions samples/openthread/cli/sysbuild.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

SB_CONFIG_OPENTHREAD=y
6 changes: 6 additions & 0 deletions samples/openthread/cli/sysbuild/802154_rpmsg/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

## Disable serial and UART interface.
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
Expand Down
8 changes: 7 additions & 1 deletion samples/openthread/cli/sysbuild/multiprotocol_rpmsg/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

## Disable serial and UART interface.
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
Expand All @@ -23,7 +29,7 @@ CONFIG_DEBUG_INFO=y
CONFIG_EXCEPTION_STACK_TRACE=y

CONFIG_NRF_802154_SER_RADIO=y
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=3
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2
CONFIG_IPC_SERVICE_BACKEND_RPMSG=y

# Enable the frame encryption feature in the radio driver, it's required for proper working
Expand Down
3 changes: 3 additions & 0 deletions samples/openthread/coap_client/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ CONFIG_OPENTHREAD_SHELL=y
CONFIG_SHELL_ARGC_MAX=26
CONFIG_SHELL_CMD_BUFF_SIZE=416

# Increase Settings storage size
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000

# Network sockets
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
Expand Down
7 changes: 4 additions & 3 deletions samples/openthread/coap_client/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tests:
nrf5340dk/nrf5340/cpuapp
nrf5340dk/nrf5340/cpuapp/ns
extra_args: >
SNIPPET="ci;logging"
coap_client_SNIPPET="ci;logging"
integration_platforms:
- nrf52840dk/nrf52840
- nrf21540dk/nrf52840
Expand All @@ -29,7 +29,7 @@ tests:
nrf5340dk/nrf5340/cpuapp
nrf5340dk/nrf5340/cpuapp/ns
extra_args: >
SNIPPET="ci;logging;mtd"
coap_client_SNIPPET="ci;logging;mtd"
integration_platforms:
- nrf52840dk/nrf52840
- nrf21540dk/nrf52840
Expand All @@ -45,7 +45,8 @@ tests:
nrf5340dk/nrf5340/cpuapp
nrf5340dk/nrf5340/cpuapp/ns
extra_args: >
SNIPPET="ci;logging;mtd;multiprotocol_ble"
coap_client_SNIPPET="ci;logging;mtd;multiprotocol_ble"
SB_CONFIG_OPENTHREAD_MULTIPROTOCOL=y
integration_platforms:
- nrf52840dk/nrf52840
- nrf21540dk/nrf52840
Expand Down
7 changes: 7 additions & 0 deletions samples/openthread/coap_client/sysbuild.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

SB_CONFIG_OPENTHREAD=y
13 changes: 13 additions & 0 deletions samples/openthread/coap_client/sysbuild/802154_rpmsg/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

## Disable serial and UART interface.
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n

CONFIG_LOG=n

CONFIG_NRF_802154_SER_RADIO=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

## Disable serial and UART interface.
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n

CONFIG_LOG=n

CONFIG_HEAP_MEM_POOL_SIZE=8192

CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_MAX_CONN=4
CONFIG_BT_CTLR_ASSERT_HANDLER=y
CONFIG_BT_HCI_RAW_RESERVE=1

# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
# Host number of completed commands does not follow normal flow control.
#CONFIG_BT_BUF_CMD_TX_COUNT=10

CONFIG_ASSERT=y
CONFIG_DEBUG_INFO=y
CONFIG_EXCEPTION_STACK_TRACE=y

CONFIG_NRF_802154_SER_RADIO=y
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2
CONFIG_IPC_SERVICE_BACKEND_RPMSG=y
3 changes: 3 additions & 0 deletions samples/openthread/coap_server/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ CONFIG_OPENTHREAD_SHELL=y
CONFIG_SHELL_ARGC_MAX=26
CONFIG_SHELL_CMD_BUFF_SIZE=416

# Increase Settings storage size
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000

# Network sockets
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
Expand Down
2 changes: 1 addition & 1 deletion samples/openthread/coap_server/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tests:
nrf5340dk/nrf5340/cpuapp
nrf5340dk/nrf5340/cpuapp/ns
extra_args: >
SNIPPET="ci;logging"
coap_server_SNIPPET="ci;logging"
integration_platforms:
- nrf52840dk/nrf52840
- nrf21540dk/nrf52840
Expand Down
7 changes: 7 additions & 0 deletions samples/openthread/coap_server/sysbuild.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

SB_CONFIG_OPENTHREAD=y
13 changes: 13 additions & 0 deletions samples/openthread/coap_server/sysbuild/802154_rpmsg/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

## Disable serial and UART interface.
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n

CONFIG_LOG=n

CONFIG_NRF_802154_SER_RADIO=y
3 changes: 3 additions & 0 deletions samples/openthread/coprocessor/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ CONFIG_NET_L2_OPENTHREAD=y
# Generic networking options
CONFIG_NETWORKING=y

# Increase Settings storage size
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000

# Disable RTT
CONFIG_USE_SEGGER_RTT=n

Expand Down
26 changes: 26 additions & 0 deletions sysbuild/Kconfig.openthread
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

menuconfig OPENTHREAD
bool "OpenThread"
depends on ZEPHYR_OPENTHREAD_MODULE

if OPENTHREAD

config OPENTHREAD_MULTIPROTOCOL
bool "OT multiprotocol with BLE"
help
OT multiprotocol with BLE.

if SOC_NRF5340_CPUAPP

config NRF_DEFAULT_MULTIPROTOCOL
default y if OPENTHREAD_MULTIPROTOCOL

config NRF_DEFAULT_802154
default y if !OPENTHREAD_MULTIPROTOCOL

endif # SOC_NRF5340_CPUAPP

endif
1 change: 1 addition & 0 deletions sysbuild/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ rsource "Kconfig.zip"
rsource "Kconfig.matter"
rsource "Kconfig.wifi"
rsource "Kconfig.suit"
rsource "Kconfig.openthread"

0 comments on commit 02f1b53

Please sign in to comment.