From 2792498895b46375bc55b8e14dc51994cf66856a Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:20:03 -0400 Subject: [PATCH] Fix sdk configurations for sleepy devices (#20380) --- third_party/silabs/efr32_sdk.gni | 51 +++++++++---------------------- third_party/silabs/matter_support | 2 +- 2 files changed, 16 insertions(+), 37 deletions(-) diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index a40cda2108c7b3..2460cb23368ca5 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -26,6 +26,8 @@ declare_args() { sdk_support_root = "${chip_root}/third_party/silabs/matter_support" enable_openthread_cli = true kvs_max_entries = 75 + + use_external_flash = true } assert(efr32_sdk_root != "", "efr32_sdk_root must be specified") @@ -194,30 +196,20 @@ template("efr32_sdk") { if ((defined(invoker.chip_enable_pw_rpc) && invoker.chip_enable_pw_rpc) || chip_build_libshell || enable_openthread_cli || (defined(invoker.show_qr_code) && invoker.show_qr_code) || - (defined(invoker.disable_lcd) && !invoker.disable_lcd)) { + (defined(invoker.disable_lcd) && !invoker.disable_lcd) || + (defined(invoker.use_external_flash) && use_external_flash)) { defines += [ "CONFIG_ENABLE_UART" ] + if (defined(invoker.use_external_flash) && use_external_flash) { + defines += [ "CONFIG_USE_EXTERNAL_FLASH" ] + } + _include_dirs += [ "${efr32_sdk_root}/platform/emdrv/uartdrv/inc", "${efr32_sdk_root}/platform/emdrv/uartdrv/config", + "${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart", + "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/inc/sl_mx25_flash_shutdown_usart", ] - - if (efr32_family == "efr32mg12") { - _include_dirs += [ - "${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart", - "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/inc/sl_mx25_flash_shutdown_usart", - ] - } else if (efr32_family == "efr32mg21") { - _include_dirs += [ - "${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart", - "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/inc/sl_mx25_flash_shutdown_usart", - ] - } else if (efr32_family == "efr32mg24") { - _include_dirs += [ - "${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart", - "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/inc/sl_mx25_flash_shutdown_usart", - ] - } } if (efr32_family == "efr32mg12") { @@ -511,31 +503,17 @@ template("efr32_sdk") { if ((defined(invoker.chip_enable_pw_rpc) && invoker.chip_enable_pw_rpc) || chip_build_libshell || enable_openthread_cli || (defined(invoker.show_qr_code) && invoker.show_qr_code) || - (defined(invoker.disable_lcd) && !invoker.disable_lcd)) { + (defined(invoker.disable_lcd) && !invoker.disable_lcd) || + (defined(invoker.use_external_flash) && use_external_flash)) { sources += [ + "${efr32_sdk_root}/hardware/driver/memlcd/src/memlcd_usart/sl_memlcd_spi.c", + "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/src/sl_mx25_flash_shutdown_usart/sl_mx25_flash_shutdown.c", "${efr32_sdk_root}/platform/emdrv/uartdrv/src/uartdrv.c", "${efr32_sdk_root}/platform/emlib/src/em_eusart.c", "${efr32_sdk_root}/platform/emlib/src/em_leuart.c", "${efr32_sdk_root}/platform/emlib/src/em_usart.c", "${sdk_support_root}/matter/efr32/${efr32_family}/${efr32_board}/autogen/sl_uartdrv_init.c", ] - - if (efr32_family == "efr32mg12") { - sources += [ - "${efr32_sdk_root}/hardware/driver/memlcd/src/memlcd_usart/sl_memlcd_spi.c", - "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/src/sl_mx25_flash_shutdown_usart/sl_mx25_flash_shutdown.c", - ] - } else if (efr32_family == "efr32mg21") { - sources += [ - "${efr32_sdk_root}/hardware/driver/memlcd/src/memlcd_usart/sl_memlcd_spi.c", - "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/src/sl_mx25_flash_shutdown_usart/sl_mx25_flash_shutdown.c", - ] - } else if (efr32_family == "efr32mg24") { - sources += [ - "${efr32_sdk_root}/hardware/driver/memlcd/src/memlcd_usart/sl_memlcd_spi.c", - "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/src/sl_mx25_flash_shutdown_usart/sl_mx25_flash_shutdown.c", - ] - } } if ((defined(invoker.show_qr_code) && invoker.show_qr_code) || @@ -557,6 +535,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/middleware/glib/glib/glib_string.c", ] } + if (use_wf200) { sources += [ "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/bus/sl_wfx_bus.c", diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index accc18a5a8812b..30833b582a73f7 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit accc18a5a8812b6c67a1e9e77760cb3f2de18739 +Subproject commit 30833b582a73f73737cbf3df2556184c3728555e