From c534295225c278fd63168acb8da21a32b02deb86 Mon Sep 17 00:00:00 2001 From: gengyuchao Date: Tue, 14 Jul 2020 14:49:27 +0800 Subject: [PATCH] Init log function in esp_bt_controller_init --- components/bt/bt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/bt/bt.c b/components/bt/bt.c index dd7e75633d..3f56be7b5d 100644 --- a/components/bt/bt.c +++ b/components/bt/bt.c @@ -45,6 +45,7 @@ #include "esp_clk.h" #include "esp_coexist_internal.h" #include "hli_api.h" +#include "esp_core_dump.h" #if CONFIG_BT_ENABLED #define CONFIG_BT_HLIGH_LEVEL_INT @@ -1021,6 +1022,10 @@ static void hli_queue_setup_pinned_to_core(int core_id) } } +uint32_t get_rmt_log_len(){ + return IRAM_LOG_BUFFER_SIZE; +} + esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) { @@ -1139,7 +1144,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) #endif btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED; - + +#ifdef CONFIG_ESP32_ENABLE_COREDUMP + esp_log_dump_init(get_rmt_log_len, btdm_rmt_get_fixed_log_addr); +#else + #warning "coredump function is not enabled" +#endif return ESP_OK; error: