Skip to content

Commit 0fd3721

Browse files
committed
[RTOS] Fixed online compiler macro warnings
Added an #ifndef directive to the __MBED_CMSIS_RTOS_CM and __CMSIS_RTOS macro definitions in order to prevent "Incompatible redefinition of macro" warnings from the online compiler.
1 parent cd9f933 commit 0fd3721

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rtos/rtx/TARGET_CORTEX_M/cmsis_os.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@
5757
#define CMSIS_OS_RTX
5858

5959
// __MBED_CMSIS_RTOS_CM captures our changes to the RTX kernel
60+
#ifndef __MBED_CMSIS_RTOS_CM
6061
#define __MBED_CMSIS_RTOS_CM
62+
#endif
6163
// we use __CMSIS_RTOS version, which changes some API in the kernel
64+
#ifndef __CMSIS_RTOS
6265
#define __CMSIS_RTOS
66+
#endif
6367

6468
// The stack space occupied is mainly dependent on the underling C standard library
6569
#if defined(TOOLCHAIN_GCC) || defined(TOOLCHAIN_ARM_STD) || defined(TOOLCHAIN_IAR)

0 commit comments

Comments
 (0)