增加rtx5支持,修改字符格式化方式适应更多场合,并对齐代码
This commit is contained in:
@@ -208,9 +208,9 @@ static void get_cur_thread_stack_info(uint32_t sp, uint32_t *start_addr, size_t
|
|||||||
*start_addr = (uint32_t)vTaskStackAddr();
|
*start_addr = (uint32_t)vTaskStackAddr();
|
||||||
*size = vTaskStackSize() * sizeof( StackType_t );
|
*size = vTaskStackSize() * sizeof( StackType_t );
|
||||||
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
|
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
|
||||||
osRtxThread_t *thread = osRtxInfo.thread.run.curr;
|
osRtxThread_t *thread = osRtxInfo.thread.run.curr;
|
||||||
*start_addr = (uint32_t)thread->stack_mem;
|
*start_addr = (uint32_t)thread->stack_mem;
|
||||||
*size = thread->stack_size;
|
*size = thread->stack_size;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,8 +236,8 @@ static const char *get_cur_thread_name(void) {
|
|||||||
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_FREERTOS)
|
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_FREERTOS)
|
||||||
return vTaskName();
|
return vTaskName();
|
||||||
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
|
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
|
||||||
osThreadId_t id = osThreadGetId();
|
osThreadId_t id = osThreadGetId();
|
||||||
return osThreadGetName(id);
|
return osThreadGetName(id);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,9 +378,8 @@ static void print_call_stack(uint32_t sp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cur_depth) {
|
if (cur_depth) {
|
||||||
call_stack_info[cur_depth * (8 + 1) - 1] = '\0';
|
call_stack_info[cur_depth * (8 + 1) - 1] = '\0';
|
||||||
cmb_println(print_info[PRINT_CALL_STACK_INFO], fw_name, CMB_ELF_FILE_EXTENSION_NAME,
|
cmb_println(print_info[PRINT_CALL_STACK_INFO], fw_name, CMB_ELF_FILE_EXTENSION_NAME, call_stack_info);
|
||||||
call_stack_info);
|
|
||||||
} else {
|
} else {
|
||||||
cmb_println(print_info[PRINT_CALL_STACK_ERR]);
|
cmb_println(print_info[PRINT_CALL_STACK_ERR]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user