From 18aedce685a02d3fa6b4252d7388571647b2d266 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 19 Nov 2021 10:10:07 -0500 Subject: [PATCH] Fix for multi-fabric for efr32 (#11979) * Increase heap * Moved kvs count to be board specific --- examples/lighting-app/efr32/include/FreeRTOSConfig.h | 2 +- third_party/efr32_sdk/efr32_sdk.gni | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/lighting-app/efr32/include/FreeRTOSConfig.h b/examples/lighting-app/efr32/include/FreeRTOSConfig.h index 698305e3403f42..3d241f9a24ce0e 100644 --- a/examples/lighting-app/efr32/include/FreeRTOSConfig.h +++ b/examples/lighting-app/efr32/include/FreeRTOSConfig.h @@ -237,7 +237,7 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #define configENABLE_BACKWARD_COMPATIBILITY (1) #define configSUPPORT_STATIC_ALLOCATION (1) #define configSUPPORT_DYNAMIC_ALLOCATION (1) -#define configTOTAL_HEAP_SIZE ((size_t)(16 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024)) /* Optional functions - most linkers will remove unused functions anyway. */ #define INCLUDE_vTaskPrioritySet (1) diff --git a/third_party/efr32_sdk/efr32_sdk.gni b/third_party/efr32_sdk/efr32_sdk.gni index eac9039f07ca7c..012a10058341e6 100644 --- a/third_party/efr32_sdk/efr32_sdk.gni +++ b/third_party/efr32_sdk/efr32_sdk.gni @@ -132,7 +132,6 @@ template("efr32_sdk") { "${efr32_mcu}=1", "${efr32_board}=1", "SL_SUPRESS_DEPRECATION_WARNINGS_SDK_3_1", - "CHIP_KVS_SECTOR_COUNT=4", "CHIP_KVS_BASE_SECTOR_INDEX=((FLASH_SIZE/FLASH_PAGE_SIZE)-(CHIP_KVS_SECTOR_COUNT))", "CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI=1", "__HEAP_SIZE=0", @@ -164,7 +163,10 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a", ] - defines += [ "EFR32MG12" ] + defines += [ + "EFR32MG12", + "CHIP_KVS_SECTOR_COUNT=6", + ] } else if (efr32_family == "efr32mg21") { _include_dirs += [ "${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart", @@ -187,6 +189,7 @@ template("efr32_sdk") { defines += [ "EFR32MG21", "EFR32_SERIES2_CONFIG1_MICRO", + "CHIP_KVS_SECTOR_COUNT=4", ] } else if (efr32_family == "efr32mg24") { _include_dirs += [ @@ -210,6 +213,7 @@ template("efr32_sdk") { defines += [ "EFR32MG24", "EFR32_SERIES2_CONFIG4_MICRO", + "CHIP_KVS_SECTOR_COUNT=4", ] }