From bdba5894e073cb8a5aafcc65ae992f91909d4151 Mon Sep 17 00:00:00 2001 From: Maciej Baczmanski Date: Fri, 17 May 2024 14:31:01 +0200 Subject: [PATCH] sysbuild: Add support for OpenThread Added support for OT to sysbuild Signed-off-by: Maciej Baczmanski --- samples/openthread/cli/Kconfig.sysbuild | 10 ++++++ samples/openthread/cli/prj.conf | 3 ++ samples/openthread/cli/sample.yaml | 14 ++++---- .../cli/sysbuild/802154_rpmsg/prj.conf | 6 ++++ .../cli/sysbuild/multiprotocol_rpmsg/prj.conf | 8 ++++- .../openthread/coap_client/Kconfig.sysbuild | 10 ++++++ samples/openthread/coap_client/prj.conf | 3 ++ samples/openthread/coap_client/sample.yaml | 7 ++-- .../sysbuild/802154_rpmsg/prj.conf | 13 ++++++++ .../sysbuild/multiprotocol_rpmsg/prj.conf | 33 +++++++++++++++++++ .../openthread/coap_server/Kconfig.sysbuild | 10 ++++++ samples/openthread/coap_server/prj.conf | 3 ++ samples/openthread/coap_server/sample.yaml | 2 +- .../sysbuild/802154_rpmsg/prj.conf | 13 ++++++++ samples/openthread/coprocessor/prj.conf | 3 ++ 15 files changed, 127 insertions(+), 11 deletions(-) create mode 100644 samples/openthread/cli/Kconfig.sysbuild create mode 100644 samples/openthread/coap_client/Kconfig.sysbuild create mode 100644 samples/openthread/coap_client/sysbuild/802154_rpmsg/prj.conf create mode 100644 samples/openthread/coap_client/sysbuild/multiprotocol_rpmsg/prj.conf create mode 100644 samples/openthread/coap_server/Kconfig.sysbuild create mode 100644 samples/openthread/coap_server/sysbuild/802154_rpmsg/prj.conf diff --git a/samples/openthread/cli/Kconfig.sysbuild b/samples/openthread/cli/Kconfig.sysbuild new file mode 100644 index 000000000000..03d7bf8ff844 --- /dev/null +++ b/samples/openthread/cli/Kconfig.sysbuild @@ -0,0 +1,10 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" + +config NRF_DEFAULT_802154 + default y diff --git a/samples/openthread/cli/prj.conf b/samples/openthread/cli/prj.conf index a898279252c6..c0937bbb4200 100644 --- a/samples/openthread/cli/prj.conf +++ b/samples/openthread/cli/prj.conf @@ -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 diff --git a/samples/openthread/cli/sample.yaml b/samples/openthread/cli/sample.yaml index 9646e732c83e..bb7ee1ccf173 100644 --- a/samples/openthread/cli/sample.yaml +++ b/samples/openthread/cli/sample.yaml @@ -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_NETCORE_MULTIPROTOCOL_RPMSG=y integration_platforms: - nrf52840dk/nrf52840 - nrf52840dongle/nrf52840 @@ -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 @@ -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_NETCORE_MULTIPROTOCOL_RPMSG=y integration_platforms: - nrf52840dk/nrf52840 - nrf21540dk/nrf52840 @@ -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 @@ -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 @@ -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 diff --git a/samples/openthread/cli/sysbuild/802154_rpmsg/prj.conf b/samples/openthread/cli/sysbuild/802154_rpmsg/prj.conf index 4201542f7bae..f4107e8e7a10 100644 --- a/samples/openthread/cli/sysbuild/802154_rpmsg/prj.conf +++ b/samples/openthread/cli/sysbuild/802154_rpmsg/prj.conf @@ -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 diff --git a/samples/openthread/cli/sysbuild/multiprotocol_rpmsg/prj.conf b/samples/openthread/cli/sysbuild/multiprotocol_rpmsg/prj.conf index e16f9638d281..a7003ff0ef77 100644 --- a/samples/openthread/cli/sysbuild/multiprotocol_rpmsg/prj.conf +++ b/samples/openthread/cli/sysbuild/multiprotocol_rpmsg/prj.conf @@ -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 @@ -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 diff --git a/samples/openthread/coap_client/Kconfig.sysbuild b/samples/openthread/coap_client/Kconfig.sysbuild new file mode 100644 index 000000000000..03d7bf8ff844 --- /dev/null +++ b/samples/openthread/coap_client/Kconfig.sysbuild @@ -0,0 +1,10 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" + +config NRF_DEFAULT_802154 + default y diff --git a/samples/openthread/coap_client/prj.conf b/samples/openthread/coap_client/prj.conf index 918a5a4eaf27..66b1cdbf07b4 100644 --- a/samples/openthread/coap_client/prj.conf +++ b/samples/openthread/coap_client/prj.conf @@ -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 diff --git a/samples/openthread/coap_client/sample.yaml b/samples/openthread/coap_client/sample.yaml index bea8a9dd0bad..d9e15cc40784 100644 --- a/samples/openthread/coap_client/sample.yaml +++ b/samples/openthread/coap_client/sample.yaml @@ -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 @@ -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 @@ -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_NETCORE_MULTIPROTOCOL_RPMSG=y integration_platforms: - nrf52840dk/nrf52840 - nrf21540dk/nrf52840 diff --git a/samples/openthread/coap_client/sysbuild/802154_rpmsg/prj.conf b/samples/openthread/coap_client/sysbuild/802154_rpmsg/prj.conf new file mode 100644 index 000000000000..e54c984570c0 --- /dev/null +++ b/samples/openthread/coap_client/sysbuild/802154_rpmsg/prj.conf @@ -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 diff --git a/samples/openthread/coap_client/sysbuild/multiprotocol_rpmsg/prj.conf b/samples/openthread/coap_client/sysbuild/multiprotocol_rpmsg/prj.conf new file mode 100644 index 000000000000..a3558ab51da1 --- /dev/null +++ b/samples/openthread/coap_client/sysbuild/multiprotocol_rpmsg/prj.conf @@ -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 diff --git a/samples/openthread/coap_server/Kconfig.sysbuild b/samples/openthread/coap_server/Kconfig.sysbuild new file mode 100644 index 000000000000..03d7bf8ff844 --- /dev/null +++ b/samples/openthread/coap_server/Kconfig.sysbuild @@ -0,0 +1,10 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" + +config NRF_DEFAULT_802154 + default y diff --git a/samples/openthread/coap_server/prj.conf b/samples/openthread/coap_server/prj.conf index 7ac5587e4411..2abb97e10aab 100644 --- a/samples/openthread/coap_server/prj.conf +++ b/samples/openthread/coap_server/prj.conf @@ -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 diff --git a/samples/openthread/coap_server/sample.yaml b/samples/openthread/coap_server/sample.yaml index 9d2a5eec6d61..2fa6337cb1c4 100644 --- a/samples/openthread/coap_server/sample.yaml +++ b/samples/openthread/coap_server/sample.yaml @@ -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 diff --git a/samples/openthread/coap_server/sysbuild/802154_rpmsg/prj.conf b/samples/openthread/coap_server/sysbuild/802154_rpmsg/prj.conf new file mode 100644 index 000000000000..e54c984570c0 --- /dev/null +++ b/samples/openthread/coap_server/sysbuild/802154_rpmsg/prj.conf @@ -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 diff --git a/samples/openthread/coprocessor/prj.conf b/samples/openthread/coprocessor/prj.conf index 9b328f93ceee..7e512ed9912d 100644 --- a/samples/openthread/coprocessor/prj.conf +++ b/samples/openthread/coprocessor/prj.conf @@ -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