From a2935ba6ecd361bc1d064fee6120da1cd1434f73 Mon Sep 17 00:00:00 2001 From: luomanruo Date: Tue, 5 Sep 2023 15:07:36 +0800 Subject: [PATCH] change: print assert info before dump log --- components/bt/controller/esp32c2/bt.c | 2 +- components/bt/controller/esp32c6/bt.c | 2 +- components/bt/controller/esp32h2/bt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/bt/controller/esp32c2/bt.c b/components/bt/controller/esp32c2/bt.c index 73ce2db305..6f44094427 100644 --- a/components/bt/controller/esp32c2/bt.c +++ b/components/bt/controller/esp32c2/bt.c @@ -246,10 +246,10 @@ static void IRAM_ATTR esp_reset_rpa_moudle(void) static void IRAM_ATTR osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2) { + BT_ASSERT_PRINT("BLE assert: line %d in function %s, param: 0x%x, 0x%x", ln, fn, param1, param2); #if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED esp_ble_controller_log_dump_all(true); #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED - BT_ASSERT_PRINT("BLE assert: line %d in function %s, param: 0x%x, 0x%x", ln, fn, param1, param2); assert(0); } diff --git a/components/bt/controller/esp32c6/bt.c b/components/bt/controller/esp32c6/bt.c index 453ae18364..75dc587092 100644 --- a/components/bt/controller/esp32c6/bt.c +++ b/components/bt/controller/esp32c6/bt.c @@ -251,10 +251,10 @@ static void IRAM_ATTR esp_reset_rpa_moudle(void) static void IRAM_ATTR osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2) { + BT_ASSERT_PRINT("BLE assert: line %d in function %s, param: 0x%x, 0x%x", ln, fn, param1, param2); #if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED esp_ble_controller_log_dump_all(true); #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED - BT_ASSERT_PRINT("BLE assert: line %d in function %s, param: 0x%x, 0x%x", ln, fn, param1, param2); assert(0); } diff --git a/components/bt/controller/esp32h2/bt.c b/components/bt/controller/esp32h2/bt.c index 10bef644e5..29e5a85a36 100644 --- a/components/bt/controller/esp32h2/bt.c +++ b/components/bt/controller/esp32h2/bt.c @@ -248,10 +248,10 @@ static void IRAM_ATTR esp_reset_rpa_moudle(void) static void IRAM_ATTR osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2) { + BT_ASSERT_PRINT("BLE assert: line %d in function %s, param: 0x%x, 0x%x", ln, fn, param1, param2); #if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED esp_ble_controller_log_dump_all(true); #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED - BT_ASSERT_PRINT("BLE assert: line %d in function %s, param: 0x%x, 0x%x", ln, fn, param1, param2); assert(0); }