mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
feat(ble): support enhanced controller log capabilities on ESP32-C2
(cherry picked from commit bbcb4a2e1f
)
Co-authored-by: zwl <zhaoweiliang@espressif.com>
This commit is contained in:
@@ -390,6 +390,19 @@ config BT_LE_LOG_HCI_BUF_SIZE
|
|||||||
help
|
help
|
||||||
Configure the size of the BLE HCI LOG buffer.
|
Configure the size of the BLE HCI LOG buffer.
|
||||||
|
|
||||||
|
config BT_LE_CONTROLLER_LOG_WRAP_PANIC_HANDLER_ENABLE
|
||||||
|
bool "Enable wrap panic handler"
|
||||||
|
depends on BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Wrap esp_panic_handler to get controller logs when PC pointer exception crashes.
|
||||||
|
|
||||||
|
config BT_LE_CONTROLLER_LOG_TASK_WDT_USER_HANDLER_ENABLE
|
||||||
|
bool "Enable esp_task_wdt_isr_user_handler implementation"
|
||||||
|
depends on BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Implement esp_task_wdt_isr_user_handler to get controller logs when task wdt issue is triggered.
|
||||||
config BT_LE_LL_RESOLV_LIST_SIZE
|
config BT_LE_LL_RESOLV_LIST_SIZE
|
||||||
int "BLE LL Resolving list size"
|
int "BLE LL Resolving list size"
|
||||||
range 1 5
|
range 1 5
|
||||||
|
@@ -456,6 +456,21 @@ void esp_ble_controller_log_dump_all(bool output)
|
|||||||
portEXIT_CRITICAL_SAFE(&spinlock);
|
portEXIT_CRITICAL_SAFE(&spinlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if CONFIG_BT_LE_CONTROLLER_LOG_TASK_WDT_USER_HANDLER_ENABLE
|
||||||
|
void esp_task_wdt_isr_user_handler(void)
|
||||||
|
{
|
||||||
|
esp_ble_controller_log_dump_all(true);
|
||||||
|
}
|
||||||
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_TASK_WDT_USER_HANDLER_ENABLE
|
||||||
|
|
||||||
|
#if CONFIG_BT_LE_CONTROLLER_LOG_WRAP_PANIC_HANDLER_ENABLE
|
||||||
|
void __real_esp_panic_handler(void *info);
|
||||||
|
void __wrap_esp_panic_handler (void *info)
|
||||||
|
{
|
||||||
|
esp_ble_controller_log_dump_all(true);
|
||||||
|
__real_esp_panic_handler(info);
|
||||||
|
}
|
||||||
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_WRAP_PANIC_HANDLER_ENABLE
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
|
||||||
/* This variable tells if BLE is running */
|
/* This variable tells if BLE is running */
|
||||||
|
Reference in New Issue
Block a user