diff --git a/rtos/rtx/TARGET_CORTEX_M/cmsis_os.h b/rtos/rtx/TARGET_CORTEX_M/cmsis_os.h index 951f4193b4..788b516855 100644 --- a/rtos/rtx/TARGET_CORTEX_M/cmsis_os.h +++ b/rtos/rtx/TARGET_CORTEX_M/cmsis_os.h @@ -57,9 +57,13 @@ #define CMSIS_OS_RTX // __MBED_CMSIS_RTOS_CM captures our changes to the RTX kernel +#ifndef __MBED_CMSIS_RTOS_CM #define __MBED_CMSIS_RTOS_CM +#endif // we use __CMSIS_RTOS version, which changes some API in the kernel +#ifndef __CMSIS_RTOS #define __CMSIS_RTOS +#endif // The stack space occupied is mainly dependent on the underling C standard library #if defined(TOOLCHAIN_GCC) || defined(TOOLCHAIN_ARM_STD) || defined(TOOLCHAIN_IAR)