Skip to content

Commit 9aee702

Browse files
committed
RTX - pull cmsis_os into rt_Timer
This causing a warning in the rt_cmsis.c, as they use preprocessor to redefine a type. A fix is to move the macro above, as it should not change anything else. This should be removed, and use a cast, however I am not fully familiar why they do this macro trick.
1 parent def8419 commit 9aee702

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
#error "Missing __CORTEX_Mx definition"
4949
#endif
5050

51+
// This affects cmsis_os only, as it's not used anywhere else. This was left by kernel team
52+
// to suppress the warning in rt_tid2ptcb about incompatible pointer assignment.
53+
#define os_thread_cb OS_TCB
54+
5155
#include "rt_TypeDef.h"
5256
#include "RTX_Config.h"
5357
#include "rt_System.h"
@@ -62,8 +66,6 @@
6266
#include "rt_Memory.h"
6367
#include "rt_HAL_CM.h"
6468

65-
#define os_thread_cb OS_TCB
66-
6769
#include "cmsis_os.h"
6870

6971
#if (osFeature_Signals != 16)

libraries/rtos/rtx/TARGET_CORTEX_M/rt_Timer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "RTX_Config.h"
3737
#include "rt_Timer.h"
3838
#include "rt_MemBox.h"
39+
#include "cmsis_os.h"
3940

4041
#ifndef __CMSIS_RTOS
4142

0 commit comments

Comments
 (0)