]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/MPLAB/PIC32MZ/port_asm.S
Update version number ready for release.
[freertos] / FreeRTOS / Source / portable / MPLAB / PIC32MZ / port_asm.S
index dd38ca0b66018a830502b77fef44cddedcd8a463..ec3a5f2eedd83a96d8ae0c2e3a4d426a60182722 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
     the terms of the GNU General Public License (version 2) as published by the\r
     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
 \r
 #include <xc.h>\r
 #include <sys/asm.h>\r
+#include "FreeRTOSConfig.h"\r
 #include "ISR_Support.h"\r
 \r
 \r
-       .set    nomips16\r
-       .set    noreorder\r
-\r
-       .extern pxCurrentTCB\r
-       .extern vTaskSwitchContext\r
-       .extern vPortIncrementTick\r
+       .extern pxCurrentTCB\r
+       .extern vTaskSwitchContext\r
+       .extern vPortIncrementTick\r
        .extern xISRStackTop\r
 \r
-       .global vPortStartFirstTask\r
+       .global vPortStartFirstTask\r
        .global vPortYieldISR\r
        .global vPortTickInterruptHandler\r
 \r
 \r
 /******************************************************************/\r
 \r
-       .set            noreorder\r
-       .set            noat\r
+       .set  nomips16\r
+       .set  nomicromips\r
+       .set  noreorder\r
+       .set  noat\r
+\r
+       /***************************************************************\r
+       *  The following is needed to locate the\r
+       *  vPortTickInterruptHandler function into the correct vector\r
+       ***************************************************************/\r
+       #ifdef configTICK_INTERRUPT_VECTOR\r
+               #if (configTICK_INTERRUPT_VECTOR == _CORE_TIMER_VECTOR)\r
+                       .equ     __vector_dispatch_0, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_0\r
+                       .section .vector_0, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_1_VECTOR)\r
+                       .equ     __vector_dispatch_4, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_4\r
+                       .section .vector_4, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_2_VECTOR)\r
+                       .equ     __vector_dispatch_9, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_9\r
+                       .section .vector_9, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_3_VECTOR)\r
+                       .equ     __vector_dispatch_14, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_14\r
+                       .section .vector_14, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_4_VECTOR)\r
+                       .equ     __vector_dispatch_19, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_19\r
+                       .section .vector_19, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_5_VECTOR)\r
+                       .equ     __vector_dispatch_24, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_24\r
+                       .section .vector_24, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_6_VECTOR)\r
+                       .equ     __vector_dispatch_28, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_28\r
+                       .section .vector_28, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_7_VECTOR)\r
+                       .equ     __vector_dispatch_32, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_32\r
+                       .section .vector_32, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_8_VECTOR)\r
+                       .equ     __vector_dispatch_36, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_36\r
+                       .section .vector_36, code, keep\r
+               #elif (configTICK_INTERRUPT_VECTOR == _TIMER_9_VECTOR)\r
+                       .equ     __vector_dispatch_40, vPortTickInterruptHandler\r
+                       .global  __vector_dispatch_40\r
+                       .section .vector_40, code, keep\r
+               #endif\r
+       #else\r
+               .equ     __vector_dispatch_4, vPortTickInterruptHandler\r
+               .global  __vector_dispatch_4\r
+               .section .vector_4, code, keep\r
+       #endif\r
+\r
        .ent            vPortTickInterruptHandler\r
 \r
 vPortTickInterruptHandler:\r
@@ -102,6 +155,7 @@ vPortTickInterruptHandler:
 \r
        .set            noreorder\r
        .set            noat\r
+       .section .text, code\r
        .ent            vPortStartFirstTask\r
 \r
 vPortStartFirstTask:\r
@@ -116,10 +170,19 @@ vPortStartFirstTask:
 \r
 /*******************************************************************/\r
 \r
-       .set            noreorder\r
-       .set            noat\r
-       .ent            vPortYieldISR\r
-\r
+       .set  nomips16\r
+       .set  nomicromips\r
+       .set  noreorder\r
+       .set  noat\r
+       /***************************************************************\r
+       *  The following is needed to locate the vPortYieldISR function\r
+       *  into the correct vector\r
+       ***************************************************************/\r
+       .equ     __vector_dispatch_1, vPortYieldISR\r
+       .global  __vector_dispatch_1\r
+       .section .vector_1, code\r
+\r
+       .ent  vPortYieldISR\r
 vPortYieldISR:\r
 \r
        /* Make room for the context. First save the current status so it can be\r