mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 00:37:44 -04:00
Run unctustify, fix some Readme wording
This commit is contained in:
parent
a2029c781c
commit
0c0333985b
13 changed files with 1589 additions and 1527 deletions
|
@ -61,9 +61,9 @@
|
||||||
#define configSUPPORT_STATIC_ALLOCATION 1
|
#define configSUPPORT_STATIC_ALLOCATION 1
|
||||||
|
|
||||||
/* Software timer related configuration options. The maximum possible task
|
/* Software timer related configuration options. The maximum possible task
|
||||||
priority is configMAX_PRIORITIES - 1. The priority of the timer task is
|
* priority is configMAX_PRIORITIES - 1. The priority of the timer task is
|
||||||
deliberately set higher to ensure it is correctly capped back to
|
* deliberately set higher to ensure it is correctly capped back to
|
||||||
configMAX_PRIORITIES - 1. */
|
* configMAX_PRIORITIES - 1. */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
#define configTIMER_QUEUE_LENGTH 20
|
#define configTIMER_QUEUE_LENGTH 20
|
||||||
|
@ -81,18 +81,18 @@ void vConfigureTimerForRunTimeStats( void ); /* Prototype of function that initi
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||||
|
|
||||||
/* This demo can use of one or more example stats formatting functions. These
|
/* This demo can use of one or more example stats formatting functions. These
|
||||||
format the raw data provided by the uxTaskGetSystemState() function in to human
|
* format the raw data provided by the uxTaskGetSystemState() function in to human
|
||||||
readable ASCII form. See the notes in the implementation of vTaskList() within
|
* readable ASCII form. See the notes in the implementation of vTaskList() within
|
||||||
FreeRTOS/Source/tasks.c for limitations. */
|
* FreeRTOS/Source/tasks.c for limitations. */
|
||||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
||||||
|
|
||||||
/* Enables the test whereby a stack larger than the total heap size is
|
/* Enables the test whereby a stack larger than the total heap size is
|
||||||
requested. */
|
* requested. */
|
||||||
#define configSTACK_DEPTH_TYPE uint32_t
|
#define configSTACK_DEPTH_TYPE uint32_t
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. In most cases the linker will remove unused
|
* to exclude the API function. In most cases the linker will remove unused
|
||||||
functions anyway. */
|
* functions anyway. */
|
||||||
#define INCLUDE_vTaskPrioritySet 1
|
#define INCLUDE_vTaskPrioritySet 1
|
||||||
#define INCLUDE_uxTaskPriorityGet 1
|
#define INCLUDE_uxTaskPriorityGet 1
|
||||||
#define INCLUDE_vTaskDelete 1
|
#define INCLUDE_vTaskDelete 1
|
||||||
|
@ -117,18 +117,20 @@ functions anyway. */
|
||||||
#define sbSEND_COMPLETED( pxStreamBuffer ) vGenerateCoreBInterrupt( pxStreamBuffer )
|
#define sbSEND_COMPLETED( pxStreamBuffer ) vGenerateCoreBInterrupt( pxStreamBuffer )
|
||||||
#endif /* configINCLUDE_MESSAGE_BUFFER_AMP_DEMO */
|
#endif /* configINCLUDE_MESSAGE_BUFFER_AMP_DEMO */
|
||||||
|
|
||||||
extern void vAssertCalled( const char * const pcFileName, unsigned long ulLine );
|
extern void vAssertCalled( const char * const pcFileName,
|
||||||
|
unsigned long ulLine );
|
||||||
|
|
||||||
/* projCOVERAGE_TEST should be defined on the command line so this file can be
|
/* projCOVERAGE_TEST should be defined on the command line so this file can be
|
||||||
used with multiple project configurations. If it is
|
* used with multiple project configurations. If it is
|
||||||
*/
|
*/
|
||||||
#ifndef projCOVERAGE_TEST
|
#ifndef projCOVERAGE_TEST
|
||||||
#error projCOVERAGE_TEST should be defined to 1 or 0 on the command line.
|
#error projCOVERAGE_TEST should be defined to 1 or 0 on the command line.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( projCOVERAGE_TEST == 1 )
|
#if ( projCOVERAGE_TEST == 1 )
|
||||||
|
|
||||||
/* Insert NOPs in empty decision paths to ensure both true and false paths
|
/* Insert NOPs in empty decision paths to ensure both true and false paths
|
||||||
are being tested. */
|
* are being tested. */
|
||||||
#define mtCOVERAGE_TEST_MARKER() __asm volatile ( "NOP" )
|
#define mtCOVERAGE_TEST_MARKER() __asm volatile ( "NOP" )
|
||||||
|
|
||||||
/* Ensure the tick count overflows during the coverage test. */
|
/* Ensure the tick count overflows during the coverage test. */
|
||||||
|
@ -139,40 +141,42 @@ used with multiple project configurations. If it is
|
||||||
|
|
||||||
/* To test builds that remove the static qualifier for debug builds. */
|
/* To test builds that remove the static qualifier for debug builds. */
|
||||||
#define portREMOVE_STATIC_QUALIFIER
|
#define portREMOVE_STATIC_QUALIFIER
|
||||||
#else
|
#else /* if ( projCOVERAGE_TEST == 1 ) */
|
||||||
|
|
||||||
/* It is a good idea to define configASSERT() while developing. configASSERT()
|
/* It is a good idea to define configASSERT() while developing. configASSERT()
|
||||||
uses the same semantics as the standard C assert() macro. Don't define
|
* uses the same semantics as the standard C assert() macro. Don't define
|
||||||
configASSERT() when performing code coverage tests though, as it is not
|
* configASSERT() when performing code coverage tests though, as it is not
|
||||||
intended to asserts() to fail, some some code is intended not to run if no
|
* intended to asserts() to fail, some some code is intended not to run if no
|
||||||
errors are present. */
|
* errors are present. */
|
||||||
#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ )
|
#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ )
|
||||||
|
|
||||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||||
|
|
||||||
/* Include the FreeRTOS+Trace FreeRTOS trace macro definitions. */
|
/* Include the FreeRTOS+Trace FreeRTOS trace macro definitions. */
|
||||||
#include "trcRecorder.h"
|
#include "trcRecorder.h"
|
||||||
#endif
|
#endif /* if ( projCOVERAGE_TEST == 1 ) */
|
||||||
|
|
||||||
/* networking definitions */
|
/* networking definitions */
|
||||||
#define configMAC_ISR_SIMULATOR_PRIORITY ( configMAX_PRIORITIES - 1 )
|
#define configMAC_ISR_SIMULATOR_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
|
|
||||||
/* Prototype for the function used to print out. In this case it prints to the
|
/* Prototype for the function used to print out. In this case it prints to the
|
||||||
console before the network is connected then a UDP port after the network has
|
* console before the network is connected then a UDP port after the network has
|
||||||
connected. */
|
* connected. */
|
||||||
extern void vLoggingPrintf( const char *pcFormatString, ... );
|
extern void vLoggingPrintf( const char * pcFormatString,
|
||||||
|
... );
|
||||||
|
|
||||||
/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to
|
/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to
|
||||||
1 then FreeRTOS_debug_printf should be defined to the function used to print
|
* 1 then FreeRTOS_debug_printf should be defined to the function used to print
|
||||||
out the debugging messages. */
|
* out the debugging messages. */
|
||||||
#define ipconfigHAS_DEBUG_PRINTF 1
|
#define ipconfigHAS_DEBUG_PRINTF 1
|
||||||
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
|
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
|
||||||
#define FreeRTOS_debug_printf( X ) vLoggingPrintf X
|
#define FreeRTOS_debug_printf( X ) vLoggingPrintf X
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set to 1 to print out non debugging messages, for example the output of the
|
/* Set to 1 to print out non debugging messages, for example the output of the
|
||||||
FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1
|
* FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1
|
||||||
then FreeRTOS_printf should be set to the function used to print out the
|
* then FreeRTOS_printf should be set to the function used to print out the
|
||||||
messages. */
|
* messages. */
|
||||||
#define ipconfigHAS_PRINTF 0
|
#define ipconfigHAS_PRINTF 0
|
||||||
#if ( ipconfigHAS_PRINTF == 1 )
|
#if ( ipconfigHAS_PRINTF == 1 )
|
||||||
#define FreeRTOS_printf( X ) vLoggingPrintf X
|
#define FreeRTOS_printf( X ) vLoggingPrintf X
|
||||||
|
|
|
@ -26,17 +26,24 @@ $ ./build/possix_demo
|
||||||
```
|
```
|
||||||
Since FreeRTOS and its application never come to an end and typically run
|
Since FreeRTOS and its application never come to an end and typically run
|
||||||
forever. The user has to kill the application with **Ctrl_C** when they feel
|
forever. The user has to kill the application with **Ctrl_C** when they feel
|
||||||
satisfied that the application achieved its indented task. Killing the
|
satisfied that the application achieved its intented task. Killing the
|
||||||
application will force the profiling file *gmon.out* to be generated
|
application will force the profiling file *gmon.out* to be generated
|
||||||
automatically.
|
automatically.
|
||||||
In order to make sense of this file, the user has to convert the file with:
|
In order to make sense of this file, the user has to convert the file with:
|
||||||
```
|
```
|
||||||
$ make profile
|
$ make profile
|
||||||
```
|
```
|
||||||
two (2) files *prof_call_graph.txt* and *prof_flat.txt* will be generated in the
|
After running the previous command, two (2) profiling files
|
||||||
build directory.
|
*prof_call_graph.txt* and *prof_flat.txt* will be generated and placed in
|
||||||
|
the build directory.
|
||||||
|
* *prof_call_graph.txt*: The call graph shows which functions called which
|
||||||
|
others, and how much time each function used when its subroutine calls are
|
||||||
|
included.
|
||||||
|
* *prof_flat.txt*: The flat profile shows how much time was spent
|
||||||
|
executing directly in each function.
|
||||||
In order to understand the outputs generated, the best way is to read the
|
In order to understand the outputs generated, the best way is to read the
|
||||||
official documentation of gprof [here](https://sourceware.org/binutils/docs/gprof/Output.html#Output)
|
official documentation of gprof
|
||||||
|
[here](https://sourceware.org/binutils/docs/gprof/Output.html#Output)
|
||||||
|
|
||||||
|
|
||||||
# Run your application with Sanitizers
|
# Run your application with Sanitizers
|
||||||
|
|
|
@ -93,13 +93,13 @@ BaseType_t xReturn = pdPASS;
|
||||||
UBaseType_t uxDummy = 10;
|
UBaseType_t uxDummy = 10;
|
||||||
|
|
||||||
/* Don't expect to create any of the objects as a NULL parameter is always
|
/* Don't expect to create any of the objects as a NULL parameter is always
|
||||||
passed in place of a required buffer. Hence if all passes then none of the
|
* passed in place of a required buffer. Hence if all passes then none of the
|
||||||
|= will be against 0, and ulReturned will still be zero at the end of this
|
|= will be against 0, and ulReturned will still be zero at the end of this
|
||||||
function. */
|
* function. */
|
||||||
ulReturned |= ( uintptr_t ) xEventGroupCreateStatic( NULL );
|
ulReturned |= ( uintptr_t ) xEventGroupCreateStatic( NULL );
|
||||||
|
|
||||||
/* Try creating a task twice, once with puxStackBuffer NULL, and once with
|
/* Try creating a task twice, once with puxStackBuffer NULL, and once with
|
||||||
pxTaskBuffer NULL. */
|
* pxTaskBuffer NULL. */
|
||||||
ulReturned |= ( uintptr_t ) xTaskCreateStatic( NULL, /* Task to run, not needed as the task is not created. */
|
ulReturned |= ( uintptr_t ) xTaskCreateStatic( NULL, /* Task to run, not needed as the task is not created. */
|
||||||
"Dummy", /* Task name. */
|
"Dummy", /* Task name. */
|
||||||
configMINIMAL_STACK_SIZE,
|
configMINIMAL_STACK_SIZE,
|
||||||
|
@ -122,7 +122,7 @@ UBaseType_t uxDummy = 10;
|
||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
/* Try creating a stream buffer twice, once with pucStreamBufferStorageArea
|
/* Try creating a stream buffer twice, once with pucStreamBufferStorageArea
|
||||||
set to NULL, and once with pxStaticStreamBuffer set to NULL. */
|
* set to NULL, and once with pxStaticStreamBuffer set to NULL. */
|
||||||
ulReturned |= ( uintptr_t ) xStreamBufferCreateStatic( uxDummy,
|
ulReturned |= ( uintptr_t ) xStreamBufferCreateStatic( uxDummy,
|
||||||
uxDummy,
|
uxDummy,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -160,10 +160,12 @@ MessageBufferHandle_t xMessageBuffer;
|
||||||
if( xEventGroup != NULL )
|
if( xEventGroup != NULL )
|
||||||
{
|
{
|
||||||
vEventGroupSetNumber( xEventGroup, xNumber );
|
vEventGroupSetNumber( xEventGroup, xNumber );
|
||||||
|
|
||||||
if( uxEventGroupGetNumber( NULL ) != 0 )
|
if( uxEventGroupGetNumber( NULL ) != 0 )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( uxEventGroupGetNumber( xEventGroup ) != xNumber )
|
if( uxEventGroupGetNumber( xEventGroup ) != xNumber )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -178,13 +180,16 @@ MessageBufferHandle_t xMessageBuffer;
|
||||||
|
|
||||||
/* Exercise the queue trace utilities. */
|
/* Exercise the queue trace utilities. */
|
||||||
xQueue = xQueueCreate( xQueueLength, ( UBaseType_t ) sizeof( uxValue ) );
|
xQueue = xQueueCreate( xQueueLength, ( UBaseType_t ) sizeof( uxValue ) );
|
||||||
|
|
||||||
if( xQueue != NULL )
|
if( xQueue != NULL )
|
||||||
{
|
{
|
||||||
vQueueSetQueueNumber( xQueue, xNumber );
|
vQueueSetQueueNumber( xQueue, xNumber );
|
||||||
|
|
||||||
if( uxQueueGetQueueNumber( xQueue ) != xNumber )
|
if( uxQueueGetQueueNumber( xQueue ) != xNumber )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ucQueueGetQueueType( xQueue ) != queueQUEUE_TYPE_BASE )
|
if( ucQueueGetQueueType( xQueue ) != queueQUEUE_TYPE_BASE )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -198,14 +203,16 @@ MessageBufferHandle_t xMessageBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Exercise the task trace utilities. Value of 100 is arbitrary, just want
|
/* Exercise the task trace utilities. Value of 100 is arbitrary, just want
|
||||||
to check the value that is set is also read back. */
|
* to check the value that is set is also read back. */
|
||||||
uxValue = 100;
|
uxValue = 100;
|
||||||
xTaskHandle = xTaskGetCurrentTaskHandle();
|
xTaskHandle = xTaskGetCurrentTaskHandle();
|
||||||
vTaskSetTaskNumber( xTaskHandle, uxValue );
|
vTaskSetTaskNumber( xTaskHandle, uxValue );
|
||||||
|
|
||||||
if( uxTaskGetTaskNumber( xTaskHandle ) != uxValue )
|
if( uxTaskGetTaskNumber( xTaskHandle ) != uxValue )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( uxTaskGetTaskNumber( NULL ) != 0 )
|
if( uxTaskGetTaskNumber( NULL ) != 0 )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -215,15 +222,18 @@ MessageBufferHandle_t xMessageBuffer;
|
||||||
|
|
||||||
|
|
||||||
/* Exercise the stream buffer utilities. Try creating with a trigger level
|
/* Exercise the stream buffer utilities. Try creating with a trigger level
|
||||||
of 0, it should then get capped to 1. */
|
* of 0, it should then get capped to 1. */
|
||||||
xStreamBuffer = xStreamBufferCreate( sizeof( uint32_t ), 0 );
|
xStreamBuffer = xStreamBufferCreate( sizeof( uint32_t ), 0 );
|
||||||
|
|
||||||
if( xStreamBuffer != NULL )
|
if( xStreamBuffer != NULL )
|
||||||
{
|
{
|
||||||
vStreamBufferSetStreamBufferNumber( xStreamBuffer, uxValue );
|
vStreamBufferSetStreamBufferNumber( xStreamBuffer, uxValue );
|
||||||
|
|
||||||
if( uxStreamBufferGetStreamBufferNumber( xStreamBuffer ) != uxValue )
|
if( uxStreamBufferGetStreamBufferNumber( xStreamBuffer ) != uxValue )
|
||||||
{
|
{
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ucStreamBufferGetStreamBufferType( xStreamBuffer ) != 0 )
|
if( ucStreamBufferGetStreamBufferType( xStreamBuffer ) != 0 )
|
||||||
{
|
{
|
||||||
/* "Is Message Buffer" flag should have been 0. */
|
/* "Is Message Buffer" flag should have been 0. */
|
||||||
|
@ -238,6 +248,7 @@ MessageBufferHandle_t xMessageBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
xMessageBuffer = xMessageBufferCreate( sizeof( uint32_t ) );
|
xMessageBuffer = xMessageBufferCreate( sizeof( uint32_t ) );
|
||||||
|
|
||||||
if( xMessageBuffer != NULL )
|
if( xMessageBuffer != NULL )
|
||||||
{
|
{
|
||||||
if( ucStreamBufferGetStreamBufferType( xMessageBuffer ) == 0 )
|
if( ucStreamBufferGetStreamBufferType( xMessageBuffer ) == 0 )
|
||||||
|
@ -304,6 +315,7 @@ QueueHandle_t xISRQueue = NULL;
|
||||||
if( xISRQueue != NULL )
|
if( xISRQueue != NULL )
|
||||||
{
|
{
|
||||||
vQueueAddToRegistry( xISRQueue, pcISRQueueName );
|
vQueueAddToRegistry( xISRQueue, pcISRQueueName );
|
||||||
|
|
||||||
if( strcmp( pcQueueGetName( xISRQueue ), pcISRQueueName ) )
|
if( strcmp( pcQueueGetName( xISRQueue ), pcISRQueueName ) )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -368,7 +380,7 @@ uint32_t ulTotalRunTime1, ulTotalRunTime2;
|
||||||
const uint32_t ulRunTimeTollerance = ( uint32_t ) 0xfff;
|
const uint32_t ulRunTimeTollerance = ( uint32_t ) 0xfff;
|
||||||
|
|
||||||
/* Obtain task status with the stack high water mark and without the
|
/* Obtain task status with the stack high water mark and without the
|
||||||
state. */
|
* state. */
|
||||||
vTaskGetInfo( NULL, &xStatus, pdTRUE, eRunning );
|
vTaskGetInfo( NULL, &xStatus, pdTRUE, eRunning );
|
||||||
|
|
||||||
if( uxTaskGetStackHighWaterMark( NULL ) != xStatus.usStackHighWaterMark )
|
if( uxTaskGetStackHighWaterMark( NULL ) != xStatus.usStackHighWaterMark )
|
||||||
|
@ -382,66 +394,76 @@ const uint32_t ulRunTimeTollerance = ( uint32_t ) 0xfff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now obtain a task status without the high water mark but with the state,
|
/* Now obtain a task status without the high water mark but with the state,
|
||||||
which in the case of the idle task should be Read. */
|
* which in the case of the idle task should be Read. */
|
||||||
xTimerTask = xTimerGetTimerDaemonTaskHandle();
|
xTimerTask = xTimerGetTimerDaemonTaskHandle();
|
||||||
vTaskSuspend( xTimerTask ); /* Should never suspend Timer task normally!. */
|
vTaskSuspend( xTimerTask ); /* Should never suspend Timer task normally!. */
|
||||||
vTaskGetInfo( xTimerTask, &xStatus, pdFALSE, eInvalid );
|
vTaskGetInfo( xTimerTask, &xStatus, pdFALSE, eInvalid );
|
||||||
|
|
||||||
if( xStatus.eCurrentState != eSuspended )
|
if( xStatus.eCurrentState != eSuspended )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xStatus.uxBasePriority != uxTaskPriorityGetFromISR( xTimerTask ) )
|
if( xStatus.uxBasePriority != uxTaskPriorityGetFromISR( xTimerTask ) )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xStatus.uxBasePriority != ( configMAX_PRIORITIES - 1 ) )
|
if( xStatus.uxBasePriority != ( configMAX_PRIORITIES - 1 ) )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
xTaskResumeFromISR( xTimerTask );
|
xTaskResumeFromISR( xTimerTask );
|
||||||
vTaskGetInfo( xTimerTask, &xStatus, pdTRUE, eInvalid );
|
vTaskGetInfo( xTimerTask, &xStatus, pdTRUE, eInvalid );
|
||||||
|
|
||||||
if( ( xStatus.eCurrentState != eReady ) && ( xStatus.eCurrentState != eBlocked ) )
|
if( ( xStatus.eCurrentState != eReady ) && ( xStatus.eCurrentState != eBlocked ) )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( uxTaskGetStackHighWaterMark( xTimerTask ) != xStatus.usStackHighWaterMark )
|
if( uxTaskGetStackHighWaterMark( xTimerTask ) != xStatus.usStackHighWaterMark )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( uxTaskGetStackHighWaterMark2( xTimerTask ) != ( configSTACK_DEPTH_TYPE ) xStatus.usStackHighWaterMark )
|
if( uxTaskGetStackHighWaterMark2( xTimerTask ) != ( configSTACK_DEPTH_TYPE ) xStatus.usStackHighWaterMark )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Attempting to abort a delay in the idle task should be guaranteed to
|
/* Attempting to abort a delay in the idle task should be guaranteed to
|
||||||
fail as the idle task should never block. */
|
* fail as the idle task should never block. */
|
||||||
xIdleTask = xTaskGetIdleTaskHandle();
|
xIdleTask = xTaskGetIdleTaskHandle();
|
||||||
|
|
||||||
if( xTaskAbortDelay( xIdleTask ) != pdFAIL )
|
if( xTaskAbortDelay( xIdleTask ) != pdFAIL )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create an array of task status objects large enough to hold information
|
/* Create an array of task status objects large enough to hold information
|
||||||
on the number of tasks at this time - note this may change at any time if
|
* on the number of tasks at this time - note this may change at any time if
|
||||||
higher priority tasks are executing and creating tasks. */
|
* higher priority tasks are executing and creating tasks. */
|
||||||
uxNumberOfTasks = uxTaskGetNumberOfTasks();
|
uxNumberOfTasks = uxTaskGetNumberOfTasks();
|
||||||
pxStatusArray = ( TaskStatus_t * ) pvPortMalloc( uxNumberOfTasks * sizeof( TaskStatus_t ) );
|
pxStatusArray = ( TaskStatus_t * ) pvPortMalloc( uxNumberOfTasks * sizeof( TaskStatus_t ) );
|
||||||
|
|
||||||
if( pxStatusArray != NULL )
|
if( pxStatusArray != NULL )
|
||||||
{
|
{
|
||||||
/* Pass part of the array into uxTaskGetSystemState() to ensure it doesn't
|
/* Pass part of the array into uxTaskGetSystemState() to ensure it doesn't
|
||||||
try using more space than there is available. */
|
* try using more space than there is available. */
|
||||||
uxReturned = uxTaskGetSystemState( pxStatusArray, uxNumberOfTasks / ( UBaseType_t ) 2, NULL );
|
uxReturned = uxTaskGetSystemState( pxStatusArray, uxNumberOfTasks / ( UBaseType_t ) 2, NULL );
|
||||||
|
|
||||||
if( uxReturned != ( UBaseType_t ) 0 )
|
if( uxReturned != ( UBaseType_t ) 0 )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now do the same but passing in the complete array size, this is done
|
/* Now do the same but passing in the complete array size, this is done
|
||||||
twice to check for a difference in the total run time. */
|
* twice to check for a difference in the total run time. */
|
||||||
uxTaskGetSystemState( pxStatusArray, uxNumberOfTasks, &ulTotalRunTime1 );
|
uxTaskGetSystemState( pxStatusArray, uxNumberOfTasks, &ulTotalRunTime1 );
|
||||||
memset( ( void * ) pxStatusArray, 0xaa, uxNumberOfTasks * sizeof( TaskStatus_t ) );
|
memset( ( void * ) pxStatusArray, 0xaa, uxNumberOfTasks * sizeof( TaskStatus_t ) );
|
||||||
uxReturned = uxTaskGetSystemState( pxStatusArray, uxNumberOfTasks, &ulTotalRunTime2 );
|
uxReturned = uxTaskGetSystemState( pxStatusArray, uxNumberOfTasks, &ulTotalRunTime2 );
|
||||||
|
|
||||||
if( ( ulTotalRunTime2 - ulTotalRunTime1 ) > ulRunTimeTollerance )
|
if( ( ulTotalRunTime2 - ulTotalRunTime1 ) > ulRunTimeTollerance )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -454,6 +476,7 @@ const uint32_t ulRunTimeTollerance = ( uint32_t ) 0xfff;
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pxStatusArray[ ux ].uxCurrentPriority >= ( UBaseType_t ) configMAX_PRIORITIES )
|
if( pxStatusArray[ ux ].uxCurrentPriority >= ( UBaseType_t ) configMAX_PRIORITIES )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -483,10 +506,11 @@ BaseType_t xReturn = pdPASS, xParameter = ( BaseType_t ) 0xDEADBEEF;
|
||||||
TaskHandle_t xTask;
|
TaskHandle_t xTask;
|
||||||
|
|
||||||
/* First try with the handle of a different task. Use the timer task for
|
/* First try with the handle of a different task. Use the timer task for
|
||||||
convenience. */
|
* convenience. */
|
||||||
xTask = xTimerGetTimerDaemonTaskHandle();
|
xTask = xTimerGetTimerDaemonTaskHandle();
|
||||||
|
|
||||||
vTaskSetApplicationTaskTag( xTask, prvDummyTagFunction );
|
vTaskSetApplicationTaskTag( xTask, prvDummyTagFunction );
|
||||||
|
|
||||||
if( xTaskGetApplicationTaskTag( xTask ) != prvDummyTagFunction )
|
if( xTaskGetApplicationTaskTag( xTask ) != prvDummyTagFunction )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -497,6 +521,7 @@ TaskHandle_t xTask;
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xTaskCallApplicationTaskHook( xTask, ( void * ) NULL ) != pdFAIL )
|
if( xTaskCallApplicationTaskHook( xTask, ( void * ) NULL ) != pdFAIL )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -511,16 +536,19 @@ TaskHandle_t xTask;
|
||||||
|
|
||||||
/* Now try with a NULL handle, so using this task. */
|
/* Now try with a NULL handle, so using this task. */
|
||||||
vTaskSetApplicationTaskTag( NULL, NULL );
|
vTaskSetApplicationTaskTag( NULL, NULL );
|
||||||
|
|
||||||
if( xTaskGetApplicationTaskTag( NULL ) != NULL )
|
if( xTaskGetApplicationTaskTag( NULL ) != NULL )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xTaskGetApplicationTaskTagFromISR( NULL ) != NULL )
|
if( xTaskGetApplicationTaskTagFromISR( NULL ) != NULL )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
vTaskSetApplicationTaskTag( NULL, prvDummyTagFunction );
|
vTaskSetApplicationTaskTag( NULL, prvDummyTagFunction );
|
||||||
|
|
||||||
if( xTaskGetApplicationTaskTag( NULL ) != prvDummyTagFunction )
|
if( xTaskGetApplicationTaskTag( NULL ) != prvDummyTagFunction )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -531,6 +559,7 @@ TaskHandle_t xTask;
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xTaskCallApplicationTaskHook( NULL, ( void * ) NULL ) != pdFAIL )
|
if( xTaskCallApplicationTaskHook( NULL, ( void * ) NULL ) != pdFAIL )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -544,6 +573,7 @@ TaskHandle_t xTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
vTaskSetApplicationTaskTag( NULL, NULL );
|
vTaskSetApplicationTaskTag( NULL, NULL );
|
||||||
|
|
||||||
if( xTaskGetApplicationTaskTag( NULL ) != NULL )
|
if( xTaskGetApplicationTaskTag( NULL ) != NULL )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -580,6 +610,7 @@ const UBaseType_t uxTimerNumber = ( UBaseType_t ) 55;
|
||||||
}
|
}
|
||||||
|
|
||||||
vTimerSetTimerNumber( xTimer, uxTimerNumber );
|
vTimerSetTimerNumber( xTimer, uxTimerNumber );
|
||||||
|
|
||||||
if( uxTimerGetTimerNumber( xTimer ) != uxTimerNumber )
|
if( uxTimerGetTimerNumber( xTimer ) != uxTimerNumber )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
@ -611,4 +642,3 @@ BaseType_t xReturn = pdPASS;
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,8 @@ void console_init(void)
|
||||||
xStdioMutex = xSemaphoreCreateMutexStatic( &xStdioMutexBuffer );
|
xStdioMutex = xSemaphoreCreateMutexStatic( &xStdioMutexBuffer );
|
||||||
}
|
}
|
||||||
|
|
||||||
void console_print(const char *fmt, ...)
|
void console_print( const char * fmt,
|
||||||
|
... )
|
||||||
{
|
{
|
||||||
va_list vargs;
|
va_list vargs;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@ extern "C" {
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
void console_init( void );
|
void console_init( void );
|
||||||
void console_print(const char *fmt, ...);
|
void console_print( const char * fmt,
|
||||||
|
... );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,7 @@
|
||||||
extern void main_blinky( void );
|
extern void main_blinky( void );
|
||||||
extern void main_full( void );
|
extern void main_full( void );
|
||||||
static void traceOnEnter( void );
|
static void traceOnEnter( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Only the comprehensive demo uses application hook (callback) functions. See
|
* Only the comprehensive demo uses application hook (callback) functions. See
|
||||||
* http://www.freertos.org/a00016.html for more information.
|
* http://www.freertos.org/a00016.html for more information.
|
||||||
|
@ -120,10 +121,10 @@ static void handle_sigint(int signal);
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* When configSUPPORT_STATIC_ALLOCATION is set to 1 the application writer can
|
/* When configSUPPORT_STATIC_ALLOCATION is set to 1 the application writer can
|
||||||
use a callback function to optionally provide the memory required by the idle
|
* use a callback function to optionally provide the memory required by the idle
|
||||||
and timer tasks. This is the stack that will be used by the timer task. It is
|
* and timer tasks. This is the stack that will be used by the timer task. It is
|
||||||
declared here, as a global, so it can be checked by a test that is implemented
|
* declared here, as a global, so it can be checked by a test that is implemented
|
||||||
in a different file. */
|
* in a different file. */
|
||||||
StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];
|
StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];
|
||||||
|
|
||||||
/* Notes if the trace is running or not. */
|
/* Notes if the trace is running or not. */
|
||||||
|
@ -142,11 +143,11 @@ int main( void )
|
||||||
#if ( projCOVERAGE_TEST != 1 )
|
#if ( projCOVERAGE_TEST != 1 )
|
||||||
{
|
{
|
||||||
/* Initialise the trace recorder. Use of the trace recorder is optional.
|
/* Initialise the trace recorder. Use of the trace recorder is optional.
|
||||||
See http://www.FreeRTOS.org/trace for more information. */
|
* See http://www.FreeRTOS.org/trace for more information. */
|
||||||
vTraceEnable( TRC_START );
|
vTraceEnable( TRC_START );
|
||||||
|
|
||||||
/* Start the trace recording - the recording is written to a file if
|
/* Start the trace recording - the recording is written to a file if
|
||||||
configASSERT() is called. */
|
* configASSERT() is called. */
|
||||||
printf( "\r\nTrace started.\r\nThe trace will be dumped to disk if a call to configASSERT() fails.\r\n" );
|
printf( "\r\nTrace started.\r\nThe trace will be dumped to disk if a call to configASSERT() fails.\r\n" );
|
||||||
printf( "\r\nThe trace will be dumped to disk if Enter is hit.\r\n" );
|
printf( "\r\nThe trace will be dumped to disk if Enter is hit.\r\n" );
|
||||||
uiTraceStart();
|
uiTraceStart();
|
||||||
|
@ -177,17 +178,17 @@ int main( void )
|
||||||
void vApplicationMallocFailedHook( void )
|
void vApplicationMallocFailedHook( void )
|
||||||
{
|
{
|
||||||
/* vApplicationMallocFailedHook() will only be called if
|
/* vApplicationMallocFailedHook() will only be called if
|
||||||
configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook
|
* configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook
|
||||||
function that will get called if a call to pvPortMalloc() fails.
|
* function that will get called if a call to pvPortMalloc() fails.
|
||||||
pvPortMalloc() is called internally by the kernel whenever a task, queue,
|
* pvPortMalloc() is called internally by the kernel whenever a task, queue,
|
||||||
timer or semaphore is created. It is also called by various parts of the
|
* timer or semaphore is created. It is also called by various parts of the
|
||||||
demo application. If heap_1.c, heap_2.c or heap_4.c is being used, then the
|
* demo application. If heap_1.c, heap_2.c or heap_4.c is being used, then the
|
||||||
size of the heap available to pvPortMalloc() is defined by
|
* size of the heap available to pvPortMalloc() is defined by
|
||||||
configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize()
|
* configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize()
|
||||||
API function can be used to query the size of free heap space that remains
|
* API function can be used to query the size of free heap space that remains
|
||||||
(although it does not provide information on how the remaining heap might be
|
* (although it does not provide information on how the remaining heap might be
|
||||||
fragmented). See http://www.freertos.org/a00111.html for more
|
* fragmented). See http://www.freertos.org/a00111.html for more
|
||||||
information. */
|
* information. */
|
||||||
vAssertCalled( __FILE__, __LINE__ );
|
vAssertCalled( __FILE__, __LINE__ );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -195,14 +196,14 @@ void vApplicationMallocFailedHook( void )
|
||||||
void vApplicationIdleHook( void )
|
void vApplicationIdleHook( void )
|
||||||
{
|
{
|
||||||
/* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set
|
/* vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set
|
||||||
to 1 in FreeRTOSConfig.h. It will be called on each iteration of the idle
|
* to 1 in FreeRTOSConfig.h. It will be called on each iteration of the idle
|
||||||
task. It is essential that code added to this hook function never attempts
|
* task. It is essential that code added to this hook function never attempts
|
||||||
to block in any way (for example, call xQueueReceive() with a block time
|
* to block in any way (for example, call xQueueReceive() with a block time
|
||||||
specified, or call vTaskDelay()). If application tasks make use of the
|
* specified, or call vTaskDelay()). If application tasks make use of the
|
||||||
vTaskDelete() API function to delete themselves then it is also important
|
* vTaskDelete() API function to delete themselves then it is also important
|
||||||
that vApplicationIdleHook() is permitted to return to its calling function,
|
* that vApplicationIdleHook() is permitted to return to its calling function,
|
||||||
because it is the responsibility of the idle task to clean up memory
|
* because it is the responsibility of the idle task to clean up memory
|
||||||
allocated by the kernel to any task that has since deleted itself. */
|
* allocated by the kernel to any task that has since deleted itself. */
|
||||||
|
|
||||||
|
|
||||||
usleep( 15000 );
|
usleep( 15000 );
|
||||||
|
@ -211,7 +212,7 @@ void vApplicationIdleHook( void )
|
||||||
#if ( mainSELECTED_APPLICATION == FULL_DEMO )
|
#if ( mainSELECTED_APPLICATION == FULL_DEMO )
|
||||||
{
|
{
|
||||||
/* Call the idle task processing used by the full demo. The simple
|
/* Call the idle task processing used by the full demo. The simple
|
||||||
blinky demo does not use the idle task hook. */
|
* blinky demo does not use the idle task hook. */
|
||||||
vFullDemoIdleFunction();
|
vFullDemoIdleFunction();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -225,10 +226,10 @@ void vApplicationStackOverflowHook( TaskHandle_t pxTask,
|
||||||
( void ) pxTask;
|
( void ) pxTask;
|
||||||
|
|
||||||
/* Run time stack overflow checking is performed if
|
/* Run time stack overflow checking is performed if
|
||||||
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
|
* configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
|
||||||
function is called if a stack overflow is detected. This function is
|
* function is called if a stack overflow is detected. This function is
|
||||||
provided as an example only as stack overflow checking does not function
|
* provided as an example only as stack overflow checking does not function
|
||||||
when running the FreeRTOS POSIX port. */
|
* when running the FreeRTOS POSIX port. */
|
||||||
vAssertCalled( __FILE__, __LINE__ );
|
vAssertCalled( __FILE__, __LINE__ );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -236,10 +237,10 @@ void vApplicationStackOverflowHook( TaskHandle_t pxTask,
|
||||||
void vApplicationTickHook( void )
|
void vApplicationTickHook( void )
|
||||||
{
|
{
|
||||||
/* This function will be called by each tick interrupt if
|
/* This function will be called by each tick interrupt if
|
||||||
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
|
* configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
|
||||||
added here, but the tick hook is called from an interrupt context, so
|
* added here, but the tick hook is called from an interrupt context, so
|
||||||
code must not attempt to block, and only the interrupt safe FreeRTOS API
|
* code must not attempt to block, and only the interrupt safe FreeRTOS API
|
||||||
functions can be used (those that end in FromISR()). */
|
* functions can be used (those that end in FromISR()). */
|
||||||
|
|
||||||
#if ( mainSELECTED_APPLICATION == FULL_DEMO )
|
#if ( mainSELECTED_APPLICATION == FULL_DEMO )
|
||||||
{
|
{
|
||||||
|
@ -253,15 +254,18 @@ void traceOnEnter()
|
||||||
int xReturn;
|
int xReturn;
|
||||||
struct timeval tv = { 0L, 0L };
|
struct timeval tv = { 0L, 0L };
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
|
|
||||||
FD_ZERO( &fds );
|
FD_ZERO( &fds );
|
||||||
FD_SET( 0, &fds );
|
FD_SET( 0, &fds );
|
||||||
xReturn = select( 1, &fds, NULL, NULL, &tv );
|
xReturn = select( 1, &fds, NULL, NULL, &tv );
|
||||||
|
|
||||||
if( xReturn > 0 )
|
if( xReturn > 0 )
|
||||||
{
|
{
|
||||||
if( xTraceRunning == pdTRUE )
|
if( xTraceRunning == pdTRUE )
|
||||||
{
|
{
|
||||||
prvSaveTraceFile();
|
prvSaveTraceFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clear the buffer */
|
/* clear the buffer */
|
||||||
char buffer[ 200 ];
|
char buffer[ 200 ];
|
||||||
read( 1, &buffer, 200 );
|
read( 1, &buffer, 200 );
|
||||||
|
@ -282,9 +286,9 @@ va_list arg;
|
||||||
void vApplicationDaemonTaskStartupHook( void )
|
void vApplicationDaemonTaskStartupHook( void )
|
||||||
{
|
{
|
||||||
/* This function will be called once only, when the daemon task starts to
|
/* This function will be called once only, when the daemon task starts to
|
||||||
execute (sometimes called the timer task). This is useful if the
|
* execute (sometimes called the timer task). This is useful if the
|
||||||
application includes initialisation code that would benefit from executing
|
* application includes initialisation code that would benefit from executing
|
||||||
after the scheduler has been started. */
|
* after the scheduler has been started. */
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -295,7 +299,7 @@ static BaseType_t xPrinted = pdFALSE;
|
||||||
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
|
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
|
||||||
|
|
||||||
/* Called if an assertion passed to configASSERT() fails. See
|
/* Called if an assertion passed to configASSERT() fails. See
|
||||||
http://www.freertos.org/a00110.html#configASSERT for more information. */
|
* http://www.freertos.org/a00110.html#configASSERT for more information. */
|
||||||
|
|
||||||
/* Parameters are not used. */
|
/* Parameters are not used. */
|
||||||
( void ) ulLine;
|
( void ) ulLine;
|
||||||
|
@ -316,8 +320,8 @@ volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* You can step out of this function to debug the assertion by using
|
/* You can step out of this function to debug the assertion by using
|
||||||
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
|
* the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
|
||||||
value. */
|
* value. */
|
||||||
while( ulSetToNonZeroInDebuggerToContinue == 0 )
|
while( ulSetToNonZeroInDebuggerToContinue == 0 )
|
||||||
{
|
{
|
||||||
__asm volatile ( "NOP" );
|
__asm volatile ( "NOP" );
|
||||||
|
@ -355,54 +359,54 @@ static void prvSaveTraceFile( void )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* configUSE_STATIC_ALLOCATION is set to 1, so the application must provide an
|
/* configUSE_STATIC_ALLOCATION is set to 1, so the application must provide an
|
||||||
implementation of vApplicationGetIdleTaskMemory() to provide the memory that is
|
* implementation of vApplicationGetIdleTaskMemory() to provide the memory that is
|
||||||
used by the Idle task. */
|
* used by the Idle task. */
|
||||||
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
|
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
|
||||||
StackType_t ** ppxIdleTaskStackBuffer,
|
StackType_t ** ppxIdleTaskStackBuffer,
|
||||||
uint32_t * pulIdleTaskStackSize )
|
uint32_t * pulIdleTaskStackSize )
|
||||||
{
|
{
|
||||||
/* If the buffers to be provided to the Idle task are declared inside this
|
/* If the buffers to be provided to the Idle task are declared inside this
|
||||||
function then they must be declared static - otherwise they will be allocated on
|
* function then they must be declared static - otherwise they will be allocated on
|
||||||
the stack and so not exists after this function exits. */
|
* the stack and so not exists after this function exits. */
|
||||||
static StaticTask_t xIdleTaskTCB;
|
static StaticTask_t xIdleTaskTCB;
|
||||||
static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];
|
static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];
|
||||||
|
|
||||||
/* Pass out a pointer to the StaticTask_t structure in which the Idle task's
|
/* Pass out a pointer to the StaticTask_t structure in which the Idle task's
|
||||||
state will be stored. */
|
* state will be stored. */
|
||||||
*ppxIdleTaskTCBBuffer = &xIdleTaskTCB;
|
*ppxIdleTaskTCBBuffer = &xIdleTaskTCB;
|
||||||
|
|
||||||
/* Pass out the array that will be used as the Idle task's stack. */
|
/* Pass out the array that will be used as the Idle task's stack. */
|
||||||
*ppxIdleTaskStackBuffer = uxIdleTaskStack;
|
*ppxIdleTaskStackBuffer = uxIdleTaskStack;
|
||||||
|
|
||||||
/* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer.
|
/* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer.
|
||||||
Note that, as the array is necessarily of type StackType_t,
|
* Note that, as the array is necessarily of type StackType_t,
|
||||||
configMINIMAL_STACK_SIZE is specified in words, not bytes. */
|
* configMINIMAL_STACK_SIZE is specified in words, not bytes. */
|
||||||
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
|
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the
|
/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the
|
||||||
application must provide an implementation of vApplicationGetTimerTaskMemory()
|
* application must provide an implementation of vApplicationGetTimerTaskMemory()
|
||||||
to provide the memory that is used by the Timer service task. */
|
* to provide the memory that is used by the Timer service task. */
|
||||||
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
|
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
|
||||||
StackType_t ** ppxTimerTaskStackBuffer,
|
StackType_t ** ppxTimerTaskStackBuffer,
|
||||||
uint32_t * pulTimerTaskStackSize )
|
uint32_t * pulTimerTaskStackSize )
|
||||||
{
|
{
|
||||||
/* If the buffers to be provided to the Timer task are declared inside this
|
/* If the buffers to be provided to the Timer task are declared inside this
|
||||||
function then they must be declared static - otherwise they will be allocated on
|
* function then they must be declared static - otherwise they will be allocated on
|
||||||
the stack and so not exists after this function exits. */
|
* the stack and so not exists after this function exits. */
|
||||||
static StaticTask_t xTimerTaskTCB;
|
static StaticTask_t xTimerTaskTCB;
|
||||||
|
|
||||||
/* Pass out a pointer to the StaticTask_t structure in which the Timer
|
/* Pass out a pointer to the StaticTask_t structure in which the Timer
|
||||||
task's state will be stored. */
|
* task's state will be stored. */
|
||||||
*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
|
*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
|
||||||
|
|
||||||
/* Pass out the array that will be used as the Timer task's stack. */
|
/* Pass out the array that will be used as the Timer task's stack. */
|
||||||
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
|
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
|
||||||
|
|
||||||
/* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer.
|
/* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer.
|
||||||
Note that, as the array is necessarily of type StackType_t,
|
* Note that, as the array is necessarily of type StackType_t,
|
||||||
configMINIMAL_STACK_SIZE is specified in words, not bytes. */
|
* configMINIMAL_STACK_SIZE is specified in words, not bytes. */
|
||||||
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
|
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,5 +418,6 @@ void handle_sigint( int signal )
|
||||||
{
|
{
|
||||||
printf( "chdir into %s error is %d\n", BUILD, errno );
|
printf( "chdir into %s error is %d\n", BUILD, errno );
|
||||||
}
|
}
|
||||||
|
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
|
|
||||||
/* The rate at which data is sent to the queue. The times are converted from
|
/* The rate at which data is sent to the queue. The times are converted from
|
||||||
milliseconds to ticks using the pdMS_TO_TICKS() macro. */
|
* milliseconds to ticks using the pdMS_TO_TICKS() macro. */
|
||||||
#define mainTASK_SEND_FREQUENCY_MS pdMS_TO_TICKS( 200UL )
|
#define mainTASK_SEND_FREQUENCY_MS pdMS_TO_TICKS( 200UL )
|
||||||
#define mainTIMER_SEND_FREQUENCY_MS pdMS_TO_TICKS( 2000UL )
|
#define mainTIMER_SEND_FREQUENCY_MS pdMS_TO_TICKS( 2000UL )
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ milliseconds to ticks using the pdMS_TO_TICKS() macro. */
|
||||||
#define mainQUEUE_LENGTH ( 2 )
|
#define mainQUEUE_LENGTH ( 2 )
|
||||||
|
|
||||||
/* The values sent to the queue receive task from the queue send task and the
|
/* The values sent to the queue receive task from the queue send task and the
|
||||||
queue send software timer respectively. */
|
* queue send software timer respectively. */
|
||||||
#define mainVALUE_SENT_FROM_TASK ( 100UL )
|
#define mainVALUE_SENT_FROM_TASK ( 100UL )
|
||||||
#define mainVALUE_SENT_FROM_TIMER ( 200UL )
|
#define mainVALUE_SENT_FROM_TIMER ( 200UL )
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
|
||||||
if( xQueue != NULL )
|
if( xQueue != NULL )
|
||||||
{
|
{
|
||||||
/* Start the two tasks as described in the comments at the top of this
|
/* Start the two tasks as described in the comments at the top of this
|
||||||
file. */
|
* file. */
|
||||||
xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */
|
xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */
|
||||||
"Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
"Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
||||||
configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
|
configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
|
||||||
|
@ -170,11 +170,13 @@ const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If all is well, the scheduler will now be running, and the following
|
/* If all is well, the scheduler will now be running, and the following
|
||||||
line will never be reached. If the following line does execute, then
|
* line will never be reached. If the following line does execute, then
|
||||||
there was insufficient FreeRTOS heap memory available for the idle and/or
|
* there was insufficient FreeRTOS heap memory available for the idle and/or
|
||||||
timer tasks to be created. See the memory management section on the
|
* timer tasks to be created. See the memory management section on the
|
||||||
FreeRTOS web site for more details. */
|
* FreeRTOS web site for more details. */
|
||||||
for( ;; );
|
for( ; ; )
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -193,15 +195,15 @@ const uint32_t ulValueToSend = mainVALUE_SENT_FROM_TASK;
|
||||||
for( ; ; )
|
for( ; ; )
|
||||||
{
|
{
|
||||||
/* Place this task in the blocked state until it is time to run again.
|
/* Place this task in the blocked state until it is time to run again.
|
||||||
The block time is specified in ticks, pdMS_TO_TICKS() was used to
|
* The block time is specified in ticks, pdMS_TO_TICKS() was used to
|
||||||
convert a time specified in milliseconds into a time specified in ticks.
|
* convert a time specified in milliseconds into a time specified in ticks.
|
||||||
While in the Blocked state this task will not consume any CPU time. */
|
* While in the Blocked state this task will not consume any CPU time. */
|
||||||
vTaskDelayUntil( &xNextWakeTime, xBlockTime );
|
vTaskDelayUntil( &xNextWakeTime, xBlockTime );
|
||||||
|
|
||||||
/* Send to the queue - causing the queue receive task to unblock and
|
/* Send to the queue - causing the queue receive task to unblock and
|
||||||
write to the console. 0 is used as the block time so the send operation
|
* write to the console. 0 is used as the block time so the send operation
|
||||||
will not block - it shouldn't need to block as the queue should always
|
* will not block - it shouldn't need to block as the queue should always
|
||||||
have at least one space at this point in the code. */
|
* have at least one space at this point in the code. */
|
||||||
xQueueSend( xQueue, &ulValueToSend, 0U );
|
xQueueSend( xQueue, &ulValueToSend, 0U );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,16 +214,16 @@ static void prvQueueSendTimerCallback( TimerHandle_t xTimerHandle )
|
||||||
const uint32_t ulValueToSend = mainVALUE_SENT_FROM_TIMER;
|
const uint32_t ulValueToSend = mainVALUE_SENT_FROM_TIMER;
|
||||||
|
|
||||||
/* This is the software timer callback function. The software timer has a
|
/* This is the software timer callback function. The software timer has a
|
||||||
period of two seconds and is reset each time a key is pressed. This
|
* period of two seconds and is reset each time a key is pressed. This
|
||||||
callback function will execute if the timer expires, which will only happen
|
* callback function will execute if the timer expires, which will only happen
|
||||||
if a key is not pressed for two seconds. */
|
* if a key is not pressed for two seconds. */
|
||||||
|
|
||||||
/* Avoid compiler warnings resulting from the unused parameter. */
|
/* Avoid compiler warnings resulting from the unused parameter. */
|
||||||
( void ) xTimerHandle;
|
( void ) xTimerHandle;
|
||||||
|
|
||||||
/* Send to the queue - causing the queue receive task to unblock and
|
/* Send to the queue - causing the queue receive task to unblock and
|
||||||
write out a message. This function is called from the timer/daemon task, so
|
* write out a message. This function is called from the timer/daemon task, so
|
||||||
must not block. Hence the block time is set to 0. */
|
* must not block. Hence the block time is set to 0. */
|
||||||
xQueueSend( xQueue, &ulValueToSend, 0U );
|
xQueueSend( xQueue, &ulValueToSend, 0U );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -236,17 +238,17 @@ uint32_t ulReceivedValue;
|
||||||
for( ; ; )
|
for( ; ; )
|
||||||
{
|
{
|
||||||
/* Wait until something arrives in the queue - this task will block
|
/* Wait until something arrives in the queue - this task will block
|
||||||
indefinitely provided INCLUDE_vTaskSuspend is set to 1 in
|
* indefinitely provided INCLUDE_vTaskSuspend is set to 1 in
|
||||||
FreeRTOSConfig.h. It will not use any CPU time while it is in the
|
* FreeRTOSConfig.h. It will not use any CPU time while it is in the
|
||||||
Blocked state. */
|
* Blocked state. */
|
||||||
xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );
|
xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );
|
||||||
|
|
||||||
/* To get here something must have been received from the queue, but
|
/* To get here something must have been received from the queue, but
|
||||||
is it an expected value? Normally calling printf() from a task is not
|
* is it an expected value? Normally calling printf() from a task is not
|
||||||
a good idea. Here there is lots of stack space and only one task is
|
* a good idea. Here there is lots of stack space and only one task is
|
||||||
using console IO so it is ok. However, note the comments at the top of
|
* using console IO so it is ok. However, note the comments at the top of
|
||||||
this file about the risks of making Linux system calls (such as
|
* this file about the risks of making Linux system calls (such as
|
||||||
console output) from a FreeRTOS task. */
|
* console output) from a FreeRTOS task. */
|
||||||
if( ulReceivedValue == mainVALUE_SENT_FROM_TASK )
|
if( ulReceivedValue == mainVALUE_SENT_FROM_TASK )
|
||||||
{
|
{
|
||||||
console_print( "Message received from task\n" );
|
console_print( "Message received from task\n" );
|
||||||
|
|
|
@ -132,7 +132,7 @@ extern BaseType_t xRunCodeCoverageTestAdditions( void );
|
||||||
static void prvCheckTask( void * pvParameters );
|
static void prvCheckTask( void * pvParameters );
|
||||||
|
|
||||||
/* A task that is created from the idle task to test the functionality of
|
/* A task that is created from the idle task to test the functionality of
|
||||||
eTaskStateGet(). */
|
* eTaskStateGet(). */
|
||||||
static void prvTestTask( void * pvParameters );
|
static void prvTestTask( void * pvParameters );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -151,7 +151,8 @@ static void prvDemonstratePendingFunctionCall( void );
|
||||||
/*
|
/*
|
||||||
* The function that is pended by prvDemonstratePendingFunctionCall().
|
* The function that is pended by prvDemonstratePendingFunctionCall().
|
||||||
*/
|
*/
|
||||||
static void prvPendedFunction( void *pvParameter1, uint32_t ulParameter2 );
|
static void prvPendedFunction( void * pvParameter1,
|
||||||
|
uint32_t ulParameter2 );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prvDemonstrateTimerQueryFunctions() is called from the idle task hook
|
* prvDemonstrateTimerQueryFunctions() is called from the idle task hook
|
||||||
|
@ -186,7 +187,7 @@ static void prvReloadModeTestTimerCallback( TimerHandle_t xTimer );
|
||||||
static char * pcStatusMessage = "OK: No errors";
|
static char * pcStatusMessage = "OK: No errors";
|
||||||
|
|
||||||
/* This semaphore is created purely to test using the vSemaphoreDelete() and
|
/* This semaphore is created purely to test using the vSemaphoreDelete() and
|
||||||
semaphore tracing API functions. It has no other purpose. */
|
* semaphore tracing API functions. It has no other purpose. */
|
||||||
static SemaphoreHandle_t xMutexToDelete = NULL;
|
static SemaphoreHandle_t xMutexToDelete = NULL;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -198,7 +199,7 @@ int main_full( void )
|
||||||
|
|
||||||
/* Create the standard demo tasks. */
|
/* Create the standard demo tasks. */
|
||||||
vStartTaskNotifyTask();
|
vStartTaskNotifyTask();
|
||||||
// vStartTaskNotifyArrayTask();
|
/* 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 );
|
||||||
|
@ -244,20 +245,20 @@ int main_full( void )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The suicide tasks must be created last as they need to know how many
|
/* The suicide tasks must be created last as they need to know how many
|
||||||
tasks were running prior to their creation. This then allows them to
|
* tasks were running prior to their creation. This then allows them to
|
||||||
ascertain whether or not the correct/expected number of tasks are running at
|
* ascertain whether or not the correct/expected number of tasks are running at
|
||||||
any given time. */
|
* any given time. */
|
||||||
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
|
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
|
||||||
|
|
||||||
/* Create the semaphore that will be deleted in the idle task hook. This
|
/* Create the semaphore that will be deleted in the idle task hook. This
|
||||||
is done purely to test the use of vSemaphoreDelete(). */
|
* is done purely to test the use of vSemaphoreDelete(). */
|
||||||
xMutexToDelete = xSemaphoreCreateMutex();
|
xMutexToDelete = xSemaphoreCreateMutex();
|
||||||
|
|
||||||
/* Start the scheduler itself. */
|
/* Start the scheduler itself. */
|
||||||
vTaskStartScheduler();
|
vTaskStartScheduler();
|
||||||
|
|
||||||
/* Should never get here unless there was not enough heap space to create
|
/* Should never get here unless there was not enough heap space to create
|
||||||
the idle and other system tasks. */
|
* the idle and other system tasks. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -302,10 +303,10 @@ HeapStats_t xHeapStats;
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: Notification";
|
pcStatusMessage = "Error: Notification";
|
||||||
}
|
}
|
||||||
// else if( xAreTaskNotificationArrayTasksStillRunning() != pdTRUE )
|
/* else if( xAreTaskNotificationArrayTasksStillRunning() != pdTRUE ) */
|
||||||
// {
|
/* { */
|
||||||
// pcStatusMessage = "Error: NotificationArray";
|
/* pcStatusMessage = "Error: NotificationArray"; */
|
||||||
// }
|
/* } */
|
||||||
else if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
|
else if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: IntSem";
|
pcStatusMessage = "Error: IntSem";
|
||||||
|
@ -401,7 +402,7 @@ HeapStats_t xHeapStats;
|
||||||
pcStatusMessage,
|
pcStatusMessage,
|
||||||
xTaskGetTickCount() );
|
xTaskGetTickCount() );
|
||||||
|
|
||||||
// Reset the error condition
|
/* Reset the error condition */
|
||||||
pcStatusMessage = "OK: No errors";
|
pcStatusMessage = "OK: No errors";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -415,11 +416,11 @@ const unsigned long ulMSToSleep = 5;
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
|
||||||
/* This task is just used to test the eTaskStateGet() function. It
|
/* This task is just used to test the eTaskStateGet() function. It
|
||||||
does not have anything to do. */
|
* does not have anything to do. */
|
||||||
for( ; ; )
|
for( ; ; )
|
||||||
{
|
{
|
||||||
/* Sleep to reduce CPU load, but don't sleep indefinitely in case there are
|
/* Sleep to reduce CPU load, but don't sleep indefinitely in case there are
|
||||||
tasks waiting to be terminated by the idle task. */
|
* tasks waiting to be terminated by the idle task. */
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
ts.tv_sec = ulMSToSleep / 1000;
|
ts.tv_sec = ulMSToSleep / 1000;
|
||||||
ts.tv_nsec = ulMSToSleep % 1000l * 1000000l;
|
ts.tv_nsec = ulMSToSleep % 1000l * 1000000l;
|
||||||
|
@ -435,34 +436,35 @@ const unsigned long ulMSToSleep = 15;
|
||||||
void * pvAllocated;
|
void * pvAllocated;
|
||||||
|
|
||||||
/* Sleep to reduce CPU load, but don't sleep indefinitely in case there are
|
/* Sleep to reduce CPU load, but don't sleep indefinitely in case there are
|
||||||
tasks waiting to be terminated by the idle task. */
|
* tasks waiting to be terminated by the idle task. */
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
|
|
||||||
ts.tv_sec = ulMSToSleep / 1000;
|
ts.tv_sec = ulMSToSleep / 1000;
|
||||||
ts.tv_nsec = ulMSToSleep % 1000l * 1000000l;
|
ts.tv_nsec = ulMSToSleep % 1000l * 1000000l;
|
||||||
nanosleep( &ts, NULL );
|
nanosleep( &ts, NULL );
|
||||||
|
|
||||||
/* Demonstrate a few utility functions that are not demonstrated by any of
|
/* Demonstrate a few utility functions that are not demonstrated by any of
|
||||||
the standard demo tasks. */
|
* the standard demo tasks. */
|
||||||
prvDemonstrateTaskStateAndHandleGetFunctions();
|
prvDemonstrateTaskStateAndHandleGetFunctions();
|
||||||
|
|
||||||
/* Demonstrate the use of xTimerPendFunctionCall(), which is not
|
/* Demonstrate the use of xTimerPendFunctionCall(), which is not
|
||||||
demonstrated by any of the standard demo tasks. */
|
* demonstrated by any of the standard demo tasks. */
|
||||||
prvDemonstratePendingFunctionCall();
|
prvDemonstratePendingFunctionCall();
|
||||||
|
|
||||||
/* Demonstrate the use of functions that query information about a software
|
/* Demonstrate the use of functions that query information about a software
|
||||||
timer. */
|
* timer. */
|
||||||
prvDemonstrateTimerQueryFunctions();
|
prvDemonstrateTimerQueryFunctions();
|
||||||
|
|
||||||
/* If xMutexToDelete has not already been deleted, then delete it now.
|
/* If xMutexToDelete has not already been deleted, then delete it now.
|
||||||
This is done purely to demonstrate the use of, and test, the
|
* This is done purely to demonstrate the use of, and test, the
|
||||||
vSemaphoreDelete() macro. Care must be taken not to delete a semaphore
|
* vSemaphoreDelete() macro. Care must be taken not to delete a semaphore
|
||||||
that has tasks blocked on it. */
|
* that has tasks blocked on it. */
|
||||||
if( xMutexToDelete != NULL )
|
if( xMutexToDelete != NULL )
|
||||||
{
|
{
|
||||||
/* For test purposes, add the mutex to the registry, then remove it
|
/* For test purposes, add the mutex to the registry, then remove it
|
||||||
again, before it is deleted - checking its name is as expected before
|
* again, before it is deleted - checking its name is as expected before
|
||||||
and after the assertion into the registry and its removal from the
|
* and after the assertion into the registry and its removal from the
|
||||||
registry. */
|
* registry. */
|
||||||
configASSERT( pcQueueGetName( xMutexToDelete ) == NULL );
|
configASSERT( pcQueueGetName( xMutexToDelete ) == NULL );
|
||||||
vQueueAddToRegistry( xMutexToDelete, "Test_Mutex" );
|
vQueueAddToRegistry( xMutexToDelete, "Test_Mutex" );
|
||||||
configASSERT( strcmp( pcQueueGetName( xMutexToDelete ), "Test_Mutex" ) == 0 );
|
configASSERT( strcmp( pcQueueGetName( xMutexToDelete ), "Test_Mutex" ) == 0 );
|
||||||
|
@ -474,12 +476,12 @@ void *pvAllocated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Exercise heap_5 a bit. The malloc failed hook will trap failed
|
/* Exercise heap_5 a bit. The malloc failed hook will trap failed
|
||||||
allocations so there is no need to test here. */
|
* allocations so there is no need to test here. */
|
||||||
pvAllocated = pvPortMalloc( ( rand() % 500 ) + 1 );
|
pvAllocated = pvPortMalloc( ( rand() % 500 ) + 1 );
|
||||||
vPortFree( pvAllocated );
|
vPortFree( pvAllocated );
|
||||||
|
|
||||||
/* Exit after a fixed time so code coverage results are written to the
|
/* Exit after a fixed time so code coverage results are written to the
|
||||||
disk. */
|
* disk. */
|
||||||
#if ( projCOVERAGE_TEST == 1 )
|
#if ( projCOVERAGE_TEST == 1 )
|
||||||
{
|
{
|
||||||
const TickType_t xMaxRunTime = pdMS_TO_TICKS( 30000UL );
|
const TickType_t xMaxRunTime = pdMS_TO_TICKS( 30000UL );
|
||||||
|
@ -495,7 +497,7 @@ void *pvAllocated;
|
||||||
vTaskEndScheduler();
|
vTaskEndScheduler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* if ( projCOVERAGE_TEST == 1 ) */
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -505,7 +507,7 @@ void vFullDemoTickHookFunction( void )
|
||||||
TaskHandle_t xTimerTask;
|
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. */
|
||||||
|
@ -519,7 +521,7 @@ TaskHandle_t xTimerTask;
|
||||||
#if ( configUSE_QUEUE_SETS == 1 ) /* Remove the tests if queue sets are not defined. */
|
#if ( configUSE_QUEUE_SETS == 1 ) /* Remove the tests if queue sets are not defined. */
|
||||||
{
|
{
|
||||||
/* Write to a queue that is in use as part of the queue set demo to
|
/* Write to a queue that is in use as part of the queue set demo to
|
||||||
demonstrate using queue sets from an ISR. */
|
* demonstrate using queue sets from an ISR. */
|
||||||
vQueueSetAccessQueueSetFromISR();
|
vQueueSetAccessQueueSetFromISR();
|
||||||
vQueueSetPollingInterruptAccess();
|
vQueueSetPollingInterruptAccess();
|
||||||
}
|
}
|
||||||
|
@ -533,14 +535,14 @@ TaskHandle_t xTimerTask;
|
||||||
|
|
||||||
/* Exercise using task notifications from an interrupt. */
|
/* Exercise using task notifications from an interrupt. */
|
||||||
xNotifyTaskFromISR();
|
xNotifyTaskFromISR();
|
||||||
// xNotifyArrayTaskFromISR();
|
/* 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. */
|
||||||
|
@ -549,7 +551,8 @@ TaskHandle_t xTimerTask;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
static void prvPendedFunction( void *pvParameter1, uint32_t ulParameter2 )
|
static void prvPendedFunction( void * pvParameter1,
|
||||||
|
uint32_t ulParameter2 )
|
||||||
{
|
{
|
||||||
static intptr_t ulLastParameter1 = 1000UL, ulLastParameter2 = 0UL;
|
static intptr_t ulLastParameter1 = 1000UL, ulLastParameter2 = 0UL;
|
||||||
intptr_t ulParameter1;
|
intptr_t ulParameter1;
|
||||||
|
@ -573,7 +576,7 @@ intptr_t ulParameter1;
|
||||||
static void prvTestTimerCallback( TimerHandle_t xTimer )
|
static void prvTestTimerCallback( TimerHandle_t xTimer )
|
||||||
{
|
{
|
||||||
/* This is the callback function for the timer accessed by
|
/* This is the callback function for the timer accessed by
|
||||||
prvDemonstrateTimerQueryFunctions(). The callback does not do anything. */
|
* prvDemonstrateTimerQueryFunctions(). The callback does not do anything. */
|
||||||
( void ) xTimer;
|
( void ) xTimer;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -592,7 +595,7 @@ const TickType_t xDontBlock = 0;
|
||||||
if( xTimer != NULL )
|
if( xTimer != NULL )
|
||||||
{
|
{
|
||||||
/* Called from the idle task so a block time must not be
|
/* Called from the idle task so a block time must not be
|
||||||
specified. */
|
* specified. */
|
||||||
xTimerStart( xTimer, xDontBlock );
|
xTimerStart( xTimer, xDontBlock );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -606,11 +609,11 @@ const TickType_t xDontBlock = 0;
|
||||||
configASSERT( xTimerGetPeriod( xTimer ) == portMAX_DELAY );
|
configASSERT( xTimerGetPeriod( xTimer ) == portMAX_DELAY );
|
||||||
|
|
||||||
/* Demonstrate querying a timer's next expiry time, although nothing is
|
/* Demonstrate querying a timer's next expiry time, although nothing is
|
||||||
done with the returned value. Note if the expiry time is less than the
|
* done with the returned value. Note if the expiry time is less than the
|
||||||
maximum tick count then the expiry time has overflowed from the current
|
* maximum tick count then the expiry time has overflowed from the current
|
||||||
time. In this case the expiry time was set to portMAX_DELAY, so it is
|
* time. In this case the expiry time was set to portMAX_DELAY, so it is
|
||||||
expected to be less than the current time until the current time has
|
* expected to be less than the current time until the current time has
|
||||||
itself overflowed. */
|
* itself overflowed. */
|
||||||
xExpiryTime = xTimerGetExpiryTime( xTimer );
|
xExpiryTime = xTimerGetExpiryTime( xTimer );
|
||||||
( void ) xExpiryTime;
|
( void ) xExpiryTime;
|
||||||
}
|
}
|
||||||
|
@ -623,7 +626,8 @@ static intptr_t ulParameter1 = 1000UL, ulParameter2 = 0UL;
|
||||||
const TickType_t xDontBlock = 0; /* This is called from the idle task so must *not* attempt to block. */
|
const TickType_t xDontBlock = 0; /* This is called from the idle task so must *not* attempt to block. */
|
||||||
|
|
||||||
/* prvPendedFunction() just expects the parameters to be incremented by one
|
/* prvPendedFunction() just expects the parameters to be incremented by one
|
||||||
each time it is called. */
|
* each time it is called. */
|
||||||
|
|
||||||
ulParameter1++;
|
ulParameter1++;
|
||||||
ulParameter2++;
|
ulParameter2++;
|
||||||
|
|
||||||
|
@ -642,20 +646,20 @@ TaskStatus_t xTaskInfo;
|
||||||
extern StackType_t uxTimerTaskStack[];
|
extern StackType_t uxTimerTaskStack[];
|
||||||
|
|
||||||
/* 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
|
||||||
the task number. */
|
* the task number. */
|
||||||
xIdleTaskHandle = xTaskGetIdleTaskHandle();
|
xIdleTaskHandle = xTaskGetIdleTaskHandle();
|
||||||
xTimerTaskHandle = xTimerGetTimerDaemonTaskHandle();
|
xTimerTaskHandle = xTimerGetTimerDaemonTaskHandle();
|
||||||
|
|
||||||
/* This is the idle hook, so the current task handle should equal the
|
/* This is the idle hook, so the current task handle should equal the
|
||||||
returned idle task handle. */
|
* returned idle task handle. */
|
||||||
if( xTaskGetCurrentTaskHandle() != xIdleTaskHandle )
|
if( xTaskGetCurrentTaskHandle() != xIdleTaskHandle )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: Returned idle task handle was incorrect";
|
pcStatusMessage = "Error: Returned idle task handle was incorrect";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check the same handle is obtained using the idle task's name. First try
|
/* Check the same handle is obtained using the idle task's name. First try
|
||||||
with the wrong name, then the right name. */
|
* with the wrong name, then the right name. */
|
||||||
if( xTaskGetHandle( "Idle" ) == xIdleTaskHandle )
|
if( xTaskGetHandle( "Idle" ) == xIdleTaskHandle )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: Returned handle for name Idle was incorrect";
|
pcStatusMessage = "Error: Returned handle for name Idle was incorrect";
|
||||||
|
@ -668,6 +672,7 @@ extern StackType_t uxTimerTaskStack[];
|
||||||
|
|
||||||
/* Check the timer task handle was returned correctly. */
|
/* Check the timer task handle was returned correctly. */
|
||||||
pcTaskName = pcTaskGetName( xTimerTaskHandle );
|
pcTaskName = pcTaskGetName( xTimerTaskHandle );
|
||||||
|
|
||||||
if( strcmp( pcTaskName, "Tmr Svc" ) != 0 )
|
if( strcmp( pcTaskName, "Tmr Svc" ) != 0 )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: Returned timer task handle was incorrect";
|
pcStatusMessage = "Error: Returned timer task handle was incorrect";
|
||||||
|
@ -707,8 +712,8 @@ extern StackType_t uxTimerTaskStack[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Other tests that should only be performed once follow. The test task
|
/* Other tests that should only be performed once follow. The test task
|
||||||
is not created on each iteration because to do so would cause the death
|
* is not created on each iteration because to do so would cause the death
|
||||||
task to report an error (too many tasks running). */
|
* task to report an error (too many tasks running). */
|
||||||
if( xPerformedOneShotTests == pdFALSE )
|
if( xPerformedOneShotTests == pdFALSE )
|
||||||
{
|
{
|
||||||
/* Don't run this part of the test again. */
|
/* Don't run this part of the test again. */
|
||||||
|
@ -725,6 +730,7 @@ extern StackType_t uxTimerTaskStack[];
|
||||||
|
|
||||||
/* Now suspend the test task and check its state is reported correctly. */
|
/* Now suspend the test task and check its state is reported correctly. */
|
||||||
vTaskSuspend( xTestTask );
|
vTaskSuspend( xTestTask );
|
||||||
|
|
||||||
if( eTaskStateGet( xTestTask ) != eSuspended )
|
if( eTaskStateGet( xTestTask ) != eSuspended )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: Returned test task state was incorrect 2";
|
pcStatusMessage = "Error: Returned test task state was incorrect 2";
|
||||||
|
@ -732,6 +738,7 @@ extern StackType_t uxTimerTaskStack[];
|
||||||
|
|
||||||
/* Now delete the task and check its state is reported correctly. */
|
/* Now delete the task and check its state is reported correctly. */
|
||||||
vTaskDelete( xTestTask );
|
vTaskDelete( xTestTask );
|
||||||
|
|
||||||
if( eTaskStateGet( xTestTask ) != eDeleted )
|
if( eTaskStateGet( xTestTask ) != eDeleted )
|
||||||
{
|
{
|
||||||
pcStatusMessage = "Error: Returned test task state was incorrect 3";
|
pcStatusMessage = "Error: Returned test task state was incorrect 3";
|
||||||
|
@ -751,7 +758,7 @@ unsigned portBASE_TYPE uxReturn, x;
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
|
||||||
/* Create the queue that will be used. Nothing is actually going to be
|
/* Create the queue that will be used. Nothing is actually going to be
|
||||||
sent or received so the queue item size is set to 0. */
|
* sent or received so the queue item size is set to 0. */
|
||||||
xQueue = xQueueCreate( uxQueueLength, 0 );
|
xQueue = xQueueCreate( uxQueueLength, 0 );
|
||||||
configASSERT( xQueue );
|
configASSERT( xQueue );
|
||||||
|
|
||||||
|
@ -763,11 +770,11 @@ unsigned portBASE_TYPE uxReturn, x;
|
||||||
uxReturn = uxQueueMessagesWaiting( xQueue );
|
uxReturn = uxQueueMessagesWaiting( xQueue );
|
||||||
|
|
||||||
/* Check the number of messages being reported as being available
|
/* Check the number of messages being reported as being available
|
||||||
is as expected, and force an assert if not. */
|
* is as expected, and force an assert if not. */
|
||||||
if( uxReturn != x )
|
if( uxReturn != x )
|
||||||
{
|
{
|
||||||
/* xQueue cannot be NULL so this is deliberately causing an
|
/* xQueue cannot be NULL so this is deliberately causing an
|
||||||
assert to be triggered as there is an error. */
|
* assert to be triggered as there is an error. */
|
||||||
configASSERT( xQueue == NULL );
|
configASSERT( xQueue == NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -775,11 +782,11 @@ unsigned portBASE_TYPE uxReturn, x;
|
||||||
uxReturn = uxQueueSpacesAvailable( xQueue );
|
uxReturn = uxQueueSpacesAvailable( xQueue );
|
||||||
|
|
||||||
/* Check the number of spaces being reported as being available
|
/* Check the number of spaces being reported as being available
|
||||||
is as expected, and force an assert if not. */
|
* is as expected, and force an assert if not. */
|
||||||
if( uxReturn != ( uxQueueLength - x ) )
|
if( uxReturn != ( uxQueueLength - x ) )
|
||||||
{
|
{
|
||||||
/* xQueue cannot be NULL so this is deliberately causing an
|
/* xQueue cannot be NULL so this is deliberately causing an
|
||||||
assert to be triggered as there is an error. */
|
* assert to be triggered as there is an error. */
|
||||||
configASSERT( xQueue == NULL );
|
configASSERT( xQueue == NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -789,6 +796,7 @@ unsigned portBASE_TYPE uxReturn, x;
|
||||||
|
|
||||||
/* Perform the same check while the queue is full. */
|
/* Perform the same check while the queue is full. */
|
||||||
uxReturn = uxQueueMessagesWaiting( xQueue );
|
uxReturn = uxQueueMessagesWaiting( xQueue );
|
||||||
|
|
||||||
if( uxReturn != uxQueueLength )
|
if( uxReturn != uxQueueLength )
|
||||||
{
|
{
|
||||||
configASSERT( xQueue == NULL );
|
configASSERT( xQueue == NULL );
|
||||||
|
@ -816,7 +824,7 @@ static void prvPermanentlyBlockingSemaphoreTask( void *pvParameters )
|
||||||
SemaphoreHandle_t xSemaphore;
|
SemaphoreHandle_t xSemaphore;
|
||||||
|
|
||||||
/* Prevent compiler warning about unused parameter in the case that
|
/* Prevent compiler warning about unused parameter in the case that
|
||||||
configASSERT() is not defined. */
|
* configASSERT() is not defined. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
|
||||||
/* This task should block on a semaphore, and never return. */
|
/* This task should block on a semaphore, and never return. */
|
||||||
|
@ -826,7 +834,7 @@ SemaphoreHandle_t xSemaphore;
|
||||||
xSemaphoreTake( xSemaphore, portMAX_DELAY );
|
xSemaphoreTake( xSemaphore, portMAX_DELAY );
|
||||||
|
|
||||||
/* The above xSemaphoreTake() call should never return, force an assert if
|
/* The above xSemaphoreTake() call should never return, force an assert if
|
||||||
it does. */
|
* it does. */
|
||||||
configASSERT( pvParameters != NULL );
|
configASSERT( pvParameters != NULL );
|
||||||
vTaskDelete( NULL );
|
vTaskDelete( NULL );
|
||||||
}
|
}
|
||||||
|
@ -835,14 +843,14 @@ SemaphoreHandle_t xSemaphore;
|
||||||
static void prvPermanentlyBlockingNotificationTask( void * pvParameters )
|
static void prvPermanentlyBlockingNotificationTask( void * pvParameters )
|
||||||
{
|
{
|
||||||
/* Prevent compiler warning about unused parameter in the case that
|
/* Prevent compiler warning about unused parameter in the case that
|
||||||
configASSERT() is not defined. */
|
* configASSERT() is not defined. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
|
||||||
/* This task should block on a task notification, and never return. */
|
/* This task should block on a task notification, and never return. */
|
||||||
ulTaskNotifyTake( pdTRUE, portMAX_DELAY );
|
ulTaskNotifyTake( pdTRUE, portMAX_DELAY );
|
||||||
|
|
||||||
/* The above ulTaskNotifyTake() call should never return, force an assert
|
/* The above ulTaskNotifyTake() call should never return, force an assert
|
||||||
if it does. */
|
* if it does. */
|
||||||
configASSERT( pvParameters != NULL );
|
configASSERT( pvParameters != NULL );
|
||||||
vTaskDelete( NULL );
|
vTaskDelete( NULL );
|
||||||
}
|
}
|
||||||
|
@ -880,15 +888,15 @@ const TickType_t x100ms = pdMS_TO_TICKS( 100UL );
|
||||||
configASSERT( xTimerGetPeriod( xTimer ) == x100ms );
|
configASSERT( xTimerGetPeriod( xTimer ) == x100ms );
|
||||||
|
|
||||||
/* Timer was created as a one-shot timer. Its callback just increments the
|
/* Timer was created as a one-shot timer. Its callback just increments the
|
||||||
timer's ID - so set the ID to 0, let the timer run for a number of timeout
|
* timer's ID - so set the ID to 0, let the timer run for a number of timeout
|
||||||
periods, then check the timer has only executed once. */
|
* periods, then check the timer has only executed once. */
|
||||||
vTimerSetTimerID( xTimer, ( void * ) 0 );
|
vTimerSetTimerID( xTimer, ( void * ) 0 );
|
||||||
xTimerStart( xTimer, portMAX_DELAY );
|
xTimerStart( xTimer, portMAX_DELAY );
|
||||||
vTaskDelay( 3UL * x100ms );
|
vTaskDelay( 3UL * x100ms );
|
||||||
configASSERT( ( ( uintptr_t ) ( pvTimerGetTimerID( xTimer ) ) ) == 1UL );
|
configASSERT( ( ( uintptr_t ) ( pvTimerGetTimerID( xTimer ) ) ) == 1UL );
|
||||||
|
|
||||||
/* Now change the timer to be an auto-reload timer and check it executes
|
/* Now change the timer to be an auto-reload timer and check it executes
|
||||||
the expected number of times. */
|
* the expected number of times. */
|
||||||
vTimerSetReloadMode( xTimer, pdTRUE );
|
vTimerSetReloadMode( xTimer, pdTRUE );
|
||||||
vTimerSetTimerID( xTimer, ( void * ) 0 );
|
vTimerSetTimerID( xTimer, ( void * ) 0 );
|
||||||
xTimerStart( xTimer, 0 );
|
xTimerStart( xTimer, 0 );
|
||||||
|
@ -897,7 +905,7 @@ const TickType_t x100ms = pdMS_TO_TICKS( 100UL );
|
||||||
configASSERT( xTimerStop( xTimer, 0 ) != pdFAIL );
|
configASSERT( xTimerStop( xTimer, 0 ) != pdFAIL );
|
||||||
|
|
||||||
/* Now change the timer back to be a one-shot timer and check it only
|
/* Now change the timer back to be a one-shot timer and check it only
|
||||||
executes once. */
|
* executes once. */
|
||||||
vTimerSetReloadMode( xTimer, pdFALSE );
|
vTimerSetReloadMode( xTimer, pdFALSE );
|
||||||
vTimerSetTimerID( xTimer, ( void * ) 0 );
|
vTimerSetTimerID( xTimer, ( void * ) 0 );
|
||||||
xTimerStart( xTimer, 0 );
|
xTimerStart( xTimer, 0 );
|
||||||
|
|
|
@ -61,7 +61,7 @@ extern "C" {
|
||||||
* required at least for the ARM Cortex-M port, that uses the ARM CMSIS API.
|
* required at least for the ARM Cortex-M port, that uses the ARM CMSIS API.
|
||||||
* Try that in case of build problems. Otherwise, remove the #error line below.
|
* Try that in case of build problems. Otherwise, remove the #error line below.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
//#error "Trace Recorder: Please include your processor's header file here and remove this line."
|
/*#error "Trace Recorder: Please include your processor's header file here and remove this line." */
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Configuration Macro: TRC_CFG_HARDWARE_PORT
|
* Configuration Macro: TRC_CFG_HARDWARE_PORT
|
||||||
|
@ -98,6 +98,7 @@ extern "C" {
|
||||||
* TRC_RECORDER_MODE_STREAMING
|
* TRC_RECORDER_MODE_STREAMING
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define TRC_CFG_RECORDER_MODE TRC_RECORDER_MODE_SNAPSHOT
|
#define TRC_CFG_RECORDER_MODE TRC_RECORDER_MODE_SNAPSHOT
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* TRC_CFG_FREERTOS_VERSION
|
* TRC_CFG_FREERTOS_VERSION
|
||||||
*
|
*
|
||||||
|
|
|
@ -320,7 +320,7 @@
|
||||||
*
|
*
|
||||||
* // Finds the existing UB channel
|
* // Finds the existing UB channel
|
||||||
* vTracePrintF(chn2, "%Z: %d", value2);
|
* vTracePrintF(chn2, "%Z: %d", value2);
|
||||||
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER 0
|
#define TRC_CFG_USE_SEPARATE_USER_EVENT_BUFFER 0
|
||||||
|
|
||||||
|
|
|
@ -204,6 +204,7 @@ cg
|
||||||
ch
|
ch
|
||||||
chacha
|
chacha
|
||||||
chachapoly
|
chachapoly
|
||||||
|
chdir
|
||||||
checklogin
|
checklogin
|
||||||
checknullarg
|
checknullarg
|
||||||
checktimer
|
checktimer
|
||||||
|
@ -777,6 +778,7 @@ gir
|
||||||
girq
|
girq
|
||||||
girqm
|
girqm
|
||||||
github
|
github
|
||||||
|
gmon
|
||||||
gnd
|
gnd
|
||||||
gnuc
|
gnuc
|
||||||
googleapis
|
googleapis
|
||||||
|
@ -2158,6 +2160,7 @@ shouldn
|
||||||
shtml
|
shtml
|
||||||
sice
|
sice
|
||||||
sifive
|
sifive
|
||||||
|
sigint
|
||||||
signalled
|
signalled
|
||||||
signatureverificationstate
|
signatureverificationstate
|
||||||
signatureverificationstateptr
|
signatureverificationstateptr
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue