Fix close rmt log cause some coredump information optimized issue

This commit is contained in:
gengyuchao
2020-08-05 22:18:36 +08:00
committed by maojianxin
parent c4406771fc
commit e148f41d79
3 changed files with 5 additions and 5 deletions

View File

@@ -1500,7 +1500,7 @@ void esp_bt_check_need_restart()
} }
RMT_DBG_LOG_ERROR("BT not alive,INT Core %d EN 0x%x",CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE,_int_enable_flag); RMT_DBG_LOG_ERROR("BT not alive,INT Core %d EN 0x%x",CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE,_int_enable_flag);
} }
abort(); r_assert_with_log(_int_enable_flag,intenable,*((uint32_t*)BT_INT_STA_REG),*((uint32_t*)BLE_INT_STA_REG),(uint32_t)(esp_timer_get_time()/1000));
} }
} }
@@ -1510,7 +1510,7 @@ void bt_abort_with_coredump_log(uint16_t error)
asm volatile ("rsr %0, INTENABLE\n" :"=r"(intenable)); asm volatile ("rsr %0, INTENABLE\n" :"=r"(intenable));
RMT_DBG_LOG_ERROR("abort!0x%x INT R:0x%x EN 0x%x",error,*((uint32_t*)BT_INT_STA_REG),intenable); RMT_DBG_LOG_ERROR("abort!0x%x INT R:0x%x EN 0x%x",error,*((uint32_t*)BT_INT_STA_REG),intenable);
RMT_DBG_LOG_ERROR("BLE INT R:0x%x",*((uint32_t*)BLE_INT_STA_REG)); RMT_DBG_LOG_ERROR("BLE INT R:0x%x",*((uint32_t*)BLE_INT_STA_REG));
__asm__ __volatile__("ill\n"); r_assert_with_log(error,intenable,*((uint32_t*)BT_INT_STA_REG),*((uint32_t*)BLE_INT_STA_REG),(uint32_t)(esp_timer_get_time()/1000));
} }
#endif /* CONFIG_BT_ENABLED */ #endif /* CONFIG_BT_ENABLED */

View File

@@ -469,8 +469,8 @@ extern uint32_t* btdm_rmt_get_fixed_log_addr();
uint32_t btdm_rmt_get_log_buffer_size(); uint32_t btdm_rmt_get_log_buffer_size();
int btdm_rmt_dbg_printf_to_iram(const char* format, ...); 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_ERROR(format, ... ) btdm_rmt_dbg_printf_to_iram(DRAM_STR("E(%d):"format"\n"),(uint32_t)(esp_timer_get_time()/1000), ##__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__); #define RMT_DBG_LOG_DEBUG(format, ... ) btdm_rmt_dbg_printf_to_iram(DRAM_STR("D(%d):"format"\n"),(uint32_t)(esp_timer_get_time()/1000), ##__VA_ARGS__);
#else #else
#define RMT_DBG_LOG_ERROR(...) #define RMT_DBG_LOG_ERROR(...)
#define RMT_DBG_LOG_DEBUG(...) #define RMT_DBG_LOG_DEBUG(...)