]> git.sur5r.net Git - freertos/commitdiff
Work in progress still.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 12 Feb 2008 21:50:24 +0000 (21:50 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 12 Feb 2008 21:50:24 +0000 (21:50 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@171 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/Softune/MB96340/port.c
Source/portable/Softune/MB96340/portmacro.h

index bece34f9b6fa6d851bf2107d82f57eed8cf2f9f7..6ab130b802a60550410464dd10f3e302be0c487b 100644 (file)
  * Implementation of functions defined in portable.h for the 16FX port.\r
  *----------------------------------------------------------*/\r
 \r
-/* \r
- * The below define should be same as the option selected by the Memory \r
- * Model (Project->Setup Project->C Compiler->Catagory->Target Depend ) \r
- */\r
-#define configMEMMODEL portMEDIUM\r
-\r
-/*-----------------------------------------------------------*/\r
-\r
 /* \r
  * Get current value of DPR and ADB registers \r
  */\r
@@ -77,7 +69,7 @@ portCHAR xGet_RP( void );
  */\r
 static void prvSetupRLT0Interrupt( void );\r
 \r
-/*-----------------------------------------------------------*/                \r
+/*-----------------------------------------------------------*/\r
 \r
 /* \r
  * We require the address of the pxCurrentTCB variable, but don't want to know\r
@@ -87,7 +79,7 @@ typedef void tskTCB;
 extern volatile tskTCB * volatile pxCurrentTCB;\r
 \r
 /* Constants required to handle critical sections. */\r
-#define portNO_CRITICAL_NESTING                ( ( unsigned portBASE_TYPE ) 0x1234 )\r
+#define portNO_CRITICAL_NESTING                ( ( unsigned portBASE_TYPE ) 0 )\r
 volatile unsigned portBASE_TYPE uxCriticalNesting = 9999UL;\r
 \r
 /*-----------------------------------------------------------*/\r
@@ -130,6 +122,11 @@ volatile unsigned portBASE_TYPE uxCriticalNesting = 9999UL;
                                __asm(" AND  CCR,#H'DF ");                                                      \\r
                                __asm(" PUSHW  A ");                                                                    \\r
                                __asm(" PUSHW (RW0,RW1,RW2,RW3,RW4,RW5,RW6,RW7) ");             \\r
+                                                                                                                                               \\r
+                               /* Save the critical nesting count to the stack. */             \\r
+                               __asm(" MOVW RW0, _uxCriticalNesting ");                                \\r
+                               __asm(" PUSHW (RW0) ");                                                                 \\r
+                                                                                                                                               \\r
                                __asm(" MOVW A, _pxCurrentTCB ");                                               \\r
                                __asm(" MOVW A, SP ");                                                                  \\r
                                __asm(" SWAPW ");                                                                               \\r
@@ -153,7 +150,7 @@ volatile unsigned portBASE_TYPE uxCriticalNesting = 9999UL;
                                __asm(" AND  CCR,#H'DF ");                                                      \\r
                                __asm(" MOVW SP, A ");                                                                  \\r
                                                                                                                                                \\r
-                               /* Load the saves uxCriticalNesting value into RW0. */  \\r
+                               /* Load the saved uxCriticalNesting value into RW0. */  \\r
                                __asm(" POPW (RW0) ");                                                                  \\r
                                                                                                                                                \\r
                                /* Save the loaded value into the uxCriticalNesting variable. */ \\r
index 09f1df19a127814180e0d6ddc6a9542809c04680..cd7b60fa2a5c1a5e7abd1fcd613a3e754fab7dab 100644 (file)
 #include "mb96348hs.h"\r
 #include <stddef.h>\r
 \r
+#define portSMALL     0\r
+#define portMEDIUM    1\r
+#define portCOMPACT   2\r
+#define portLARGE     3\r
+\r
 \r
 /*-----------------------------------------------------------\r
  * Port specific definitions.  \r