From 87b97f55102d1630755403156de244bc787d2f11 Mon Sep 17 00:00:00 2001
From: Richard Barry <ribarry@amazon.com>
Date: Mon, 25 Jul 2011 15:38:19 +0000
Subject: [PATCH] Update PIC32 asm code ready for MPLAB compiler V2.

---
 Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S | 12 ++++++++++--
 Demo/PIC32MX_MPLAB/RegisterTestTasks.s | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S b/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S
index ec1af725aa..f4875e85b9 100644
--- a/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S
+++ b/Demo/PIC32MX_MPLAB/IntQueueTimer_isr.S
@@ -70,7 +70,11 @@
 
 /******************************************************************/
 
- 	.section 	.FreeRTOS, "ax", @progbits
+	#if (__C32_VERSION__ >= 2 )
+		.section 	.FreeRTOS, code
+	#else
+		.section 	.FreeRTOS, "ax", @progbits
+	#endif
  	.set		noreorder
 	.set 		noat
  	.ent		vT3InterruptWrapper
@@ -88,7 +92,11 @@ vT3InterruptWrapper:
 
 /******************************************************************/
 
- 	.section 	.FreeRTOS, "ax", @progbits
+	#if (__C32_VERSION__ >= 2 )
+		.section 	.FreeRTOS, code
+	#else
+		.section 	.FreeRTOS, "ax", @progbits
+	#endif
  	.set		noreorder
 	.set 		noat
  	.ent		vT4InterruptWrapper
diff --git a/Demo/PIC32MX_MPLAB/RegisterTestTasks.s b/Demo/PIC32MX_MPLAB/RegisterTestTasks.s
index c1816dae69..2d9393b85d 100644
--- a/Demo/PIC32MX_MPLAB/RegisterTestTasks.s
+++ b/Demo/PIC32MX_MPLAB/RegisterTestTasks.s
@@ -63,7 +63,11 @@
  	.global vRegTest2
 
 
-/*	.section	.FreeRTOS, ax, @progbits */
+	#if (__C32_VERSION__ >= 2 )
+		.section 	.FreeRTOS, code
+	#else
+		.section 	.FreeRTOS, "ax", @progbits
+	#endif
 	.set		noreorder
 	.set 		noat
 	.ent		vRegTest1
@@ -203,7 +207,11 @@ vRegTest1:
 	.end		vRegTest1
 
 
-/*	.section	.FreeRTOS, ax, @progbits */
+	#if (__C32_VERSION__ >= 2 )
+		.section 	.FreeRTOS, code
+	#else
+		.section 	.FreeRTOS, "ax", @progbits
+	#endif
 	.set		noreorder
 	.set 		noat
 	.ent		vRegTest2