From 81256f37c8b390c72eb26221370ee3a871ddfc6e Mon Sep 17 00:00:00 2001 From: richardbarry Date: Tue, 12 Feb 2013 14:30:12 +0000 Subject: [PATCH] Adjusted the wrap checks in the QueueSet test task. Added the QueueSet test to the Rowlay Stellaris and SAM4S-EK Studio demos. Updated the MSVC demo to use heap_4.c. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1824 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h | 22 +++++---- .../Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzp | 2 + .../Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzs | 6 +-- FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c | 28 ++++++++---- .../RTOSDemo.atsuo | Bin 42496 -> 46080 bytes .../src/FreeRTOSConfig.h | 43 +++++++++--------- .../CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c | 2 +- FreeRTOS/Demo/Common/Minimal/QueueSet.c | 29 ++++++++---- FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h | 2 +- FreeRTOS/Demo/WIN32-MSVC/WIN32.suo | Bin 64000 -> 65024 bytes FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj | 2 +- .../Demo/WIN32-MSVC/WIN32.vcxproj.filters | 6 +-- FreeRTOS/Demo/WIN32-MSVC/main.c | 10 +++- 13 files changed, 92 insertions(+), 60 deletions(-) diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h index a3776d4a1..dd1e20178 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/FreeRTOSConfig.h @@ -1,7 +1,7 @@ /* FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd. - FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT + FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. *************************************************************************** @@ -42,7 +42,7 @@ FreeRTOS WEB site. 1 tab == 4 spaces! - + *************************************************************************** * * * Having a problem? Start by reading the FAQ "My application does * @@ -52,17 +52,17 @@ * * *************************************************************************** - - http://www.FreeRTOS.org - Documentation, training, latest versions, license - and contact details. - + + http://www.FreeRTOS.org - Documentation, training, latest versions, license + and contact details. + http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool. - Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell - the code with commercial support, indemnification, and middleware, under + Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell + the code with commercial support, indemnification, and middleware, under the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also - provide a safety engineered and independently SIL3 certified version under + provide a safety engineered and independently SIL3 certified version under the SafeRTOS brand: http://www.SafeRTOS.com. */ @@ -99,6 +99,7 @@ #define configQUEUE_REGISTRY_SIZE 10 #define configGENERATE_RUN_TIME_STATS 1 #define configUSE_MALLOC_FAILED_HOOK 1 +#define configUSE_QUEUE_SETS 1 #define configMAX_PRIORITIES ( 5UL ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) @@ -132,4 +133,7 @@ to zero. */ version. */ #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 +/* Disable interrupts and sit in a null loop if assert is called. */ +#define configASSERT( x ) if( ( x == 0 ) ) { taskDISABLE_INTERRUPTS(); for( ;; ); } + #endif /* FREERTOS_CONFIG_H */ diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzp b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzp index 3d683eb4f..67ac5394d 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzp +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzp @@ -58,7 +58,9 @@ + + diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzs b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzs index c67c36900..a7a437463 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzs +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/RTOSDemo.hzs @@ -24,9 +24,7 @@ - - @@ -57,7 +55,7 @@ - + - + diff --git a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c index ad38a3dc0..db2873b44 100644 --- a/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Rowley/main.c @@ -1,7 +1,7 @@ /* FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd. - FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT + FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. *************************************************************************** @@ -42,7 +42,7 @@ FreeRTOS WEB site. 1 tab == 4 spaces! - + *************************************************************************** * * * Having a problem? Start by reading the FAQ "My application does * @@ -52,17 +52,17 @@ * * *************************************************************************** - - http://www.FreeRTOS.org - Documentation, training, latest versions, license - and contact details. - + + http://www.FreeRTOS.org - Documentation, training, latest versions, license + and contact details. + http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool. - Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell - the code with commercial support, indemnification, and middleware, under + Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell + the code with commercial support, indemnification, and middleware, under the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also - provide a safety engineered and independently SIL3 certified version under + provide a safety engineered and independently SIL3 certified version under the SafeRTOS brand: http://www.SafeRTOS.com. */ @@ -146,6 +146,7 @@ #include "QPeek.h" #include "recmutex.h" #include "IntQueue.h" +#include "QueueSet.h" /*-----------------------------------------------------------*/ @@ -262,6 +263,7 @@ int main( void ) vStartQueuePeekTasks(); vStartRecursiveMutexTasks(); vStartInterruptQueueTasks(); + vStartQueueSetTasks(); /* Start the tasks defined within this file/specific to this demo. */ xTaskCreate( vOLEDTask, ( signed char * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); @@ -366,12 +368,18 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; { xMessage.pcMessage = "ERROR IN INT QUEUE"; } - + else if( xAreQueueSetTasksStillRunning() != pdTRUE ) + { + xMessage.pcMessage = "ERROR IN QUEUE SET"; + } /* Send the message to the OLED gatekeeper for display. */ xHigherPriorityTaskWoken = pdFALSE; xQueueSendFromISR( xOLEDQueue, &xMessage, &xHigherPriorityTaskWoken ); } + + /* Exercise the queue sets from an ISR. */ + vQueueSetAccessQueueSetFromISR(); } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/RTOSDemo.atsuo b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/RTOSDemo.atsuo index 5e8db2c57e9ee3cce8fab469e962e5d805d2f0de..9e0627d8022f81611163c87eb35e3c8874d672c8 100644 GIT binary patch delta 2272 zcmai$drVYU9>>qQ+!-%2uncdN$}miE(5i!45JslMLj{ToNFS-L9fg5X!N+jNShNCa zE6YonuUZ+4JS2^O)W&j~HhpGn&GzA=5WAbrrna`pZfvsIL_?dDbj$wEFw>fDlRY;d z&hPxrx%c-v=P>Qpr1m?~r85#=h5;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eix1pX z6der_dBRNWc1H47=uRno26_!z93iSDQ6Y~g&@pc7+rnTOjiBfBi+tDQRt=8ypTU*0 z1$Zz~gdg@>G2FgKq!k61y3k;#LBLQBtD1*sn~(d(t}%EGo}?%`{+Fzkv6vOs3wC^| exU~JWANp|^8sJovSeqV!PbQP|oQnRj>--00;_biy diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h index 1cfa33cb1..94dcbd37b 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/FreeRTOSConfig.h @@ -92,27 +92,28 @@ #include extern uint32_t SystemCoreClock; -#define configUSE_PREEMPTION 1 -#define configUSE_IDLE_HOOK 0 -#define configUSE_TICK_HOOK 1 -#define configCPU_CLOCK_HZ ( SystemCoreClock ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) -#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) -#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) ) -#define configMAX_TASK_NAME_LEN ( 10 ) -#define configUSE_TRACE_FACILITY 0 -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 1 -#define configUSE_MUTEXES 1 -#define configQUEUE_REGISTRY_SIZE 0 -#define configCHECK_FOR_STACK_OVERFLOW 2 -#define configUSE_RECURSIVE_MUTEXES 1 -#define configUSE_MALLOC_FAILED_HOOK 1 -#define configUSE_APPLICATION_TASK_TAG 0 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configUSE_QUEUE_SETS 1 -#define configGENERATE_RUN_TIME_STATS 0 +#define configUSE_PREEMPTION 1 +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 +#define configUSE_IDLE_HOOK 0 +#define configUSE_TICK_HOOK 1 +#define configCPU_CLOCK_HZ ( SystemCoreClock ) +#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configMAX_PRIORITIES ( 5 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) +#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40960 ) ) +#define configMAX_TASK_NAME_LEN ( 10 ) +#define configUSE_TRACE_FACILITY 0 +#define configUSE_16_BIT_TICKS 0 +#define configIDLE_SHOULD_YIELD 1 +#define configUSE_MUTEXES 1 +#define configQUEUE_REGISTRY_SIZE 0 +#define configCHECK_FOR_STACK_OVERFLOW 2 +#define configUSE_RECURSIVE_MUTEXES 1 +#define configUSE_MALLOC_FAILED_HOOK 1 +#define configUSE_APPLICATION_TASK_TAG 0 +#define configUSE_COUNTING_SEMAPHORES 1 +#define configUSE_QUEUE_SETS 1 +#define configGENERATE_RUN_TIME_STATS 0 /* Co-routine definitions. */ #define configUSE_CO_ROUTINES 0 diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c index f1c8cfec3..a4a5691c4 100644 --- a/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c +++ b/FreeRTOS/Demo/CORTEX_M4_ATSAM4S_Atmel_Studio/src/main.c @@ -211,7 +211,7 @@ void vApplicationTickHook( void ) #if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 ) { /* In this case the tick hook is used as part of the queue set test. */ - vQueueSetWriteToQueueFromISR(); + vQueueSetAccessQueueSetFromISR(); } #endif /* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY */ } diff --git a/FreeRTOS/Demo/Common/Minimal/QueueSet.c b/FreeRTOS/Demo/Common/Minimal/QueueSet.c index 59dbcd3d2..b7e37c008 100644 --- a/FreeRTOS/Demo/Common/Minimal/QueueSet.c +++ b/FreeRTOS/Demo/Common/Minimal/QueueSet.c @@ -116,13 +116,18 @@ queuesetPRIORITY_CHANGE_LOOPS number of values are sent to a queue. */ #define queuesetPRIORITY_CHANGE_LOOPS 100UL /* The ISR sends to the queue every queuesetISR_TX_PERIOD ticks. */ -#define queuesetISR_TX_PERIOD 2//( 100UL ) +#define queuesetISR_TX_PERIOD ( 100UL ) /* The allowable maximum deviation between a received value and the expected received value. A deviation will occur when data is received from a queue inside an ISR in between a task receiving from a queue and the task checking the received value. */ -#define queuesetALLOWABLE_RX_DEVIATION 5 +#define queuesetALLOWABLE_RX_DEVIATION 3 + +/* Ignore values that are at the boundaries of allowable values to make the +testing of limits easier (don't have to deal with wrapping values). */ +#define queuesetIGNORED_BOUNDARY ( queuesetALLOWABLE_RX_DEVIATION * 2 ) + /* * The task that periodically sends to the queue set. */ @@ -414,17 +419,21 @@ static unsigned long ulExpectedReceivedFromTask = 0, ulExpectedReceivedFromISR = if( ulReceived >= queuesetINITIAL_ISR_TX_VALUE ) { /* The value was sent from the ISR. */ - if( ( ulReceived - queuesetINITIAL_ISR_TX_VALUE ) < queuesetALLOWABLE_RX_DEVIATION ) + if( ( ulReceived - queuesetINITIAL_ISR_TX_VALUE ) < queuesetIGNORED_BOUNDARY ) { /* The value received is at the lower limit of the expected range. Don't test it and expect to receive one higher next time. */ ulExpectedReceivedFromISR++; } - else if( ( ULONG_MAX - ulReceived ) <= queuesetALLOWABLE_RX_DEVIATION ) + else if( ( ULONG_MAX - ulReceived ) <= queuesetIGNORED_BOUNDARY ) { /* The value received is at the higher limit of the expected range. Don't test it and expect to wrap soon. */ - ulExpectedReceivedFromISR = queuesetINITIAL_ISR_TX_VALUE; + ulExpectedReceivedFromISR++; + if( ulExpectedReceivedFromISR == 0 ) + { + ulExpectedReceivedFromISR = queuesetINITIAL_ISR_TX_VALUE; + } } else { @@ -443,17 +452,21 @@ static unsigned long ulExpectedReceivedFromTask = 0, ulExpectedReceivedFromISR = else { /* The value was sent from the Tx task. */ - if( ulReceived < queuesetALLOWABLE_RX_DEVIATION ) + if( ulReceived < queuesetIGNORED_BOUNDARY ) { /* The value received is at the lower limit of the expected range. Don't test it, and expect to receive one higher next time. */ ulExpectedReceivedFromTask++; } - else if( ( ( queuesetINITIAL_ISR_TX_VALUE - 1 ) - ulReceived ) <= queuesetALLOWABLE_RX_DEVIATION ) + else if( ( ( queuesetINITIAL_ISR_TX_VALUE - 1 ) - ulReceived ) <= queuesetIGNORED_BOUNDARY ) { /* The value received is at the higher limit of the expected range. Don't test it and expect to wrap soon. */ - ulExpectedReceivedFromTask = 0; + ulExpectedReceivedFromTask++; + if( ulExpectedReceivedFromTask >= queuesetINITIAL_ISR_TX_VALUE ) + { + ulExpectedReceivedFromTask = 0; + } } else { diff --git a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h index 31bb3115e..d0c1f9368 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/WIN32-MSVC/FreeRTOSConfig.h @@ -85,7 +85,7 @@ #define configUSE_TICK_HOOK 1 #define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 50 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */ -#define configTOTAL_HEAP_SIZE ( ( size_t ) 0 ) /* This parameter has no effect when heap_3.c is included in the project. */ +#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 20 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) #define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0 diff --git a/FreeRTOS/Demo/WIN32-MSVC/WIN32.suo b/FreeRTOS/Demo/WIN32-MSVC/WIN32.suo index 4e80022d32b0d9ed1fd873e8ead1634e135544b4..3a7a7394625471ba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;vA;M|!Y zWLS1Eto$*U+^wMXEm$zT2-Y+@_b#dvSH1>)Pk72&Fy1*6!3Jj>F^(3}5E5~zLgg{1muj957TA3(# zrk_3gRj!D}r5@bkeF(M{m;0`Sy@+Fhw4I5w2sl5B1@ux0icc@j_8*;PBA~1AAf-6R z<78h9@`bdQMa~P2xlWdwmQ250IjM_Nz3ss_hl`m*+=T?Gm`g7jUHC?#>hN=Q{&m1r zH+nng{?N^xMS}j~IGz5Ih5t`G;X!%?oEga&8|Yyc4-}}bMquwHEi^-Q{hwcBxF%hI z$;*X`O0vG$=K;)v1p%y#xbo?l$-x2{D-k(@Ntmy+V((BqGkOk3>|f=O90OOsgZ640 zGkFY+*DKlYaQ=$|M6Xand0md4>n&92M_|pSfHPw~rp;g82w*j|@0Mvx=D*#Lan(Lc zg8A>Q5@z)@EbmU0#n8Mr4r&*wjvRb&cO6t0Gikg6mv4NC>>F0-N6Of4a$*I#!o!h# zktb;sN{zLs+90la1))RL*m5?W#_#(epa?~`!l~`OIIh~42kSR-0#w34u7q2TsgdQ1 z17tnO=ci!)s#OA0{X&czv~b_nP;Zq`Z!6hS+I<&3dKxZ&k8~S3G!>fA_^mReae6b_ zFjttm-6RPzQ`zNk*`%k%#GRLrG@DB!E%o6-V%pKv_69Q6 zW@Gi^zd)zYz{KJh#Eegb?x0@q-qCBQODeeS2%UJ149>W@A;sgSc!gRhh$PW_~;`_aa>EM6RO2zLMZ`1wIO31IsMectG91k)v z*mCeUFMwEmwCj-{vfJZP_QVRuPd)hVNuPg%_k4w^$BeG - + diff --git a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters index bbd24de02..1c628ea6a 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters +++ b/FreeRTOS/Demo/WIN32-MSVC/WIN32.vcxproj.filters @@ -49,9 +49,6 @@ FreeRTOS Source\Source - - FreeRTOS Source\Source - FreeRTOS Source\Source\Portable @@ -115,6 +112,9 @@ Demo App Source + + FreeRTOS Source\Source\Portable + diff --git a/FreeRTOS/Demo/WIN32-MSVC/main.c b/FreeRTOS/Demo/WIN32-MSVC/main.c index 2cc0a9b04..9b0164233 100644 --- a/FreeRTOS/Demo/WIN32-MSVC/main.c +++ b/FreeRTOS/Demo/WIN32-MSVC/main.c @@ -96,6 +96,7 @@ /* Standard includes. */ #include +#include /* Kernel includes. */ #include @@ -292,6 +293,7 @@ const unsigned long ulMSToSleep = 15; xTaskHandle xIdleTaskHandle, xTimerTaskHandle, xTestTask; signed char *pcTaskName; const unsigned char ucConstQueueNumber = 0xaaU, ucConstTaskNumber = 0x55U; +void *pvAllocated; /* These three functions are only meant for use by trace code, and not for direct use from application code, hence their prototypes are not in queue.h. */ @@ -386,13 +388,17 @@ extern unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask ); } } } + + /* Exercise heap_4 a bit. The malloc failed hook will trap failed + allocations so there is no need to test here. */ + pvAllocated = pvPortMalloc( ( rand() % 100 ) + 1 ); + vPortFree( pvAllocated ); } /*-----------------------------------------------------------*/ void vApplicationMallocFailedHook( void ) { - /* Can be implemented if required, but probably not required in this - environment and running this demo. */ + vAssertCalled(); } /*-----------------------------------------------------------*/ -- 2.39.5