添加THREADX系统支持

This commit is contained in:
andeyqi
2024-07-03 09:53:06 +08:00
parent 6013293ced
commit a300d9030b
3 changed files with 14 additions and 1 deletions
+9
View File
@@ -214,6 +214,11 @@ static void get_cur_thread_stack_info(uint32_t *sp, uint32_t *start_addr, size_t
osRtxThread_t *thread = osRtxInfo.thread.run.curr;
*start_addr = (uint32_t)thread->stack_mem;
*size = thread->stack_size;
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_THREADX)
TX_THREAD * ptThread = NULL;
TX_THREAD_GET_CURRENT(ptThread);
*start_addr = (uint32_t)ptThread->tx_thread_stack_start;
*size = ptThread->tx_thread_stack_size;
#endif
}
@@ -244,6 +249,10 @@ static const char *get_cur_thread_name(void) {
return vTaskName();
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
return osRtxInfo.thread.run.curr->name;
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_THREADX)
TX_THREAD * ptThread = NULL;
TX_THREAD_GET_CURRENT(ptThread);
return ptThread->tx_thread_name;
#endif
}