Sync main_full demo to match the Windows Simulator test list

pull/253/head
Cobus van Eeden 4 years ago
parent 0d571fb2f1
commit 34d9175ce0

@ -198,6 +198,7 @@ int main_full( void )
/* Create the standard demo tasks. */ /* Create the standard demo tasks. */
vStartTaskNotifyTask(); vStartTaskNotifyTask();
// vStartTaskNotifyArrayTask();
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
@ -208,23 +209,26 @@ int main_full( void )
vStartRecursiveMutexTasks(); vStartRecursiveMutexTasks();
vStartCountingSemaphoreTasks(); vStartCountingSemaphoreTasks();
vStartDynamicPriorityTasks(); vStartDynamicPriorityTasks();
vStartQueueSetTasks();
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
xTaskCreate( prvDemoQueueSpaceFunctions, NULL, configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* Name is null for code coverage. */
vStartEventGroupTasks(); vStartEventGroupTasks();
vStartInterruptSemaphoreTasks(); vStartInterruptSemaphoreTasks();
vStartQueueSetPollingTask();
vCreateBlockTimeTasks(); vCreateBlockTimeTasks();
vCreateAbortDelayTasks(); vCreateAbortDelayTasks();
xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvPermanentlyBlockingSemaphoreTask, "BlockSem", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvPermanentlyBlockingSemaphoreTask, "BlockSem", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvPermanentlyBlockingNotificationTask, "BlockNoti", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvPermanentlyBlockingNotificationTask, "BlockNoti", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvDemonstrateChangingTimerReloadMode, "TimerMode", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL );
vStartMessageBufferTasks( configMINIMAL_STACK_SIZE ); vStartMessageBufferTasks( configMINIMAL_STACK_SIZE );
/* vStartStreamBufferTasks(); */ vStartStreamBufferTasks();
/* vStartStreamBufferInterruptDemo(); */ vStartStreamBufferInterruptDemo();
/* vStartMessageBufferAMPTasks( configMINIMAL_STACK_SIZE ); */ vStartMessageBufferAMPTasks( configMINIMAL_STACK_SIZE );
#if( configUSE_QUEUE_SETS == 1 )
{
vStartQueueSetTasks();
vStartQueueSetPollingTask();
}
#endif
#if( configSUPPORT_STATIC_ALLOCATION == 1 ) #if( configSUPPORT_STATIC_ALLOCATION == 1 )
{ {
@ -235,7 +239,7 @@ int main_full( void )
#if( configUSE_PREEMPTION != 0 ) #if( configUSE_PREEMPTION != 0 )
{ {
/* Don't expect these tasks to pass when preemption is not used. */ /* Don't expect these tasks to pass when preemption is not used. */
//vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartTimerDemoTask( mainTIMER_TEST_PERIOD );
} }
#endif #endif
@ -261,7 +265,8 @@ int main_full( void )
static void prvCheckTask( void *pvParameters ) static void prvCheckTask( void *pvParameters )
{ {
TickType_t xNextWakeTime; TickType_t xNextWakeTime;
const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2500UL ); const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2000UL );
HeapStats_t xHeapStats;
/* Just to remove compiler warning. */ /* Just to remove compiler warning. */
( void ) pvParameters; ( void ) pvParameters;
@ -275,21 +280,21 @@ const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2500UL );
vTaskDelayUntil( &xNextWakeTime, xCycleFrequency ); vTaskDelayUntil( &xNextWakeTime, xCycleFrequency );
/* Check the standard demo tasks are running without error. */ /* Check the standard demo tasks are running without error. */
/* #if( configUSE_PREEMPTION != 0 ) */ #if( configUSE_PREEMPTION != 0 )
/* { */ {
/* /\* These tasks are only created when preemption is used. *\/ */ /* These tasks are only created when preemption is used. */
/* if( xAreTimerDemoTasksStillRunning( xCycleFrequency ) != pdTRUE ) */ if( xAreTimerDemoTasksStillRunning( xCycleFrequency ) != pdTRUE )
/* { */ {
/* pcStatusMessage = "Error: TimerDemo"; */ pcStatusMessage = "Error: TimerDemo";
/* } */ }
/* } */ }
/* #endif */ #endif
/* if( xAreStreamBufferTasksStillRunning() != pdTRUE ) */ if( xAreStreamBufferTasksStillRunning() != pdTRUE )
/* { */ {
/* pcStatusMessage = "Error: StreamBuffer"; */ pcStatusMessage = "Error: StreamBuffer";
/* } */ }
/* else */if( xAreMessageBufferTasksStillRunning() != pdTRUE ) else if( xAreMessageBufferTasksStillRunning() != pdTRUE )
{ {
pcStatusMessage = "Error: MessageBuffer"; pcStatusMessage = "Error: MessageBuffer";
} }
@ -297,6 +302,10 @@ const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2500UL );
{ {
pcStatusMessage = "Error: Notification"; pcStatusMessage = "Error: Notification";
} }
// else if( xAreTaskNotificationArrayTasksStillRunning() != pdTRUE )
// {
// pcStatusMessage = "Error: NotificationArray";
// }
else if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE ) else if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
{ {
pcStatusMessage = "Error: IntSem"; pcStatusMessage = "Error: IntSem";
@ -349,18 +358,10 @@ const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2500UL );
{ {
pcStatusMessage = "Error: Dynamic"; pcStatusMessage = "Error: Dynamic";
} }
else if( xAreQueueSetTasksStillRunning() != pdPASS )
{
pcStatusMessage = "Error: Queue set";
}
else if( xIsQueueOverwriteTaskStillRunning() != pdPASS ) else if( xIsQueueOverwriteTaskStillRunning() != pdPASS )
{ {
pcStatusMessage = "Error: Queue overwrite"; pcStatusMessage = "Error: Queue overwrite";
} }
else if( xAreQueueSetPollTasksStillRunning() != pdPASS )
{
pcStatusMessage = "Error: Queue set polling";
}
else if( xAreBlockTimeTestTasksStillRunning() != pdPASS ) else if( xAreBlockTimeTestTasksStillRunning() != pdPASS )
{ {
pcStatusMessage = "Error: Block time"; pcStatusMessage = "Error: Block time";
@ -369,23 +370,36 @@ const TickType_t xCycleFrequency = pdMS_TO_TICKS( 2500UL );
{ {
pcStatusMessage = "Error: Abort delay"; pcStatusMessage = "Error: Abort delay";
} }
/* else if( xIsInterruptStreamBufferDemoStillRunning() != pdPASS ) */ else if( xIsInterruptStreamBufferDemoStillRunning() != pdPASS )
/* { */ {
/* pcStatusMessage = "Error: Stream buffer interrupt"; */ pcStatusMessage = "Error: Stream buffer interrupt";
/* } */ }
else if( xAreMessageBufferAMPTasksStillRunning() != pdPASS ) else if( xAreMessageBufferAMPTasksStillRunning() != pdPASS )
{ {
pcStatusMessage = "Error: Message buffer AMP"; pcStatusMessage = "Error: Message buffer AMP";
} }
#if( configUSE_QUEUE_SETS == 1 )
else if( xAreQueueSetTasksStillRunning() != pdPASS )
{
pcStatusMessage = "Error: Queue set";
}
else if( xAreQueueSetPollTasksStillRunning() != pdPASS )
{
pcStatusMessage = "Error: Queue set polling";
}
#endif
#if( configSUPPORT_STATIC_ALLOCATION == 1 ) #if( configSUPPORT_STATIC_ALLOCATION == 1 )
else if( xAreStaticAllocationTasksStillRunning() != pdPASS ) else if( xAreStaticAllocationTasksStillRunning() != pdPASS )
{ {
pcStatusMessage = "Error: Static allocation"; pcStatusMessage = "Error: Static allocation";
} }
#endif /* configSUPPORT_STATIC_ALLOCATION */ #endif /* configSUPPORT_STATIC_ALLOCATION */
console_print("TickCount %d, pcStatusMessage %s\n",
xNextWakeTime, pcStatusMessage); printf( "%s - tick count %u \r\n",
pcStatusMessage,
xTaskGetTickCount() );
} }
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -489,20 +503,24 @@ TaskHandle_t xTimerTask;
/* Call the periodic timer test, which tests the timer API functions that /* Call the periodic timer test, which tests the timer API functions that
can be called from an ISR. */ can be called from an ISR. */
/* #if( configUSE_PREEMPTION != 0 ) */ #if( configUSE_PREEMPTION != 0 )
/* { */ {
/* /\* Only created when preemption is used. *\/ */ /* Only created when preemption is used. */
/* vTimerPeriodicISRTests(); */ vTimerPeriodicISRTests();
/* } */ }
/* #endif */ #endif
/* Call the periodic queue overwrite from ISR demo. */ /* Call the periodic queue overwrite from ISR demo. */
vQueueOverwritePeriodicISRDemo(); vQueueOverwritePeriodicISRDemo();
/* Write to a queue that is in use as part of the queue set demo to #if( configUSE_QUEUE_SETS == 1 ) /* Remove the tests if queue sets are not defined. */
demonstrate using queue sets from an ISR. */ {
vQueueSetAccessQueueSetFromISR(); /* Write to a queue that is in use as part of the queue set demo to
vQueueSetPollingInterruptAccess(); demonstrate using queue sets from an ISR. */
vQueueSetAccessQueueSetFromISR();
vQueueSetPollingInterruptAccess();
}
#endif
/* Exercise event groups from interrupts. */ /* Exercise event groups from interrupts. */
vPeriodicEventGroupsProcessing(); vPeriodicEventGroupsProcessing();
@ -512,19 +530,19 @@ TaskHandle_t xTimerTask;
/* Exercise using task notifications from an interrupt. */ /* Exercise using task notifications from an interrupt. */
xNotifyTaskFromISR(); xNotifyTaskFromISR();
// xNotifyArrayTaskFromISR();
/* Writes to stream buffer byte by byte to test the stream buffer trigger /* Writes to stream buffer byte by byte to test the stream buffer trigger
level functionality. */ level functionality. */
/* vPeriodicStreamBufferProcessing(); */ vPeriodicStreamBufferProcessing();
/* Writes a string to a string buffer four bytes at a time to demonstrate /* Writes a string to a string buffer four bytes at a time to demonstrate
a stream being sent from an interrupt to a task. */ a stream being sent from an interrupt to a task. */
/* vBasicStreamBufferSendFromISR(); */ vBasicStreamBufferSendFromISR();
/* For code coverage purposes. */ /* For code coverage purposes. */
xTimerTask = xTimerGetTimerDaemonTaskHandle(); xTimerTask = xTimerGetTimerDaemonTaskHandle();
configASSERT( uxTaskPriorityGetFromISR( xTimerTask ) == configTIMER_TASK_PRIORITY ); configASSERT( uxTaskPriorityGetFromISR( xTimerTask ) == configTIMER_TASK_PRIORITY );
( void ) xTimerTask; /* In case configASSERT() is not defined. */
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -619,8 +637,6 @@ static portBASE_TYPE xPerformedOneShotTests = pdFALSE;
TaskHandle_t xTestTask; TaskHandle_t xTestTask;
TaskStatus_t xTaskInfo; TaskStatus_t xTaskInfo;
extern StackType_t uxTimerTaskStack[]; extern StackType_t uxTimerTaskStack[];
static uint32_t ulLastIdleExecutionTime = 0;
uint32_t ulIdleExecutionTime;
/* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and /* Demonstrate the use of the xTimerGetTimerDaemonTaskHandle() and
xTaskGetIdleTaskHandle() functions. Also try using the function that sets xTaskGetIdleTaskHandle() functions. Also try using the function that sets

Loading…
Cancel
Save