]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1_GCC/full_demo/main_full.c
Tidy up the RISC-V_RV32_SiFive_HiFive1_GCC demo ready for its eventual release.
[freertos] / FreeRTOS / Demo / RISC-V_RV32_SiFive_HiFive1_GCC / full_demo / main_full.c
index 5813c13064a1f73c535011ec70729c7571db5c9e..1f25b0174baf85c143d961097ea172a9bd76afad 100644 (file)
  *\r
  * "Check" task - The check executes every three seconds.  It checks that all\r
  * the standard demo tasks, and the register check tasks, are not only still\r
- * executing, but are executing without reporting any errors.  If the check task\r
- * discovers that a task has either stalled, or reported an error, then it\r
- * prints an error message to the UART, otherwise it prints "Pass.".\r
+ * executing, but are executing without reporting any errors.  The check task\r
+ * toggles the LED every three seconds if all the standard demo tasks are\r
+ * executing as expected, or every 500ms if a potential error is discovered in\r
+ * any task.\r
  */\r
 \r
 /* Standard includes. */\r
 /* Standard demo application includes. */\r
 #include "dynamic.h"\r
 #include "blocktim.h"\r
-#include "GenQTest.h"\r
-#include "recmutex.h"\r
 #include "TimerDemo.h"\r
-#include "EventGroupsDemo.h"\r
 #include "TaskNotify.h"\r
-#include "AbortDelay.h"\r
-#include "countsem.h"\r
-#include "death.h"\r
-#include "MessageBufferDemo.h"\r
-#include "StreamBufferDemo.h"\r
-#include "StreamBufferInterrupt.h"\r
 \r
 /* Priorities for the demo application tasks. */\r
 #define mainCHECK_TASK_PRIORITY                                ( configMAX_PRIORITIES - 1 )\r
-#define mainCREATOR_TASK_PRIORITY                      ( tskIDLE_PRIORITY + 3UL )\r
 \r
 /* The period of the check task, in ms, converted to ticks using the\r
 pdMS_TO_TICKS() macro.  mainNO_ERROR_CHECK_TASK_PERIOD is used if no errors have\r
@@ -160,7 +151,6 @@ void main_full( void )
        vCreateBlockTimeTasks();\r
        vStartTimerDemoTask( mainTIMER_TEST_PERIOD );\r
        vStartDynamicPriorityTasks();\r
-//     vStartMessageBufferTasks( configMINIMAL_STACK_SIZE );\r
        vStartTaskNotifyTask();\r
 \r
        /* Create the register check tasks, as described at the top of this     file.\r
@@ -190,8 +180,7 @@ void main_full( void )
        for( ;; );\r
 }\r
 /*-----------------------------------------------------------*/\r
-volatile uint32_t ulCheckTaskCycles = 0;\r
-static volatile TaskStatus_t xTaskStatus[ 15 ];\r
+\r
 static void prvCheckTask( void *pvParameters )\r
 {\r
 TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
@@ -241,11 +230,6 @@ extern void vToggleLED( void );
                        pcStatusMessage = "ERROR: Task notification demo/tests.\r\n";\r
                }\r
 \r
-//             if( xAreMessageBufferTasksStillRunning() == pdFALSE )\r
-               {\r
-//                     pcStatusMessage = "ERROR: Message buffer.\r\n";\r
-               }\r
-\r
                /* Check that the register test 1 task is still running. */\r
                if( ulLastRegTest1Value == ulRegTest1LoopCounter )\r
                {\r
@@ -269,13 +253,7 @@ extern void vToggleLED( void );
                if( pcStatusMessage != pcPassMessage )\r
                {\r
                        xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;\r
-                       write( STDOUT_FILENO, pcStatusMessage, strlen( pcStatusMessage ) );\r
                }\r
-\r
-               ulCheckTaskCycles++;\r
-\r
-//             uxTaskGetSystemState( xTaskStatus, sizeof( xTaskStatus ) / sizeof( TaskStatus_t ), NULL );\r
-               __asm volatile( "NOP" );\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -321,10 +299,6 @@ void vFullDemoTickHook( void )
        /* Called from vApplicationTickHook() when the project is configured to\r
        build the full test/demo applications. */\r
 \r
-       /* The full demo includes a software timer demo/test that requires\r
-       prodding periodically from the tick interrupt. */\r
-//     vTimerPeriodicISRTests();\r
-\r
        /* Use task notifications from an interrupt. */\r
        xNotifyTaskFromISR();\r
 }\r