diff --git a/components/bt/bluedroid/btc/core/btc_task.c b/components/bt/bluedroid/btc/core/btc_task.c index c4c5bd2554..d81c2fac44 100644 --- a/components/bt/bluedroid/btc/core/btc_task.c +++ b/components/bt/bluedroid/btc/core/btc_task.c @@ -60,6 +60,8 @@ static xTaskHandle xBtcTaskHandle = NULL; static xQueueHandle xBtcQueue = 0; +void bt_abort_with_coredump_log(void); + static btc_func_t profile_tab[BTC_PID_NUM] = { [BTC_PID_MAIN_INIT] = {btc_main_call_handler, NULL }, [BTC_PID_DEV] = {btc_dev_call_handler, NULL }, @@ -154,7 +156,7 @@ static bt_status_t btc_task_post(btc_msg_t *msg, task_post_t timeout) BTC_TRACE_ERROR("Btc Post failed\n"); #ifdef TASK_MONITOR_MODE ets_printf("!! Btc Post failed.Timeout Abort !!"); - abort(); + bt_abort_with_coredump_log(); #endif return BT_STATUS_BUSY; } diff --git a/components/bt/bluedroid/hci/hci_layer.c b/components/bt/bluedroid/hci/hci_layer.c index c0c10f28d2..ff78c60e49 100644 --- a/components/bt/bluedroid/hci/hci_layer.c +++ b/components/bt/bluedroid/hci/hci_layer.c @@ -33,6 +33,8 @@ #include "osi/mutex.h" #include "osi/fixed_queue.h" +void bt_abort_with_coredump_log(void); + typedef struct { uint16_t opcode; future_t *complete_future; @@ -143,7 +145,7 @@ task_post_status_t hci_host_task_post(task_post_t timeout) if (xQueueSend(xHciHostQueue, &evt, timeout) != pdTRUE) { #ifdef TASK_MONITOR_MODE ets_printf("!! HCI send fail.Timeout Abort !!"); - abort(); + bt_abort_with_coredump_log(); #endif HCI_TRACE_ERROR("xHciHostQueue failed\n"); return TASK_POST_FAIL; diff --git a/components/bt/bluedroid/osi/include/osi/thread.h b/components/bt/bluedroid/osi/include/osi/thread.h index 6ec9409475..275f85e79d 100644 --- a/components/bt/bluedroid/osi/include/osi/thread.h +++ b/components/bt/bluedroid/osi/include/osi/thread.h @@ -81,7 +81,7 @@ typedef enum { #define BTC_TASK_STACK_SIZE (CONFIG_BTC_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) //by menuconfig #define BTC_TASK_NAME "btcT" #define BTC_TASK_PRIO (configMAX_PRIORITIES - 6) -#define BTC_TASK_QUEUE_LEN 300//60 +#define BTC_TASK_QUEUE_LEN 500//60 #define BTC_A2DP_SINK_TASK_PINNED_TO_CORE (TASK_PINNED_TO_CORE) #define BTC_A2DP_SINK_TASK_STACK_SIZE (CONFIG_A2DP_SINK_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) // by menuconfig diff --git a/components/bt/bluedroid/stack/btu/btu_task.c b/components/bt/bluedroid/stack/btu/btu_task.c index 4368ef760f..c0b7700f31 100644 --- a/components/bt/bluedroid/stack/btu/btu_task.c +++ b/components/bt/bluedroid/stack/btu/btu_task.c @@ -81,6 +81,8 @@ extern void avdt_rcv_sync_info (BT_HDR *p_buf); #include "btm_ble_int.h" #endif +void bt_abort_with_coredump_log(void); + //#if (defined(BT_APP_DEMO) && BT_APP_DEMO == TRUE) //#include "bt_app_common.h" //#endif @@ -267,7 +269,7 @@ task_post_status_t btu_task_post(uint32_t sig, void *param, task_post_t timeout) #ifdef TASK_MONITOR_MODE ets_printf("!! Btu Post failed.Timeout Abort !!"); - abort(); + bt_abort_with_coredump_log(); #endif return TASK_POST_FAIL; } diff --git a/components/bt/bt.c b/components/bt/bt.c index 3236a2a21d..aeeee54848 100644 --- a/components/bt/bt.c +++ b/components/bt/bt.c @@ -1438,4 +1438,9 @@ void esp_bt_check_need_restart() } } +void bt_abort_with_coredump_log(void) +{ + __asm__ __volatile__("ill\n"); +} + #endif /* CONFIG_BT_ENABLED */