Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix/ble_defines_mem_monitoring (#23531)
Browse files Browse the repository at this point in the history
* Added defines for BLE tasks to allow heap monitoring to get their task handles

* Adjustements to keep previous task names size unless using heap monitoring and to have significative names when using heap monitoring

* Restyled by clang-format

Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Andrei Litvin <andy314@gmail.com>
3 people authored and pull[bot] committed Jul 10, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent fc32c74 commit de86028
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/lighting-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
@@ -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",
6 changes: 6 additions & 0 deletions examples/platform/efr32/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
@@ -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 */

#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)
3 changes: 3 additions & 0 deletions examples/platform/efr32/MemMonitoring.cpp
Original file line number Diff line number Diff line change
@@ -22,6 +22,9 @@
#include "FreeRTOS.h"
#include <platform/CHIPDeviceLayer.h>

#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;

2 changes: 1 addition & 1 deletion src/platform/EFR32/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
@@ -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 "BLE_EVENT"
#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 de86028

Please sign in to comment.