Skip to content

Commit 027766e

Browse files
feat(ble): support memory allocation check debug feature on ESP32-C6
1 parent 1ce54a5 commit 027766e

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

components/bt/controller/esp32c6/Kconfig.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,12 @@ menu "Controller debug features"
447447
config BT_LE_PTR_CHECK_ENABLED
448448
bool "Enable boundary check for internal memory"
449449
default n
450+
451+
config BT_LE_MEM_CHECK_ENABLED
452+
bool "Enable memory allocation check"
453+
default n
454+
help
455+
Used in internal tests only. Enable the memory allocation check.
450456
endmenu
451457

452458
config BT_LE_LL_RESOLV_LIST_SIZE

components/bt/controller/esp32c6/bt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,3 +1771,10 @@ ble_capture_info_user_handler(uint8_t type, uint32_t reason, uint32_t param1, ui
17711771
}
17721772
return 0;
17731773
}
1774+
1775+
#if CONFIG_BT_LE_MEM_CHECK_ENABLED
1776+
void ble_memory_count_limit_set(uint16_t count_limit)
1777+
{
1778+
bt_osi_mem_count_limit_set(count_limit);
1779+
}
1780+
#endif // CONFIG_BT_LE_MEM_CHECK_ENABLED

components/bt/include/esp32c6/include/esp_bt.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,10 @@ uint32_t esp_bt_get_lpclk_freq(void);
524524

525525
void esp_bt_set_lpclk_freq(uint32_t clk_freq);
526526

527+
#if CONFIG_BT_LE_MEM_CHECK_ENABLED
528+
void ble_memory_count_limit_set(uint16_t count_limit);
529+
#endif // CONFIG_BT_LE_MEM_CHECK_ENABLED
530+
527531
#ifdef __cplusplus
528532
}
529533
#endif

0 commit comments

Comments
 (0)