@@ -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;
|
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;
|
||||||
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,6 +249,10 @@ static const char *get_cur_thread_name(void) {
|
|||||||
return vTaskName();
|
return vTaskName();
|
||||||
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
|
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
|
||||||
return osRtxInfo.thread.run.curr->name;
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
/* enable OS platform */
|
/* enable OS platform */
|
||||||
/* #define CMB_USING_OS_PLATFORM */
|
/* #define CMB_USING_OS_PLATFORM */
|
||||||
/* OS platform type, must config when CMB_USING_OS_PLATFORM is enable */
|
/* OS platform type, must config when CMB_USING_OS_PLATFORM is enable */
|
||||||
/* #define CMB_OS_PLATFORM_TYPE CMB_OS_PLATFORM_RTT or CMB_OS_PLATFORM_UCOSII or CMB_OS_PLATFORM_UCOSIII or CMB_OS_PLATFORM_FREERTOS or CMB_OS_PLATFORM_RTX5 */
|
/* #define CMB_OS_PLATFORM_TYPE CMB_OS_PLATFORM_RTT or CMB_OS_PLATFORM_UCOSII or CMB_OS_PLATFORM_UCOSIII or CMB_OS_PLATFORM_FREERTOS or CMB_OS_PLATFORM_RTX5 or CMB_OS_PLATFORM_THREADX */
|
||||||
/* cpu platform type, must config by user */
|
/* cpu platform type, must config by user */
|
||||||
#define CMB_CPU_PLATFORM_TYPE /* CMB_CPU_ARM_CORTEX_M0 or CMB_CPU_ARM_CORTEX_M3 or CMB_CPU_ARM_CORTEX_M4 or CMB_CPU_ARM_CORTEX_M7 or CMB_CPU_ARM_CORTEX_M33 */
|
#define CMB_CPU_PLATFORM_TYPE /* CMB_CPU_ARM_CORTEX_M0 or CMB_CPU_ARM_CORTEX_M3 or CMB_CPU_ARM_CORTEX_M4 or CMB_CPU_ARM_CORTEX_M7 or CMB_CPU_ARM_CORTEX_M33 */
|
||||||
/* enable dump stack information */
|
/* enable dump stack information */
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
#define CMB_OS_PLATFORM_UCOSIII 2
|
#define CMB_OS_PLATFORM_UCOSIII 2
|
||||||
#define CMB_OS_PLATFORM_FREERTOS 3
|
#define CMB_OS_PLATFORM_FREERTOS 3
|
||||||
#define CMB_OS_PLATFORM_RTX5 4
|
#define CMB_OS_PLATFORM_RTX5 4
|
||||||
|
#define CMB_OS_PLATFORM_THREADX 5
|
||||||
|
|
||||||
#define CMB_PRINT_LANGUAGE_ENGLISH 0
|
#define CMB_PRINT_LANGUAGE_ENGLISH 0
|
||||||
#define CMB_PRINT_LANGUAGE_CHINESE 1
|
#define CMB_PRINT_LANGUAGE_CHINESE 1
|
||||||
@@ -348,6 +349,9 @@ if (!(EXPR)) \
|
|||||||
extern char * vTaskName(void);
|
extern char * vTaskName(void);
|
||||||
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
|
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTX5)
|
||||||
#include "rtx_os.h"
|
#include "rtx_os.h"
|
||||||
|
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_THREADX)
|
||||||
|
#include "tx_api.h"
|
||||||
|
#include "tx_thread.h"
|
||||||
#else
|
#else
|
||||||
#error "not supported OS type"
|
#error "not supported OS type"
|
||||||
#endif /* (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTT) */
|
#endif /* (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTT) */
|
||||||
|
|||||||
Reference in New Issue
Block a user