variable declarations. */\r
        portENTER_SWITCHING_ISR();\r
 \r
-       /* Now we can declare the local variables. */\r
-       signed portCHAR cChar;\r
-       portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;\r
-       unsigned portLONG ulStatus;\r
+       /* Now we can declare the local variables.   These must be static. */\r
+       static signed portCHAR cChar;\r
+       static portBASE_TYPE xTaskWokenByTx, xTaskWokenByRx;\r
+       static unsigned portLONG ulStatus;\r
+\r
+       /* These variables are static so need initialising manually here. */\r
+       xTaskWokenByTx = pdFALSE;\r
+       xTaskWokenByRx = pdFALSE;\r
 \r
        /* What caused the interrupt? */\r
        ulStatus = AT91C_BASE_US0->US_CSR & AT91C_BASE_US0->US_IMR;\r
                }\r
        }\r
 \r
-       // Acknowledge the interrupt at AIC level...\r
+       /* Acknowledge the interrupt at AIC level... */\r
        AT91C_BASE_AIC->AIC_EOICR = serCLEAR_AIC_INTERRUPT;\r
 \r
        /* Exit the ISR.  If a task was woken by either a character being received\r
 
        variable declarations. */\r
        portENTER_SWITCHING_ISR();\r
 \r
-       /* Now we can declare the local variables. */\r
-       signed portCHAR cChar;\r
-       portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;\r
+       /* Now we can declare the local variables.   These must be static. */\r
+       static signed portCHAR cChar;\r
+       static portBASE_TYPE xTaskWokenByTx, xTaskWokenByRx;\r
+\r
+       /* As these variables are static they must be initialised manually here. */\r
+       xTaskWokenByTx = pdFALSE;\r
+       xTaskWokenByRx = pdFALSE;\r
 \r
        /* What caused the interrupt? */\r
        switch( UART0_IIR & serINTERRUPT_SOURCE_MASK )\r
 
 {\r
     portENTER_SWITCHING_ISR();\r
 \r
-    portBASE_TYPE xSwitchRequired = pdFALSE;\r
+    static portBASE_TYPE xSwitchRequired;\r
+\r
+       xSwitchRequired = pdFALSE;\r
 \r
     /* Clear the interrupt. */\r
     MAC_INTCLEAR = 0xffff;\r
 
 {\r
     portENTER_SWITCHING_ISR();\r
 \r
-    portBASE_TYPE xSwitchRequired = pdFALSE;\r
+\r
+       /* Variable must be static. */\r
+    static portBASE_TYPE xSwitchRequired;\r
+\r
+       /* As the variable is static it must be manually initialised here. */\r
+       xSwitchRequired = pdFALSE;\r
 \r
     /* Clear the interrupt. */\r
     IntClear = 0xffff;\r
 
        portENTER_SWITCHING_ISR();\r
 \r
        extern xQueueHandle xTCPISRQueue;\r
-       portBASE_TYPE xTaskWoken = pdFALSE;\r
+\r
+       /* Must be declared static. */\r
+       static portBASE_TYPE xTaskWoken;\r
+\r
+       /* As the variable is static it must be manually initialised. */\r
+       xTaskWoken = pdFALSE;\r
 \r
        /* Just wake the TCP task so it knows an ISR has occurred. */\r
        xQueueSendFromISR( xTCPISRQueue, ( void * ) &lDummyVariable, xTaskWoken );      \r
 
 {\r
        portENTER_SWITCHING_ISR();\r
 \r
+       /* Variables must be static. */\r
+\r
        /* Holds the current transmission state. */                                                     \r
        static I2C_STATE eCurrentState = eSentStart;\r
        static portLONG lMessageIndex = -i2cBUFFER_ADDRESS_BYTES; /* There are two address bytes to send prior to the data. */\r
-       portBASE_TYPE xTaskWokenByTx = pdFALSE;\r
-       portLONG lBytesLeft;\r
+       static portBASE_TYPE xTaskWokenByTx;\r
+       static portLONG lBytesLeft;\r
+\r
+       xTaskWokenByTx = pdFALSE;\r
+\r
 \r
        /* The action taken for this interrupt depends on our current state. */\r
        switch( eCurrentState )\r
 
        variable declarations. */\r
        portENTER_SWITCHING_ISR();\r
 \r
-       /* Variable definitions can be made now. */\r
-       volatile unsigned portLONG ulIntStatus, ulEventStatus;\r
-       portBASE_TYPE xSwitchRequired = pdFALSE;\r
+       /* Variable definitions can be made now.   These must be static. */\r
+       static volatile unsigned portLONG ulIntStatus, ulEventStatus;\r
+       static portBASE_TYPE xSwitchRequired;\r
     extern void vClearEMACTxBuffer( void );\r
 \r
+       /* As the variable is static it must be initialised manually here. */\r
+       xSwitchRequired = pdFALSE;\r
+\r
        /* Find the cause of the interrupt. */\r
        ulIntStatus = AT91C_BASE_EMAC->EMAC_ISR;\r
        ulEventStatus = AT91C_BASE_EMAC->EMAC_RSR;\r
 
        stack variable declarations. */\r
        portENTER_SWITCHING_ISR();\r
 \r
-       /* Now variables can be declared. */\r
-       portCHAR cTaskWokenByPost = pdFALSE; \r
+       /* Now variables can be declared.  These must be static. */\r
+       static portCHAR cTaskWokenByPost; \r
        static volatile unsigned portLONG ulNextMessage = 0;\r
-       xISRStatus *pxMessage;\r
-       unsigned portLONG ulRxBytes;\r
-       unsigned portCHAR ucFifoIndex;\r
+       static xISRStatus *pxMessage;\r
+       static unsigned portLONG ulRxBytes;\r
+       static unsigned portCHAR ucFifoIndex;\r
+\r
+       /* As the variables are static they must be initialised manually here. */\r
+       cTaskWokenByPost = pdFALSE; \r
 \r
     /* Use the next message from the array. */\r
        pxMessage = &( xISRMessages[ ( ulNextMessage & usbQUEUE_LENGTH ) ] );\r