1
0
mirror of https://github.com/armink/CmBacktrace.git synced 2025-01-25 00:22:53 +08:00

【新增】RT-Thread 5.0 的支持

This commit is contained in:
朱天龙 (Armink) 2023-08-20 13:36:55 +08:00
parent 4abadfa0c4
commit 602044a30d

View File

@ -220,7 +220,11 @@ static void get_cur_thread_stack_info(uint32_t *sp, uint32_t *start_addr, size_t
*/
static const char *get_cur_thread_name(void) {
#if (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_RTT)
#if (RT_VER_NUM < 0x50001)
return rt_thread_self()->name;
#else
return rt_thread_self()->parent.name;
#endif
#elif (CMB_OS_PLATFORM_TYPE == CMB_OS_PLATFORM_UCOSII)
extern OS_TCB *OSTCBCur;