diff --git a/components/bt/bt.c b/components/bt/bt.c index 0b78d49190..dd7e75633d 100644 --- a/components/bt/bt.c +++ b/components/bt/bt.c @@ -1408,7 +1408,7 @@ esp_err_t esp_ble_scan_dupilcate_list_flush(void) return ESP_OK; } -void IRAM_ATTR r_assert_with_log(uint32_t error_bit, uint32_t time_slot) +void IRAM_ATTR __attribute__((noinline)) r_assert_with_log(uint32_t error_bit, uint32_t time_slot) { __asm__ __volatile__("ill\n"); } @@ -1418,7 +1418,7 @@ void IRAM_ATTR r_assert_with_log(uint32_t error_bit, uint32_t time_slot) * * After coredump fixing this issue, just delete this function. */ -void IRAM_ATTR r_assert(const char *condition, int param0, int param1, const char *file, int line) +void IRAM_ATTR __attribute__((noinline)) r_assert(const char *condition, int param0, int param1, const char *file, int line) { extern uint32_t btdm_debug_error_get_bit(); extern uint32_t btdm_debug_error_get_time(); @@ -1438,7 +1438,6 @@ extern uint32_t real_bt_isr_count ; extern uint32_t connection_LinkSuperTimeout; extern uint32_t bt_isr_count_arry[16]; - static bool check_bt_is_alive() { static int stop_times = 0; @@ -1467,6 +1466,7 @@ void esp_bt_check_need_restart() if(connection_is_alive() && (check_bt_is_alive()==false)) { ets_printf("!! Check BT is not alive. Abort !!"); + RMT_DBG_LOG_ERROR("BT not alive"); abort(); } } diff --git a/components/bt/include/esp_bt.h b/components/bt/include/esp_bt.h index aba6c18fb5..584b20564c 100644 --- a/components/bt/include/esp_bt.h +++ b/components/bt/include/esp_bt.h @@ -462,6 +462,14 @@ esp_err_t esp_ble_scan_dupilcate_list_flush(void); void esp_bt_check_need_restart(); +extern uint32_t* btdm_rmt_get_dbg_log_addr(); +extern uint32_t* btdm_rmt_get_fixed_log_addr(); +int btdm_rmt_dbg_printf_to_iram(const char* format, ...); + +#define RMT_DBG_LOG_ERROR(format, ... ) btdm_rmt_dbg_printf_to_iram(DRAM_STR("E(%d):"format"\n"),esp_log_timestamp(), ##__VA_ARGS__); +#define RMT_DBG_LOG_DEBUG(format, ... ) btdm_rmt_dbg_printf_to_iram(DRAM_STR("D(%d):"format"\n"),esp_log_timestamp(), ##__VA_ARGS__); + + #ifdef __cplusplus } #endif diff --git a/components/bt/lib b/components/bt/lib index 698eb78610..1991509346 160000 --- a/components/bt/lib +++ b/components/bt/lib @@ -1 +1 @@ -Subproject commit 698eb78610ea04a504dd99a6e1159d1452b301f4 +Subproject commit 19915093465e52b0d891c621c340e49ee1cbeabf