]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/Renesas/SH2A_FPU/port.c
Update version number to 9.0.0rc2.
[freertos] / FreeRTOS / Source / portable / Renesas / SH2A_FPU / port.c
index 5e3d6788572693fa3264f371c73544f08f8517eb..9ab2d1fff2a4fe2521d3ee625a86e39e6a08310d 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
 value is for all interrupts to be enabled. */\r
 #define portINITIAL_SR                         ( 0UL )\r
 \r
-/* Dimensions the array into which the floating point context is saved.  \r
+/* Dimensions the array into which the floating point context is saved.\r
 Allocate enough space for FPR0 to FPR15, FPUL and FPSCR, each of which is 4\r
 bytes big.  If this number is changed then the 72 in portasm.src also needs\r
 changing. */\r
 #define portFLOP_REGISTERS_TO_STORE    ( 18 )\r
 #define portFLOP_STORAGE_SIZE          ( portFLOP_REGISTERS_TO_STORE * 4 )\r
 \r
+#if( configSUPPORT_DYNAMIC_ALLOCATION == 0 )\r
+       #error configSUPPORT_DYNAMIC_ALLOCATION must be 1 to use this port.\r
+#endif\r
+\r
 /*-----------------------------------------------------------*/\r
 \r
 /*\r
@@ -110,8 +114,8 @@ extern uint32_t ulPortGetGBR( void );
 \r
 /*-----------------------------------------------------------*/\r
 \r
-/* \r
- * See header file for description. \r
+/*\r
+ * See header file for description.\r
  */\r
 StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )\r
 {\r
@@ -124,17 +128,17 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        pxTopOfStack--;\r
 \r
        /* SR. */\r
-       *pxTopOfStack = portINITIAL_SR; \r
+       *pxTopOfStack = portINITIAL_SR;\r
        pxTopOfStack--;\r
-       \r
+\r
        /* PC. */\r
        *pxTopOfStack = ( uint32_t ) pxCode;\r
        pxTopOfStack--;\r
-       \r
+\r
        /* PR. */\r
        *pxTopOfStack = 15;\r
        pxTopOfStack--;\r
-       \r
+\r
        /* 14. */\r
        *pxTopOfStack = 14;\r
        pxTopOfStack--;\r
@@ -190,22 +194,22 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
        /* R1. */\r
        *pxTopOfStack = 1;\r
        pxTopOfStack--;\r
-       \r
+\r
        /* R0 */\r
        *pxTopOfStack = 0;\r
        pxTopOfStack--;\r
-       \r
+\r
        /* MACL. */\r
        *pxTopOfStack = 16;\r
        pxTopOfStack--;\r
-       \r
+\r
        /* MACH. */\r
        *pxTopOfStack = 17;\r
        pxTopOfStack--;\r
-       \r
+\r
        /* GBR. */\r
        *pxTopOfStack = ulPortGetGBR();\r
-       \r
+\r
        /* GBR = global base register.\r
           VBR = vector base register.\r
           TBR = jump table base register.\r
@@ -220,7 +224,7 @@ BaseType_t xPortStartScheduler( void )
 extern void vApplicationSetupTimerInterrupt( void );\r
 \r
        /* Call an application function to set up the timer that will generate the\r
-       tick interrupt.  This way the application can decide which peripheral to \r
+       tick interrupt.  This way the application can decide which peripheral to\r
        use.  A demo application is provided to show a suitable example. */\r
        vApplicationSetupTimerInterrupt();\r
 \r
@@ -252,11 +256,11 @@ int32_t lInterruptMask;
 \r
        /* taskYIELD() can only be called from a task, not an interrupt, so the\r
        current interrupt mask can only be 0 or portKERNEL_INTERRUPT_PRIORITY and\r
-       the mask can be set without risk of accidentally lowering the mask value. */    \r
+       the mask can be set without risk of accidentally lowering the mask value. */\r
        set_imask( portKERNEL_INTERRUPT_PRIORITY );\r
-       \r
+\r
        trapa( portYIELD_TRAP_NO );\r
-       \r
+\r
        /* Restore the interrupt mask to whatever it was previously (when the\r
        function was entered). */\r
        set_imask( ( int ) lInterruptMask );\r
@@ -282,26 +286,26 @@ extern void * volatile pxCurrentTCB;
 \r
        /* Allocate a buffer large enough to hold all the flop registers. */\r
        pulFlopBuffer = ( uint32_t * ) pvPortMalloc( portFLOP_STORAGE_SIZE );\r
-       \r
+\r
        if( pulFlopBuffer != NULL )\r
        {\r
                /* Start with the registers in a benign state. */\r
                memset( ( void * ) pulFlopBuffer, 0x00, portFLOP_STORAGE_SIZE );\r
-               \r
+\r
                /* The first thing to get saved in the buffer is the FPSCR value -\r
                initialise this to the current FPSCR value. */\r
                *pulFlopBuffer = get_fpscr();\r
-               \r
-               /* Use the task tag to point to the flop buffer.  Pass pointer to just \r
+\r
+               /* Use the task tag to point to the flop buffer.  Pass pointer to just\r
                above the buffer because the flop save routine uses a pre-decrement. */\r
-               vTaskSetApplicationTaskTag( xTask, ( void * ) ( pulFlopBuffer + portFLOP_REGISTERS_TO_STORE ) );                \r
+               vTaskSetApplicationTaskTag( xTask, ( void * ) ( pulFlopBuffer + portFLOP_REGISTERS_TO_STORE ) );\r
                xReturn = pdPASS;\r
        }\r
        else\r
        {\r
                xReturn = pdFAIL;\r
        }\r
-       \r
+\r
        return xReturn;\r
 }\r
 /*-----------------------------------------------------------*/\r