From c5dd7822f23b844b4995bfaeedfe7b137777c91d Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:19:49 -0400 Subject: [PATCH 1/6] Upgrade Gecko Bootloader --- manifests/nabucasa/skyconnect_bootloader.yaml | 2 +- manifests/nabucasa/yellow_bootloader.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/nabucasa/skyconnect_bootloader.yaml b/manifests/nabucasa/skyconnect_bootloader.yaml index b6547fb9..e8cc478a 100644 --- a/manifests/nabucasa/skyconnect_bootloader.yaml +++ b/manifests/nabucasa/skyconnect_bootloader.yaml @@ -2,7 +2,7 @@ name: SkyConnect Bootloader device: EFR32MG21A020F512IM32 base_project: src/bootloader filename: "{manifest_name}_{gecko_bootloader_version}" -sdk: "gecko_sdk:4.4.4" +sdk: "simplicity_sdk:2024.6.2" toolchain: "12.2.1.20221205" gbl: diff --git a/manifests/nabucasa/yellow_bootloader.yaml b/manifests/nabucasa/yellow_bootloader.yaml index 2859c852..6f9a1704 100644 --- a/manifests/nabucasa/yellow_bootloader.yaml +++ b/manifests/nabucasa/yellow_bootloader.yaml @@ -2,7 +2,7 @@ name: Yellow Bootloader device: MGM210PA32JIA base_project: src/bootloader filename: "{manifest_name}_{gecko_bootloader_version}" -sdk: "gecko_sdk:4.4.4" +sdk: "simplicity_sdk:2024.6.2" toolchain: "12.2.1.20221205" gbl: From 8d38918651e4d8812a0278782762c45252a115cb Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:26:04 -0400 Subject: [PATCH 2/6] Upgrade OpenThread RCP --- .../nabucasa/skyconnect_openthread_rcp.yaml | 2 +- manifests/nabucasa/yellow_openthread_rcp.yaml | 2 +- src/openthread_rcp/app.c | 86 ++++++++++++++----- src/openthread_rcp/app.h | 37 +++++--- src/openthread_rcp/main.c | 75 +++++++++------- src/openthread_rcp/openthread_rcp.slcp | 6 +- src/openthread_rcp/reset_util.h | 4 +- 7 files changed, 141 insertions(+), 71 deletions(-) mode change 100755 => 100644 src/openthread_rcp/app.c diff --git a/manifests/nabucasa/skyconnect_openthread_rcp.yaml b/manifests/nabucasa/skyconnect_openthread_rcp.yaml index 284e2993..27c7b156 100644 --- a/manifests/nabucasa/skyconnect_openthread_rcp.yaml +++ b/manifests/nabucasa/skyconnect_openthread_rcp.yaml @@ -2,7 +2,7 @@ name: SkyConnect OpenThread RCP device: EFR32MG21A020F512IM32 base_project: src/openthread_rcp filename: "{manifest_name}_{ot_rcp_version.split('/')[-1]}_gsdk_{sdk_version}" -sdk: "gecko_sdk:4.4.4" +sdk: "simplicity_sdk:2024.6.2" toolchain: "12.2.1.20221205" gbl: diff --git a/manifests/nabucasa/yellow_openthread_rcp.yaml b/manifests/nabucasa/yellow_openthread_rcp.yaml index d0ee8200..c485f534 100644 --- a/manifests/nabucasa/yellow_openthread_rcp.yaml +++ b/manifests/nabucasa/yellow_openthread_rcp.yaml @@ -2,7 +2,7 @@ name: Yellow OpenThread RCP device: MGM210PA32JIA base_project: src/openthread_rcp filename: "{manifest_name}_{ot_rcp_version.split('/')[-1]}_gsdk_{sdk_version}" -sdk: "gecko_sdk:4.4.4" +sdk: "simplicity_sdk:2024.6.2" toolchain: "12.2.1.20221205" gbl: diff --git a/src/openthread_rcp/app.c b/src/openthread_rcp/app.c old mode 100755 new mode 100644 index b3af0528..ca5d42a7 --- a/src/openthread_rcp/app.c +++ b/src/openthread_rcp/app.c @@ -1,41 +1,72 @@ -/***************************************************************************//** +/******************************************************************************* * @file * @brief Core application logic. ******************************************************************************* * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is distributed to you in Source Code format and is governed by the - * sections of the MSLA applicable to Source Code. + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. * ******************************************************************************/ + #include #include #include -#include #include +#include #include -#include "openthread-system.h" #include "app.h" +#include "openthread-system.h" #include "reset_util.h" +#include "sl_component_catalog.h" +#include "sl_memory_manager.h" + +#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE +#if OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE == 0 +#error "Support for multiple OpenThread static instance is disabled." +#endif +otInstance *sInstances[OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM] = {NULL}; +#endif // OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE + /** * This function initializes the NCP app. * * @param[in] aInstance The OpenThread instance structure. * */ +#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE +extern void otAppNcpInitMulti(otInstance **aInstances, uint8_t aCount); +#else extern void otAppNcpInit(otInstance *aInstance); +#endif -static otInstance* sInstance = NULL; +#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE && !OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE +static uint8_t *sOtInstanceBuffer = NULL; +#endif +static otInstance *sInstance = NULL; otInstance *otGetInstance(void) { @@ -44,19 +75,26 @@ otInstance *otGetInstance(void) void sl_ot_create_instance(void) { -#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE - size_t otInstanceBufferLength = 0; - uint8_t *otInstanceBuffer = NULL; +#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE + for (int i = 0; i < OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM; i++) + { + sInstances[i] = otInstanceInitMultiple(i); + + assert(sInstances[i]); + } + sInstance = sInstances[0]; +#elif OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE && !OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE + size_t otInstanceBufferLength = 0; // Call to query the buffer size (void)otInstanceInit(NULL, &otInstanceBufferLength); // Call to allocate the buffer - otInstanceBuffer = (uint8_t *)malloc(otInstanceBufferLength); - assert(otInstanceBuffer); + sOtInstanceBuffer = (uint8_t *)sl_malloc(otInstanceBufferLength); + assert(sOtInstanceBuffer); // Initialize OpenThread with the buffer - sInstance = otInstanceInit(otInstanceBuffer, &otInstanceBufferLength); + sInstance = otInstanceInit(sOtInstanceBuffer, &otInstanceBufferLength); #else sInstance = otInstanceInitSingle(); #endif @@ -65,10 +103,14 @@ void sl_ot_create_instance(void) void sl_ot_ncp_init(void) { +#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE + otAppNcpInitMulti(sInstances, OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM); +#else otAppNcpInit(sInstance); +#endif } -/**************************************************************************//** +/****************************************************************************** * Application Init. *****************************************************************************/ @@ -77,7 +119,7 @@ void app_init(void) OT_SETUP_RESET_JUMP(argv); } -/**************************************************************************//** +/****************************************************************************** * Application Process Action. *****************************************************************************/ void app_process_action(void) @@ -86,14 +128,14 @@ void app_process_action(void) otSysProcessDrivers(sInstance); } -/**************************************************************************//** +/****************************************************************************** * Application Exit. *****************************************************************************/ void app_exit(void) { otInstanceFinalize(sInstance); -#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE - free(otInstanceBuffer); +#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE && !OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE + sl_free(sOtInstanceBuffer); #endif // TO DO : pseudo reset? } diff --git a/src/openthread_rcp/app.h b/src/openthread_rcp/app.h index 4a8493a9..ac672d5f 100755 --- a/src/openthread_rcp/app.h +++ b/src/openthread_rcp/app.h @@ -1,36 +1,49 @@ -/***************************************************************************//** +/******************************************************************************* * @file * @brief Application interface provided to main(). ******************************************************************************* * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is distributed to you in Source Code format and is governed by the - * sections of the MSLA applicable to Source Code. + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. * ******************************************************************************/ #ifndef APP_H #define APP_H -/**************************************************************************//** +/****************************************************************************** * Application Init. *****************************************************************************/ void app_init(void); -/**************************************************************************//** +/****************************************************************************** * Application Exit. *****************************************************************************/ void app_exit(void); -/**************************************************************************//** +/****************************************************************************** * Application Process Action. *****************************************************************************/ void app_process_action(void); -#endif \ No newline at end of file +#endif diff --git a/src/openthread_rcp/main.c b/src/openthread_rcp/main.c index 143e4cdf..81a37f0b 100644 --- a/src/openthread_rcp/main.c +++ b/src/openthread_rcp/main.c @@ -1,22 +1,36 @@ -/***************************************************************************//** +/******************************************************************************* * @file * @brief main() function. ******************************************************************************* * # License - * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is distributed to you in Source Code format and is governed by the - * sections of the MSLA applicable to Source Code. + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. * ******************************************************************************/ + +#include "app.h" #include "sl_component_catalog.h" #include "sl_system_init.h" -#include "app.h" #if defined(SL_CATALOG_POWER_MANAGER_PRESENT) #include "sl_power_manager.h" #endif // SL_CATALOG_POWER_MANAGER_PRESENT @@ -28,33 +42,34 @@ int main(void) { - // Initialize Silicon Labs device, system, service(s) and protocol stack(s). - // Note that if the kernel is present, processing task(s) will be created by - // this call. - sl_system_init(); + // Initialize Silicon Labs device, system, service(s) and protocol stack(s). + // Note that if the kernel is present, processing task(s) will be created by + // this call. + sl_system_init(); - // Initialize the application. For example, create periodic timer(s) or - // task(s) if the kernel is present. - app_init(); + // Initialize the application. For example, create periodic timer(s) or + // task(s) if the kernel is present. + app_init(); #if defined(SL_CATALOG_KERNEL_PRESENT) - // Start the kernel. Task(s) created in app_init() will start running. - sl_system_kernel_start(); + // Start the kernel. Task(s) created in app_init() will start running. + sl_system_kernel_start(); #else // SL_CATALOG_KERNEL_PRESENT - while (1) { - // Do not remove this call: Silicon Labs components process action routine - // must be called from the super loop. - sl_system_process_action(); + while (1) + { + // Do not remove this call: Silicon Labs components process action routine + // must be called from the super loop. + sl_system_process_action(); - // Application process. - app_process_action(); + // Application process. + app_process_action(); #if defined(SL_CATALOG_POWER_MANAGER_PRESENT) - // Let the CPU go to sleep if the system allows it. - sl_power_manager_sleep(); + // Let the CPU go to sleep if the system allows it. + sl_power_manager_sleep(); #endif - } - // Clean-up when exiting the application. - app_exit(); + } + // Clean-up when exiting the application. + app_exit(); #endif // SL_CATALOG_KERNEL_PRESENT -} \ No newline at end of file +} diff --git a/src/openthread_rcp/openthread_rcp.slcp b/src/openthread_rcp/openthread_rcp.slcp index 3294e605..a74faa41 100644 --- a/src/openthread_rcp/openthread_rcp.slcp +++ b/src/openthread_rcp/openthread_rcp.slcp @@ -14,6 +14,7 @@ component: - vcom - id: rail_util_pti - id: bootloader_interface + - id: clock_manager include: - path: . @@ -40,12 +41,11 @@ configuration: - name: BUFFER_SIZE_UP value: 768 condition: [ot_rtt_log] - - name: BUFFER_SIZE_UP - value: 128 - condition: [ot_rtt_log, device_family_efr32mg1] - name: BUFFER_SIZE_DOWN value: 0 condition: [ot_rtt_log] + - name: CIRCULAR_QUEUE_LEN_MAX + value: 16 filter: - name: "Wireless Technology" diff --git a/src/openthread_rcp/reset_util.h b/src/openthread_rcp/reset_util.h index 52f56813..56e75da9 100644 --- a/src/openthread_rcp/reset_util.h +++ b/src/openthread_rcp/reset_util.h @@ -32,8 +32,8 @@ #if defined(OPENTHREAD_ENABLE_COVERAGE) && OPENTHREAD_ENABLE_COVERAGE && defined(__GNUC__) #if __GNUC__ >= 11 || (defined(__clang__) && (defined(__APPLE__) && (__clang_major__ >= 13)) || \ (!defined(__APPLE__) && (__clang_major__ >= 12))) -void __gcov_dump(); -void __gcov_reset(); +void __gcov_dump(void); +void __gcov_reset(void); static void flush_gcov(void) { From 484867a73ef1b76c841e32ee2bbd4e053773ee5e Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:43:46 -0400 Subject: [PATCH 3/6] Upgrade Zigbee NCP --- manifests/nabucasa/skyconnect_zigbee_ncp.yaml | 17 ++++++++--------- manifests/nabucasa/yellow_zigbee_ncp.yaml | 17 ++++++++--------- src/zigbee_ncp/app.c | 8 ++++---- src/zigbee_ncp/main.c | 2 +- src/zigbee_ncp/zigbee_ncp.slcp | 13 ++++++------- 5 files changed, 27 insertions(+), 30 deletions(-) diff --git a/manifests/nabucasa/skyconnect_zigbee_ncp.yaml b/manifests/nabucasa/skyconnect_zigbee_ncp.yaml index 44d707f1..694ea579 100644 --- a/manifests/nabucasa/skyconnect_zigbee_ncp.yaml +++ b/manifests/nabucasa/skyconnect_zigbee_ncp.yaml @@ -2,7 +2,7 @@ name: SkyConnect Zigbee device: EFR32MG21A020F512IM32 base_project: src/zigbee_ncp filename: "{manifest_name}_{ezsp_version}" -sdk: "gecko_sdk:4.4.4" +sdk: "simplicity_sdk:2024.6.2" toolchain: "12.2.1.20221205" gbl: @@ -11,16 +11,15 @@ gbl: baudrate: 115200 configuration: - EMBER_CHILD_TABLE_SIZE: 32 + SL_ZIGBEE_CHILD_TABLE_SIZE: 32 c_defines: - EMBER_APS_UNICAST_MESSAGE_COUNT: 32 - EMBER_BINDING_TABLE_SIZE: 32 - EMBER_BROADCAST_TABLE_SIZE: 64 - EMBER_KEY_TABLE_SIZE: 12 - EMBER_MAX_END_DEVICE_CHILDREN: 32 - EMBER_PACKET_BUFFER_COUNT: 255 - EMBER_SOURCE_ROUTE_TABLE_SIZE: 200 + SL_ZIGBEE_APS_UNICAST_MESSAGE_COUNT: 32 + SL_ZIGBEE_BINDING_TABLE_SIZE: 32 + SL_ZIGBEE_BROADCAST_TABLE_SIZE: 64 + SL_ZIGBEE_KEY_TABLE_SIZE: 12 + SL_ZIGBEE_MAX_END_DEVICE_CHILDREN: 32 + SL_ZIGBEE_SOURCE_ROUTE_TABLE_SIZE: 200 SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200 SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts diff --git a/manifests/nabucasa/yellow_zigbee_ncp.yaml b/manifests/nabucasa/yellow_zigbee_ncp.yaml index 1cbdd0ae..037c46e7 100644 --- a/manifests/nabucasa/yellow_zigbee_ncp.yaml +++ b/manifests/nabucasa/yellow_zigbee_ncp.yaml @@ -2,7 +2,7 @@ name: Yellow Zigbee device: MGM210PA32JIA base_project: src/zigbee_ncp filename: "{manifest_name}_{ezsp_version}" -sdk: "gecko_sdk:4.4.4" +sdk: "simplicity_sdk:2024.6.2" toolchain: "12.2.1.20221205" gbl: @@ -15,16 +15,15 @@ add_components: instance: [board_activity] configuration: - EMBER_CHILD_TABLE_SIZE: 32 + SL_ZIGBEE_CHILD_TABLE_SIZE: 32 c_defines: - EMBER_APS_UNICAST_MESSAGE_COUNT: 32 - EMBER_BINDING_TABLE_SIZE: 32 - EMBER_BROADCAST_TABLE_SIZE: 64 - EMBER_KEY_TABLE_SIZE: 12 - EMBER_MAX_END_DEVICE_CHILDREN: 32 - EMBER_PACKET_BUFFER_COUNT: 255 - EMBER_SOURCE_ROUTE_TABLE_SIZE: 200 + SL_ZIGBEE_APS_UNICAST_MESSAGE_COUNT: 32 + SL_ZIGBEE_BINDING_TABLE_SIZE: 32 + SL_ZIGBEE_BROADCAST_TABLE_SIZE: 64 + SL_ZIGBEE_KEY_TABLE_SIZE: 12 + SL_ZIGBEE_MAX_END_DEVICE_CHILDREN: 32 + SL_ZIGBEE_SOURCE_ROUTE_TABLE_SIZE: 200 SL_IOSTREAM_USART_VCOM_BAUDRATE: 115200 SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE: usartHwFlowControlCtsAndRts diff --git a/src/zigbee_ncp/app.c b/src/zigbee_ncp/app.c index 9e7f24f5..0cc620ad 100644 --- a/src/zigbee_ncp/app.c +++ b/src/zigbee_ncp/app.c @@ -16,16 +16,16 @@ ******************************************************************************/ #include PLATFORM_HEADER -#include "ember.h" +#include "sl_zigbee.h" //---------------------- // Implemented Callbacks /** @brief * - * Application framework equivalent of ::emberRadioNeedsCalibratingHandler + * Application framework equivalent of ::sl_zigbee_radio_needs_calibrating_handler */ -void emberAfRadioNeedsCalibratingCallback(void) +void sl_zigbee_af_radio_needs_calibrating_cb(void) { sl_mac_calibrate_current_channel(); } @@ -33,6 +33,6 @@ void emberAfRadioNeedsCalibratingCallback(void) /** @brief Init * Application init function */ -void emberAfMainInitCallback(void) +void sl_zigbee_af_main_init_cb(void) { } diff --git a/src/zigbee_ncp/main.c b/src/zigbee_ncp/main.c index 996b1e0b..f07f4b28 100644 --- a/src/zigbee_ncp/main.c +++ b/src/zigbee_ncp/main.c @@ -28,7 +28,7 @@ #include "sl_system_process_action.h" #endif // SL_CATALOG_KERNEL_PRESENT -#ifdef EMBER_TEST +#ifdef SL_ZIGBEE_TEST #define main nodeMain #endif diff --git a/src/zigbee_ncp/zigbee_ncp.slcp b/src/zigbee_ncp/zigbee_ncp.slcp index 8885e521..aac754e4 100644 --- a/src/zigbee_ncp/zigbee_ncp.slcp +++ b/src/zigbee_ncp/zigbee_ncp.slcp @@ -21,29 +21,28 @@ component: - id: zigbee_r22_support - id: zigbee_security_link_keys - id: zigbee_zll - - id: zigbee_app_framework_common + - id: zigbee_system_common - id: zigbee_ncp_uart_hardware - id: zigbee_debug_basic - id: zigbee_debug_extended - id: rail_util_rssi + - id: clock_manager define: - name: EMBER_CUSTOM_MAC_FILTER_TABLE_SIZE value: 15 configuration: - - name: SL_CLI_MAX_INPUT_ARGUMENTS - value: 16 - name: SL_BOARD_ENABLE_VCOM value: 1 - name: SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE value: usartHwFlowControlCtsAndRts + - name: SL_CLI_MAX_INPUT_ARGUMENTS + value: 16 + - name: SL_ZIGBEE_PACKET_BUFFER_HEAP_SIZE + value: SL_ZIGBEE_LARGE_PACKET_BUFFER_HEAP - name: SL_CLI_EXAMPLE_IOSTREAM_HANDLE value: sl_iostream_vuart_handle - - name: NVM3_DEFAULT_NVM_SIZE - value: 36864 - condition: - - device_series_1 - name: NVM3_DEFAULT_NVM_SIZE value: 32768 condition: From bd30183b47050de86158345d23a41949d2689e98 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:44:03 -0400 Subject: [PATCH 4/6] Drop Gecko SDK from the Dockerfile --- Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 980a85b6..a0d8d1a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,12 +51,6 @@ RUN \ && unzip -q -d simplicity_sdk_2024.6.2 simplicity_sdk_2024.6.2.zip \ && rm simplicity_sdk_2024.6.2.zip -# Gecko SDK 4.4.4 -RUN \ - curl -o gecko_sdk_4.4.4.zip -L https://github.com/SiliconLabs/gecko_sdk/releases/download/v4.4.4/gecko-sdk.zip \ - && unzip -q -d gecko_sdk_4.4.4 gecko_sdk_4.4.4.zip \ - && rm gecko_sdk_4.4.4.zip - ARG USERNAME=builder ARG USER_UID=1000 ARG USER_GID=$USER_UID From 5b16cb8e5648b75f39611e795b25f4e79a35fd87 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:47:26 -0400 Subject: [PATCH 5/6] Update README --- README.md | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e3aaf22a..a0b50e22 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ ZBT-1/SkyConnect and the Home Assistant Yellow's IEEE 802.15.4 radio. The firmwa manifests are entirely generic, however, and are intended to be written easily for any Silicon Labs EFR32 device. -It uses the Silicon Labs Gecko SDK and proprietary Silicon Labs tools such as the -Silicon Labs Configurator (slc) and the Simplicity Commander standalone utility. +It uses the Silicon Labs Gecko/Simplicity SDK and proprietary Silicon Labs tools such as +the Silicon Labs Configurator (slc) and the Simplicity Commander standalone utility. ## Background The project templates in this repository are configured and built for specific boards @@ -14,34 +14,32 @@ manifest file configures the Zigbee firmware for the SkyConnect/Connect ZBT-1. ## Setting up Simplicity Studio (for development) If you are going to be developing using Simplicity Studio, note that each project can -potentially use a different Gecko SDK release. It is recommended to forego the typical +potentially use a different Simplicity SDK release. It is recommended to forego the typical Simplicity Studio SDK management workflow and manually manage SDKs: -1. Clone a specific version of the Gecko SDK: +1. Clone a specific version of the Simplicity SDK: ```bash # For macOS - mkdir ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2 - cd ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2 + mkdir ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2 + cd ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2 - git clone -b v4.4.2 https://github.com/SiliconLabs/gecko_sdk . + git clone -b v2024.6.2 https://github.com/SiliconLabs/simplicity_sdk . git checkout -b branch_tag ``` 2. Open preferences, navigate to **Simplicity Studio > SDKs**, click the `Add SDK...` button, and browse to the above location. -3. Once the SDK is added, select its entry and click `Add Extension...`. -4. In this repo, add the extensions under `gecko_sdk_extensions`. Repeat this process for every necessary SDK version. > [!TIP] > If you have build issues after switching commits, make sure to delete any -> `gecko_sdk_*` and `template` folders from the Simplicity working tree. +> `simplicity_sdk_*`, `gecko_sdk_*`, and `template` folders from the project working tree. ## Building with a firmware manifest (for building device firmware) Command line building requires: - [`slc-cli`](https://docs.silabs.com/simplicity-studio-5-users-guide/latest/ss-5-users-guide-tools-slc-cli/02-installation) - [Simplicity Commander](https://www.silabs.com/developers/mcu-programming-options) (`commander`) -- The exact Gecko SDK version required by the project. Note that this doesn't have to be a Git working tree, you can use [a GitHub release](https://github.com/SiliconLabs/gecko_sdk/releases). +- The exact Simplicity SDK version required by the project. Note that this doesn't have to be a Git working tree, you can use [a GitHub release](https://github.com/SiliconLabs/gecko_sdk/releases). - A compatible toolchain. Take a look at the `Dockerfile` for the necessary toolchains. > [!TIP] @@ -57,8 +55,8 @@ Command line building requires: SDK extensions for every SDK you plan to use: ```bash -slc signature trust --sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2 -slc signature trust --sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2 --extension-path ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2/extension/nc_efr32_watchdog_extension +slc signature trust --sdk ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2 +slc signature trust --sdk ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2 --extension-path ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.2/extension/nc_efr32_watchdog_extension ``` `tools/build_project.py` is the main entry point for building firmwares. Provide paths @@ -73,9 +71,9 @@ tool will automatically determine which SDK and toolchain to use. pip install ruamel.yaml # Only dependency python tools/build_project.py \ - # The following SDK and toolchain flags can be omitted on macOS - --sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.0 \ - --sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.2 \ + # The following SDK and toolchain flags can be omitted on macOS, they are all autodetected + --sdk ~/SimplicityStudio/SDKs/gecko_sdk_4.4.4 \ + --sdk ~/SimplicityStudio/SDKs/simplicity_sdk_2024.6.0 \ --toolchain '/Applications/Simplicity Studio.app/Contents/Eclipse/developer/toolchains/gnu_arm/10.3_2021.10' \ --toolchain '/Applications/Simplicity Studio.app/Contents/Eclipse/developer/toolchains/gnu_arm/12.2.rel1_2023.7' \ From 612bf1a53d0113dcc88c8b92be31c89341555e11 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:00:41 -0400 Subject: [PATCH 6/6] Fix build failure with OpenThread RCP --- tools/build_project.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/build_project.py b/tools/build_project.py index bf9b044a..be0066b5 100755 --- a/tools/build_project.py +++ b/tools/build_project.py @@ -488,7 +488,14 @@ def main(): args.build_dir: "/src", toolchain: "/toolchain", }.items() - ] + ["-Wall", "-Wextra", "-Werror"] + ] + [ + "-Wall", + "-Wextra", + "-Werror", + # XXX: Fails due to protocol/openthread/platform-abstraction/efr32/radio.c@RAILCb_Generic + # Remove once this is fixed in the SDK! + "-Wno-error=unused-but-set-variable", + ] output_artifact = (args.build_dir / "build/debug" / base_project_name).with_suffix( ".gbl"