#define portDOUBLE double\r
#define portLONG long\r
#define portSHORT short\r
-#define portSTACK_TYPE unsigned portLONG\r
-#define portBASE_TYPE portLONG\r
+#define portSTACK_TYPE unsigned long\r
+#define portBASE_TYPE long\r
\r
#if( configUSE_16_BIT_TICKS == 1 )\r
typedef unsigned portSHORT portTickType;\r
#define portDISABLE_INTERRUPTS() microblaze_disable_interrupts()\r
#define portENABLE_INTERRUPTS() microblaze_enable_interrupts()\r
\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Critical section macros. */\r
+void vPortEnterCritical( void );\r
+void vPortExitCritical( void );\r
+#define portENTER_CRITICAL() { \\r
+ extern volatile unsigned portBASE_TYPE uxCriticalNesting; \\r
+ microblaze_disable_interrupts(); \\r
+ uxCriticalNesting++; \\r
+ }\r
+\r
+#define portEXIT_CRITICAL() { \\r
+ extern volatile unsigned portBASE_TYPE uxCriticalNesting; \\r
+ /* Interrupts are disabled, so we can */ \\r
+ /* access the variable directly. */ \\r
+ uxCriticalNesting--; \\r
+ if( uxCriticalNesting == 0 ) \\r
+ { \\r
+ /* The nesting has unwound and we \\r
+ can enable interrupts again. */ \\r
+ portENABLE_INTERRUPTS(); \\r
+ } \\r
+ }\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The yield macro maps directly to the vPortYield() function. */\r
+void vPortYield( void );\r
+#define portYIELD() vPortYield()\r
+\r
+/* portYIELD_FROM_ISR() does not directly call vTaskSwitchContext(), but instead\r
+sets a flag to say that a yield has been requested. The interrupt exit code\r
+then checks this flag, and calls vTaskSwitchContext() before restoring a task\r
+context, if the flag is not false. This is done to prevent multiple calls to\r
+vTaskSwitchContext() being made from a single interrupt, as a single interrupt\r
+can result in multiple peripherals being serviced. */\r
+extern volatile unsigned long ulTaskSwitchRequested;\r
+#define portYIELD_FROM_ISR( x ) if( x != pdFALSE ) ulTaskSwitchRequested = 1\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Hardware specifics. */\r
+#define portBYTE_ALIGNMENT 4\r
+#define portSTACK_GROWTH ( -1 )\r
+#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )\r
+#define portNOP() asm volatile ( "NOP" )\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Task function macros as described on the FreeRTOS.org WEB site. */\r
+#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
+#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The following structure is used by the FreeRTOS exception handler. It is\r
+filled with the MicroBlaze context as it was at the time the exception occurred.\r
+This is done as an aid to debugging exception occurrences. */\r
+typedef struct PORT_REGISTER_DUMP\r
+{\r
+ /* The following structure members hold the values of the MicroBlaze\r
+ registers at the time the exception was raised. */\r
+ unsigned long ulR1_SP;\r
+ unsigned long ulR2_small_data_area;\r
+ unsigned long ulR3;\r
+ unsigned long ulR4;\r
+ unsigned long ulR5;\r
+ unsigned long ulR6;\r
+ unsigned long ulR7;\r
+ unsigned long ulR8;\r
+ unsigned long ulR9;\r
+ unsigned long ulR10;\r
+ unsigned long ulR11;\r
+ unsigned long ulR12;\r
+ unsigned long ulR13_read_write_small_data_area;\r
+ unsigned long ulR14_return_address_from_interrupt;\r
+ unsigned long ulR15_return_address_from_subroutine;\r
+ unsigned long ulR16_return_address_from_trap;\r
+ unsigned long ulR17_return_address_from_exceptions; /* The exception entry code will copy the BTR into R17 if the exception occurred in the delay slot of a branch instruction. */\r
+ unsigned long ulR18;\r
+ unsigned long ulR19;\r
+ unsigned long ulR20;\r
+ unsigned long ulR21;\r
+ unsigned long ulR22;\r
+ unsigned long ulR23;\r
+ unsigned long ulR24;\r
+ unsigned long ulR25;\r
+ unsigned long ulR26;\r
+ unsigned long ulR27;\r
+ unsigned long ulR28;\r
+ unsigned long ulR29;\r
+ unsigned long ulR30;\r
+ unsigned long ulR31;\r
+ unsigned long ulPC;\r
+ unsigned long ulESR;\r
+ unsigned long ulMSR;\r
+ unsigned long ulEAR;\r
+ unsigned long ulFSR;\r
+ unsigned long ulEDR;\r
+\r
+ /* A human readable description of the exception cause. The strings used\r
+ are the same as the #define constant names found in the\r
+ microblaze_exceptions_i.h header file */\r
+ signed char *pcExceptionCause;\r
+\r
+ /* The human readable name of the task that was running at the time the\r
+ exception occurred. This is the name that was given to the task when the\r
+ task was created using the FreeRTOS xTaskCreate() API function. */\r
+ signed char *pcCurrentTaskName;\r
+\r
+ /* The handle of the task that was running a the time the exception\r
+ occurred. */\r
+ void * xCurrentTaskHandle;\r
+\r
+} xPortRegisterDump;\r
+\r
+\r
/*\r
* Installs pxHandler as the interrupt handler for the peripheral specified by \r
* the ucInterruptID parameter.\r
* implementation should not require modification provided the example definition\r
* of vApplicationSetupTimerInterrupt() is also not modified. \r
*/\r
-void vApplicationClearTimerInterrupt( void )\r
+void vApplicationClearTimerInterrupt( void );\r
\r
/*\r
* vPortExceptionsInstallHandlers() is only available when the MicroBlaze\r
void vApplicationExceptionRegisterDump( xPortRegisterDump *xRegisterDump );\r
\r
\r
-/*-----------------------------------------------------------*/\r
-\r
-/* Critical section macros. */\r
-void vPortEnterCritical( void );\r
-void vPortExitCritical( void );\r
-#define portENTER_CRITICAL() { \\r
- extern volatile unsigned portBASE_TYPE uxCriticalNesting; \\r
- microblaze_disable_interrupts(); \\r
- uxCriticalNesting++; \\r
- }\r
- \r
-#define portEXIT_CRITICAL() { \\r
- extern volatile unsigned portBASE_TYPE uxCriticalNesting; \\r
- /* Interrupts are disabled, so we can */ \\r
- /* access the variable directly. */ \\r
- uxCriticalNesting--; \\r
- if( uxCriticalNesting == 0 ) \\r
- { \\r
- /* The nesting has unwound and we \\r
- can enable interrupts again. */ \\r
- portENABLE_INTERRUPTS(); \\r
- } \\r
- }\r
-\r
-/*-----------------------------------------------------------*/\r
-\r
-/* The yield macro maps directly to the vPortYield() function. */\r
-void vPortYield( void );\r
-#define portYIELD() vPortYield()\r
-\r
-/* portYIELD_FROM_ISR() does not directly call vTaskSwitchContext(), but instead\r
-sets a flag to say that a yield has been requested. The interrupt exit code\r
-then checks this flag, and calls vTaskSwitchContext() before restoring a task\r
-context, if the flag is not false. This is done to prevent multiple calls to\r
-vTaskSwitchContext() being made from a single interrupt, as a single interrupt\r
-can result in multiple peripherals being serviced. */\r
-extern volatile unsigned long ulTaskSwitchRequested;\r
-#define portYIELD_FROM_ISR( x ) if( x != pdFALSE ) ulTaskSwitchRequested = 1\r
-/*-----------------------------------------------------------*/\r
-\r
-/* Hardware specifics. */\r
-#define portBYTE_ALIGNMENT 4\r
-#define portSTACK_GROWTH ( -1 )\r
-#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) \r
-#define portNOP() asm volatile ( "NOP" )\r
-/*-----------------------------------------------------------*/\r
-\r
-/* Task function macros as described on the FreeRTOS.org WEB site. */\r
-#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
-#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
-/*-----------------------------------------------------------*/\r
-\r
-/* The following structure is used by the FreeRTOS exception handler. It is\r
-filled with the MicroBlaze context as it was at the time the exception occurred.\r
-This is done as an aid to debugging exception occurrences. */\r
-typedef struct PORT_REGISTER_DUMP\r
-{\r
- /* The following structure members hold the values of the MicroBlaze\r
- registers at the time the exception was raised. */\r
- unsigned long ulR1_SP;\r
- unsigned long ulR2_small_data_area;\r
- unsigned long ulR3;\r
- unsigned long ulR4;\r
- unsigned long ulR5;\r
- unsigned long ulR6;\r
- unsigned long ulR7;\r
- unsigned long ulR8;\r
- unsigned long ulR9;\r
- unsigned long ulR10;\r
- unsigned long ulR11;\r
- unsigned long ulR12;\r
- unsigned long ulR13_read_write_small_data_area;\r
- unsigned long ulR14_return_address_from_interrupt;\r
- unsigned long ulR15_return_address_from_subroutine;\r
- unsigned long ulR16_return_address_from_trap;\r
- unsigned long ulR17_return_address_from_exceptions; /* The exception entry code will copy the BTR into R17 if the exception occurred in the delay slot of a branch instruction. */\r
- unsigned long ulR18;\r
- unsigned long ulR19;\r
- unsigned long ulR20;\r
- unsigned long ulR21;\r
- unsigned long ulR22;\r
- unsigned long ulR23;\r
- unsigned long ulR24;\r
- unsigned long ulR25;\r
- unsigned long ulR26;\r
- unsigned long ulR27;\r
- unsigned long ulR28;\r
- unsigned long ulR29;\r
- unsigned long ulR30;\r
- unsigned long ulR31;\r
- unsigned long ulPC;\r
- unsigned long ulESR;\r
- unsigned long ulMSR;\r
- unsigned long ulEAR;\r
- unsigned long ulFSR;\r
- unsigned long ulEDR;\r
-\r
- /* A human readable description of the exception cause. The strings used\r
- are the same as the #define constant names found in the\r
- microblaze_exceptions_i.h header file */\r
- signed char *pcExceptionCause;\r
-\r
- /* The human readable name of the task that was running at the time the\r
- exception occurred. This is the name that was given to the task when the\r
- task was created using the FreeRTOS xTaskCreate() API function. */\r
- signed char *pcCurrentTaskName;\r
-\r
- /* The handle of the task that was running a the time the exception\r
- occurred. */\r
- void * xCurrentTaskHandle;\r
-\r
-} xPortRegisterDump;\r
-\r
#ifdef __cplusplus\r
}\r
#endif\r