sdf

Dependencies:   mbed-rtos

Fork of mbed-rtos by mbed official

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Fri May 06 19:15:13 2016 +0100
Parent:
113:d9366c711a75
Child:
115:11950e007d8a
Commit message:
Synchronized with git revision c5b4c543c985366d5dea828e1708a3b30889e369

Full URL: https://github.com/mbedmicro/mbed/commit/c5b4c543c985366d5dea828e1708a3b30889e369/

RTOS - fix Cortex-M version - add macros required for new kernel

Changed in this revision

rtx/TARGET_CORTEX_M/cmsis_os.h Show annotated file Show diff for this revision Revisions of this file
rtx/TARGET_CORTEX_M/rt_CMSIS.c Show annotated file Show diff for this revision Revisions of this file
rtx/TARGET_CORTEX_M/rt_Task.h Show annotated file Show diff for this revision Revisions of this file
rtx/TARGET_CORTEX_M/rt_Timer.c Show annotated file Show diff for this revision Revisions of this file
--- a/rtx/TARGET_CORTEX_M/cmsis_os.h	Thu May 05 22:00:15 2016 +0100
+++ b/rtx/TARGET_CORTEX_M/cmsis_os.h	Fri May 06 19:15:13 2016 +0100
@@ -56,6 +56,11 @@
 
 #define CMSIS_OS_RTX
 
+// __MBED_CMSIS_RTOS_CM captures our changes to the RTX kernel
+#define __MBED_CMSIS_RTOS_CM
+// we use __CMSIS_RTOS version, which changes some API in the kernel
+#define __CMSIS_RTOS
+
 // The stack space occupied is mainly dependent on the underling C standard library
 #if defined(TOOLCHAIN_GCC) || defined(TOOLCHAIN_ARM_STD) || defined(TOOLCHAIN_IAR)
 #    define WORDS_STACK_SIZE   512
--- a/rtx/TARGET_CORTEX_M/rt_CMSIS.c	Thu May 05 22:00:15 2016 +0100
+++ b/rtx/TARGET_CORTEX_M/rt_CMSIS.c	Fri May 06 19:15:13 2016 +0100
@@ -48,6 +48,10 @@
   #error "Missing __CORTEX_Mx definition"
 #endif
 
+// This affects cmsis_os only, as it's not used anywhere else. This was left by kernel team
+// to suppress the warning in rt_tid2ptcb about incompatible pointer assignment.
+#define os_thread_cb OS_TCB
+
 #include "rt_TypeDef.h"
 #include "RTX_Config.h"
 #include "rt_System.h"
@@ -62,8 +66,6 @@
 #include "rt_Memory.h"
 #include "rt_HAL_CM.h"
 
-#define os_thread_cb OS_TCB
-
 #include "cmsis_os.h"
 
 #if (osFeature_Signals != 16)
--- a/rtx/TARGET_CORTEX_M/rt_Task.h	Thu May 05 22:00:15 2016 +0100
+++ b/rtx/TARGET_CORTEX_M/rt_Task.h	Fri May 06 19:15:13 2016 +0100
@@ -34,6 +34,8 @@
 
 /* Definitions */
 
+#include "cmsis_os.h"
+
 /* Values for 'state'   */
 #define INACTIVE        0U
 #define READY           1U
--- a/rtx/TARGET_CORTEX_M/rt_Timer.c	Thu May 05 22:00:15 2016 +0100
+++ b/rtx/TARGET_CORTEX_M/rt_Timer.c	Fri May 06 19:15:13 2016 +0100
@@ -36,6 +36,7 @@
 #include "RTX_Config.h"
 #include "rt_Timer.h"
 #include "rt_MemBox.h"
+#include "cmsis_os.h"
 
 #ifndef __CMSIS_RTOS