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