Skip to content

Commit

Permalink
Adjustements to keep previous task names size unless using heap monit…
Browse files Browse the repository at this point in the history
…oring and to have significative names when using heap monitoring
  • Loading branch information
lpbeliveau-silabs committed Nov 11, 2022
1 parent cf61c7e commit edf6393
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions examples/lighting-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ efr32_sdk("sdk") {
"OTA_PERIODIC_TIMEOUT=${OTA_periodic_query_timeout}",
]

if (enable_heap_monitoring) {
defines += [ "HEAP_MONITORING" ]
}

if (chip_enable_pw_rpc) {
defines += [
"HAL_VCOM_ENABLE=1",
Expand Down
2 changes: 1 addition & 1 deletion examples/persistent-storage/efr32/include/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) (16 * 1024))

/* Optional functions - most linkers will remove unused functions anyway. */
#define INCLUDE_vTaskPrioritySet (1)
Expand Down
12 changes: 9 additions & 3 deletions examples/platform/efr32/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,13 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
#define configUSE_TICKLESS_IDLE_SIMPLE_DEBUG (1) /* See into vPortSuppressTicksAndSleep source code for explanation */
#define configMAX_PRIORITIES (56)
#define configMINIMAL_STACK_SIZE (320) /* Number of words to use for Idle and Timer stacks */
#define configMAX_TASK_NAME_LEN (12)

#ifdef HEAP_MONITORING
#define configMAX_TASK_NAME_LEN (24)
#else
#define configMAX_TASK_NAME_LEN (10)
#endif // HEAP_MONITORING

#define configUSE_16_BIT_TICKS (0)
#define configIDLE_SHOULD_YIELD (1)
#define configUSE_MUTEXES (1)
Expand All @@ -198,9 +204,9 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */

#ifndef configTOTAL_HEAP_SIZE
#ifdef SL_WIFI
#define configTOTAL_HEAP_SIZE ((size_t)(34 * 1024))
#define configTOTAL_HEAP_SIZE ((size_t) (34 * 1024))
#else
#define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024))
#define configTOTAL_HEAP_SIZE ((size_t) (20 * 1024))
#endif
#endif // configTOTAL_HEAP_SIZE

Expand Down
4 changes: 2 additions & 2 deletions examples/platform/efr32/MemMonitoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "FreeRTOS.h"
#include <platform/CHIPDeviceLayer.h>

#define BLE_STACK_TASK_NAME "Bluetooth s"
#define BLE_LINK_TASK_NAME "Bluetooth l"
#define BLE_STACK_TASK_NAME "Bluetooth stack"
#define BLE_LINK_TASK_NAME "Bluetooth linklayer"

static StackType_t monitoringStack[MONITORING_STACK_SIZE_byte / sizeof(StackType_t)];
static StaticTask_t monitoringTaskStruct;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/EFR32/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL 0

#ifndef CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME
#define CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME "Bluetooth e"
#define CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME "Bluetooth event handler"
#endif // CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME

#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25

0 comments on commit edf6393

Please sign in to comment.