|
发表于 2024-4-3 15:26:12
|
显示全部楼层
RTT的原因,修改一下cmb_en_us.h和cmbacktrace.c
```
//[PRINT_CALL_STACK_INFO] = "Show more call stack info by run: addr2line -e %s%s -afpiC %.*s",
[PRINT_CALL_STACK_INFO] = "Show more call stack info by run: addr2line -e %s%s -a -f %s",
```
```
static void print_call_stack(uint32_t sp) {
size_t i, cur_depth = 0;
uint32_t call_stack_buf[CMB_CALL_STACK_MAX_DEPTH] = {0};
cur_depth = cm_backtrace_call_stack(call_stack_buf, CMB_CALL_STACK_MAX_DEPTH, sp);
for (i = 0; i < cur_depth; i++) {
sprintf(call_stack_info + i * (8 + 1), "%08lx", (unsigned long)call_stack_buf);
call_stack_info[i * (8 + 1) + 8] = ' ';
}
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);
cmb_println(print_info[PRINT_CALL_STACK_INFO], fw_name, CMB_ELF_FILE_EXTENSION_NAME,call_stack_info);
} else {
cmb_println(print_info[PRINT_CALL_STACK_ERR]);
}
}
``` |
|