]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_full.c
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Demo / RX600_RX64M_RSK_Renesas_e2studio / Source / main_full.c
index 075430eb4d630f130c1b543c1deabaeab92d4bd5..3a1fddc83c206d1fd15178c0b23c6ddf422ba77a 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+    FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
     the terms of the GNU General Public License (version 2) as published by the\r
     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
  * In addition to the standard demo tasks, the following tasks and tests are\r
  * defined and/or created within this file:\r
  *\r
- * FreeRTOS+CLI command console.  The command console is access through the\r
- * UART to USB connector on the ZC702 Zynq development board (marked J2).  For\r
- * reasons of robustness testing the UART driver is deliberately written to be\r
- * inefficient and should not be used as a template for a production driver.\r
- * Type "help" to see a list of registered commands.  The FreeRTOS+CLI license\r
- * is different to the FreeRTOS license, see http://www.FreeRTOS.org/cli for\r
- * license and usage details.  The default baud rate is 115200.\r
- *\r
- * "Reg test" tasks - These fill both the core and floating point registers with\r
- * known values, then check that each register maintains its expected value for\r
- * the lifetime of the task.  Each task uses a different set of values.  The reg\r
- * test tasks execute with a very low priority, so get preempted very\r
- * frequently.  A register containing an unexpected value is indicative of an\r
- * error in the context switching mechanism.\r
+ * "Reg test" tasks - These fill the core registers with known values, then\r
+ * check that each register maintains its expected value for the lifetime of the\r
+ * task.  Each task uses a different set of values.  The reg test tasks execute\r
+ * with a very low priority, so get preempted very frequently.  A register\r
+ * containing an unexpected value is indicative of an error in the context\r
+ * switching mechanism.\r
  *\r
  * "Check" task - The check task period is initially set to three seconds.  The\r
  * task checks that all the standard demo tasks, and the register check tasks,\r
 #include "QueueOverwrite.h"\r
 #include "IntQueue.h"\r
 #include "EventGroupsDemo.h"\r
+#include "flash.h"\r
 \r
 /* Priorities for the demo application tasks. */\r
 #define mainSEM_TEST_PRIORITY                          ( tskIDLE_PRIORITY + 1UL )\r
 #define mainCOM_TEST_TASK_PRIORITY                     ( tskIDLE_PRIORITY + 2 )\r
 #define mainCHECK_TASK_PRIORITY                                ( configMAX_PRIORITIES - 1 )\r
 #define mainQUEUE_OVERWRITE_PRIORITY           ( tskIDLE_PRIORITY )\r
+#define mainFLASH_PRIORITY                                     ( tskIDLE_PRIORITY )\r
 \r
 /* The priority used by the UART command console task. */\r
 #define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )\r
 \r
 /* The LED used by the check timer. */\r
-#define mainCHECK_LED                                          ( 0 )\r
+#define mainCHECK_LED                                          ( 3 )\r
 \r
 /* A block time of zero simply means "don't block". */\r
 #define mainDONT_BLOCK                                         ( 0UL )\r
@@ -224,7 +218,7 @@ static void prvPseudoRandomiser( void *pvParameters );
 register check tasks to the check task.  If the variables keep incrementing,\r
 then the register check tasks has not discovered any errors.  If a variable\r
 stops incrementing, then an error has been found. */\r
-volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;\r
+volatile uint32_t ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -233,7 +227,7 @@ void main_full( void )
        /* Start all the other standard demo/test tasks.  They have not particular\r
        functionality, but do demonstrate how to use the FreeRTOS API and test the\r
        kernel port. */\r
-//     vStartInterruptQueueTasks();\r
+       vStartInterruptQueueTasks();\r
        vStartDynamicPriorityTasks();\r
        vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );\r
        vCreateBlockTimeTasks();\r
@@ -245,13 +239,7 @@ void main_full( void )
        vStartTimerDemoTask( mainTIMER_TEST_PERIOD );\r
        vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );\r
        vStartEventGroupTasks();\r
-\r
-       /* Start the tasks that implements the command console on the UART, as\r
-       described above. */\r
-//     vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY );\r
-\r
-       /* Register the standard CLI commands. */\r
-//     vRegisterSampleCLICommands();\r
+       vStartLEDFlashTasks( mainFLASH_PRIORITY );\r
 \r
        /* Create the register check tasks, as described at the top of this     file */\r
        xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL );\r
@@ -288,8 +276,8 @@ static void prvCheckTask( void *pvParameters )
 {\r
 TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
 TickType_t xLastExecutionTime;\r
-static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
-unsigned long ulErrorFound = pdFALSE;\r
+static uint32_t ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
+uint32_t ulErrorFound = pdFALSE;\r
 \r
        /* Just to stop compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -311,9 +299,9 @@ unsigned long ulErrorFound = pdFALSE;
 \r
                /* Check all the demo tasks (other than the flash tasks) to ensure\r
                that they are all still running, and that none have detected an error. */\r
-//             if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
+               if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
                {\r
-//                     ulErrorFound = pdTRUE;\r
+                       ulErrorFound = pdTRUE;\r
                }\r
 \r
                if( xAreMathsTaskStillRunning() != pdTRUE )\r
@@ -386,7 +374,7 @@ unsigned long ulErrorFound = pdFALSE;
                /* Check that the register test 2 task is still running. */\r
                if( ulLastRegTest2Value == ulRegTest2LoopCounter )\r
                {\r
-//                     ulErrorFound = pdTRUE;\r
+                       ulErrorFound = pdTRUE;\r
                }\r
                ulLastRegTest2Value = ulRegTest2LoopCounter;\r
 \r
@@ -414,11 +402,6 @@ static void prvRegTestTaskEntry1( void *pvParameters )
        in correctly. */\r
        if( pvParameters == mainREG_TEST_TASK_1_PARAMETER )\r
        {\r
-               /* The reg test task also tests the floating point registers.  Tasks\r
-               that use the floating point unit must call vPortTaskUsesFPU() before\r
-               any floating point instructions are executed. */\r
-//             vPortTaskUsesFPU();\r
-\r
                /* Start the part of the test that is written in assembler. */\r
                vRegTest1Implementation();\r
        }\r
@@ -437,11 +420,6 @@ static void prvRegTestTaskEntry2( void *pvParameters )
        in correctly. */\r
        if( pvParameters == mainREG_TEST_TASK_2_PARAMETER )\r
        {\r
-               /* The reg test task also tests the floating point registers.  Tasks\r
-               that use the floating point unit must call vPortTaskUsesFPU() before\r
-               any floating point instructions are executed. */\r
-//             vPortTaskUsesFPU();\r
-\r
                /* Start the part of the test that is written in assembler. */\r
                vRegTest2Implementation();\r
        }\r