]> git.sur5r.net Git - freertos/blobdiff - Demo/ARM7_LPC2138_Rowley/main.c
Use noinline attribute on C portion of asm functions, increase warning level and...
[freertos] / Demo / ARM7_LPC2138_Rowley / main.c
index ef7cae8247872e0b3d2a01ad06054fcc6e938a3d..123fddd778135d494366c12cbeacb1969f15ac21 100644 (file)
@@ -199,10 +199,10 @@ int main( void )
     vStartRecursiveMutexTasks();\r
 \r
        /* Start the tasks defined within this file. */\r
-       xTaskCreate( vLEDTask, "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL );\r
-    xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
-    xTaskCreate( vPrintTask, "Print", configMINIMAL_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );\r
-    xTaskCreate( vButtonHandlerTask, "Button", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+       xTaskCreate( vLEDTask, ( signed char * ) "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL );\r
+    xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+    xTaskCreate( vPrintTask, ( signed char * ) "Print", configMINIMAL_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );\r
+    xTaskCreate( vButtonHandlerTask, ( signed char * ) "Button", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
 \r
        /* Start the scheduler. */\r
        vTaskStartScheduler();\r
@@ -216,6 +216,9 @@ int main( void )
 \r
 static void vLEDTask( void *pvParameters )\r
 {\r
+       /* Just to remove compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
        /* Configure IO. */\r
        IO0DIR |= mainLED_BIT;\r
        IO0SET = mainLED_BIT;\r
@@ -244,6 +247,9 @@ portTickType xLastExecutionTime;
 const portCHAR * const pcPassMessage = "PASS\n";\r
 const portCHAR * const pcFailMessage = "FAIL\n";\r
 \r
+       /* Just to remove compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
        /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
        works correctly. */\r
        xLastExecutionTime = xTaskGetTickCount();\r
@@ -315,6 +321,9 @@ static void vPrintTask( void *pvParameters )
 {\r
 portCHAR *pcMessage;\r
 \r
+       /* Just to stop compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
        for( ;; )\r
        {\r
                /* Wait for a message to arrive. */\r
@@ -330,11 +339,14 @@ portCHAR *pcMessage;
 \r
 static void vButtonHandlerTask( void *pvParameters )\r
 {\r
-static portCHAR cListBuffer[ mainLIST_BUFFER_SIZE ];\r
-const portCHAR *pcList = &( cListBuffer[ 0 ] );\r
+static signed portCHAR cListBuffer[ mainLIST_BUFFER_SIZE ];\r
+const signed portCHAR *pcList = &( cListBuffer[ 0 ] );\r
 const portCHAR * const pcHeader = "\nTask          State  Priority  Stack      #\n************************************************";\r
 extern void (vButtonISRWrapper) ( void );\r
 \r
+       /* Just to stop compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
        /* Configure the interrupt. */\r
        portENTER_CRITICAL();\r
        {\r
@@ -372,6 +384,14 @@ extern void (vButtonISRWrapper) ( void );
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )\r
+{\r
+       /* Check pcTaskName for the name of the offending task, or pxCurrentTCB\r
+       if pcTaskName has itself been corrupted. */\r
+       ( void ) pxTask;\r
+       ( void ) pcTaskName;\r
+       for( ;; );\r
+}\r
 \r
 \r
 \r