\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
\r
.set noreorder\r
.set noat\r
+ .section .text, code\r
.ent vPortStartFirstTask\r
\r
vPortStartFirstTask:\r
\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