Make the timer used for the PIC32 port layer user configurable.
diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c
index 7c22b49..538c9be 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c
@@ -83,6 +83,10 @@
 the first task is being restored. */

 #define portINITIAL_SR				( portIE_BIT | portEXL_BIT )

 

+#ifndef configTICK_INTERRUPT_VECTOR

+	#define configTICK_INTERRUPT_VECTOR _TIMER_1_VECTOR

+#endif

+

 /* Records the interrupt nesting depth.  This starts at one as it will be

 decremented to 0 when the first task starts. */

 volatile unsigned portBASE_TYPE uxInterruptNesting = 0x01;

@@ -101,9 +105,9 @@
  * Place the prototype here to ensure the interrupt vector is correctly installed. 

  * Note that because the interrupt is written in assembly, the IPL setting in the

  * following line of code has no effect.  The interrupt priority is set by the

- * call to ConfigIntTimer1() in prvSetupTimerInterrupt(). 

+ * call to ConfigIntTimer1() in vApplicationSetupTickTimerInterrupt(). 

  */

-extern void __attribute__( (interrupt(ipl1), vector(_TIMER_1_VECTOR))) vT1InterruptHandler( void );

+extern void __attribute__( (interrupt(ipl1), vector( configTICK_INTERRUPT_VECTOR ))) vPortTickInterruptHandler( void );

 

 /*

  * The software interrupt handler that performs the yield.  Note that, because

@@ -152,9 +156,15 @@
 /*-----------------------------------------------------------*/

 

 /*

- * Setup a timer for a regular tick.

+ * Setup a timer for a regular tick.  This function uses peripheral timer 1.

+ * The function is declared weak so an application writer can use a different

+ * timer by redefining this implementation.  If a different timer is used then

+ * configTICK_INTERRUPT_VECTOR must also be defined in FreeRTOSConfig.h to

+ * ensure the RTOS provided tick interrupt handler is installed on the correct

+ * vector number.  When Timer 1 is used the vector number is defined as 

+ * _TIMER_1_VECTOR.

  */

-void prvSetupTimerInterrupt( void )

+__attribute__(( weak )) void vApplicationSetupTickTimerInterrupt( void )

 {

 const unsigned long ulCompareMatch = ( (configPERIPHERAL_CLOCK_HZ / portTIMER_PRESCALE) / configTICK_RATE_HZ ) - 1;

 

@@ -182,7 +192,7 @@
 

 	/* Setup the timer to generate the tick.  Interrupts will have been 

 	disabled by the time we get here. */

-	prvSetupTimerInterrupt();

+	vApplicationSetupTickTimerInterrupt();

 

 	/* Kick off the highest priority task that has been created so far. 

 	Its stack location is loaded into uxSavedTaskStackPointer. */

diff --git a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S
index 8d4a4ea..722a5c3 100644
--- a/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S
+++ b/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S
@@ -79,16 +79,16 @@
  	

  	.global vPortStartFirstTask

 	.global vPortYieldISR

-	.global vT1InterruptHandler

+	.global vPortTickInterruptHandler

 

 

 /******************************************************************/

 

  	.set		noreorder

 	.set 		noat

- 	.ent		vT1InterruptHandler

+ 	.ent		vPortTickInterruptHandler

 	

-vT1InterruptHandler:

+vPortTickInterruptHandler:

 

 	portSAVE_CONTEXT

 

@@ -97,7 +97,7 @@
 

 	portRESTORE_CONTEXT

 

-	.end vT1InterruptHandler

+	.end vPortTickInterruptHandler

 

 /******************************************************************/