Add usage of portREMOVE_STATIC_QUALIFIER.
diff --git a/Source/portable/MPLAB/PIC18F/portmacro.h b/Source/portable/MPLAB/PIC18F/portmacro.h
index 95ace94..c12e3a4 100644
--- a/Source/portable/MPLAB/PIC18F/portmacro.h
+++ b/Source/portable/MPLAB/PIC18F/portmacro.h
@@ -116,6 +116,11 @@
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

 /*-----------------------------------------------------------*/

 

+/* Required by the kernel aware debugger. */

+#ifdef __DEBUG

+	#define portREMOVE_STATIC_QUALIFIER

+#endif

+

 

 #define portNOP()				_asm	\

 									NOP \

diff --git a/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h b/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h
index 51d6775..2f47226 100644
--- a/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h
+++ b/Source/portable/MPLAB/PIC24_dsPIC/portmacro.h
@@ -113,6 +113,10 @@
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

 /*-----------------------------------------------------------*/

 

+/* Required by the kernel aware debugger. */

+#ifdef __DEBUG

+	#define portREMOVE_STATIC_QUALIFIER

+#endif

 

 #define portNOP()				asm volatile ( "NOP" )

 

diff --git a/Source/portable/MPLAB/PIC32MX/portmacro.h b/Source/portable/MPLAB/PIC32MX/portmacro.h
index a04cad6..7ffe115 100644
--- a/Source/portable/MPLAB/PIC32MX/portmacro.h
+++ b/Source/portable/MPLAB/PIC32MX/portmacro.h
@@ -152,7 +152,15 @@
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

 /*-----------------------------------------------------------*/

 

-#define portEND_SWITCHING_ISR( vSwitchRequired ) if( vSwitchRequired ) SetCoreSW0()

+#define portEND_SWITCHING_ISR( xSwitchRequired )	if( xSwitchRequired )	\

+													{						\

+														portYIELD();		\

+													}

+

+/* Required by the kernel aware debugger. */

+#ifdef __DEBUG

+	#define portREMOVE_STATIC_QUALIFIER

+#endif

 

 #ifdef __cplusplus

 }