|
|
|
|
@ -110,7 +110,7 @@ static const char * const print_info[] = {
|
|
|
|
|
[PRINT_MAIN_STACK_INFO] = "====== Main stack information ======",
|
|
|
|
|
[PRINT_THREAD_STACK_OVERFLOW] = "Error: Thread stack(%08x) was overflow",
|
|
|
|
|
[PRINT_MAIN_STACK_OVERFLOW] = "Error: Main stack(%08x) was overflow",
|
|
|
|
|
[PRINT_CALL_STACK_INFO] = "Show more call stack info by run: addr2line -e %s%s -a -f %.*s",
|
|
|
|
|
[PRINT_CALL_STACK_INFO] = "Show more call stack info by run: addr2line -e %s%s -a -f ",
|
|
|
|
|
[PRINT_CALL_STACK_ERR] = "Dump call stack has an error",
|
|
|
|
|
[PRINT_FAULT_ON_THREAD] = "Fault on thread %s",
|
|
|
|
|
[PRINT_FAULT_ON_HANDLER] = "Fault on interrupt or bare metal(no OS) environment",
|
|
|
|
|
@ -140,7 +140,7 @@ static const char * const print_info[] = {
|
|
|
|
|
[PRINT_DFSR_EXTERNAL] = "Debug fault is caused by EDBGRQ signal asserted",
|
|
|
|
|
[PRINT_MMAR] = "The memory management fault occurred address is %08x",
|
|
|
|
|
[PRINT_BFAR] = "The bus fault occurred address is %08x",
|
|
|
|
|
#elif (CMB_PRINT_LANGUAGE == CMB_PRINT_LANUUAGE_CHINESE)
|
|
|
|
|
#elif (CMB_PRINT_LANGUAGE == CMB_PRINT_LANGUAGE_CHINESE)
|
|
|
|
|
[PRINT_FIRMWARE_INFO] = "固件名称:%s,硬件版本号:%s,软件版本号:%s",
|
|
|
|
|
[PRINT_ASSERT_ON_THREAD] = "在线程(%s)中发生断言",
|
|
|
|
|
[PRINT_ASSERT_ON_HANDLER] = "在中断或裸机环境下发生断言",
|
|
|
|
|
@ -148,7 +148,7 @@ static const char * const print_info[] = {
|
|
|
|
|
[PRINT_MAIN_STACK_INFO] = "============ 主堆栈信息 ============",
|
|
|
|
|
[PRINT_THREAD_STACK_OVERFLOW] = "错误:线程栈(%08x)发生溢出",
|
|
|
|
|
[PRINT_MAIN_STACK_OVERFLOW] = "错误:主栈(%08x)发生溢出",
|
|
|
|
|
[PRINT_CALL_STACK_INFO] = "查看更多函数调用栈信息,请运行:addr2line -e %s%s -a -f %.*s",
|
|
|
|
|
[PRINT_CALL_STACK_INFO] = "查看更多函数调用栈信息,请运行:addr2line -e %s%s -a -f ",
|
|
|
|
|
[PRINT_CALL_STACK_ERR] = "获取函数调用栈失败",
|
|
|
|
|
[PRINT_FAULT_ON_THREAD] = "在线程(%s)中发生错误异常",
|
|
|
|
|
[PRINT_FAULT_ON_HANDLER] = "在中断或裸机环境下发生错误异常",
|
|
|
|
|
@ -408,8 +408,9 @@ static void print_call_stack(uint32_t sp) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (cur_depth) {
|
|
|
|
|
cmb_println(print_info[PRINT_CALL_STACK_INFO], fw_name, CMB_ELF_FILE_EXTENSION_NAME, cur_depth * (8 + 1),
|
|
|
|
|
call_stack_info);
|
|
|
|
|
// Keil5 may not parse %.*s properly, `call_stack_info` has to be parsed on a new print call.
|
|
|
|
|
cmb_print(print_info[PRINT_CALL_STACK_INFO], fw_name, CMB_ELF_FILE_EXTENSION_NAME, cur_depth * (8 + 1));
|
|
|
|
|
cmb_println("%s", call_stack_info);
|
|
|
|
|
} else {
|
|
|
|
|
cmb_println(print_info[PRINT_CALL_STACK_ERR]);
|
|
|
|
|
}
|
|
|
|
|
|