Final preparation for new release:

FreeRTOS+Trace:
 - Add trace macros for task notifications.
 - Update to the latest trace recorder library.

Demo projects:
 - Only include the CLI command to show run time states if configGENERATE_RUN_TIME_STATS is set to 1.
This commit is contained in:
Richard Barry 2015-08-12 10:34:30 +00:00
parent 99d4f2c454
commit 3291f5a08d
23 changed files with 5473 additions and 1268 deletions

View file

@ -617,6 +617,34 @@ extern "C" {
#define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName)
#endif
#ifndef traceTASK_NOTIFY_TAKE_BLOCK
#define traceTASK_NOTIFY_TAKE_BLOCK()
#endif
#ifndef traceTASK_NOTIFY_TAKE
#define traceTASK_NOTIFY_TAKE()
#endif
#ifndef traceTASK_NOTIFY_WAIT_BLOCK
#define traceTASK_NOTIFY_WAIT_BLOCK()
#endif
#ifndef traceTASK_NOTIFY_WAIT
#define traceTASK_NOTIFY_WAIT()
#endif
#ifndef traceTASK_NOTIFY
#define traceTASK_NOTIFY()
#endif
#ifndef traceTASK_NOTIFY_FROM_ISR
#define traceTASK_NOTIFY_FROM_ISR()
#endif
#ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
#define traceTASK_NOTIFY_GIVE_FROM_ISR()
#endif
#ifndef configGENERATE_RUN_TIME_STATS
#define configGENERATE_RUN_TIME_STATS 0
#endif

View file

@ -113,10 +113,8 @@ typedef unsigned short UBaseType_t;
/*-----------------------------------------------------------*/
/* Critical section management. */
#define portINTERRUPT_BITS ( ( uint16_t ) configKERNEL_INTERRUPT_PRIORITY << ( uint16_t ) 5 )
#define portDISABLE_INTERRUPTS() SR |= portINTERRUPT_BITS; __asm volatile ( "NOP" )
#define portENABLE_INTERRUPTS() SR &= ~portINTERRUPT_BITS
#define portDISABLE_INTERRUPTS() SET_CPU_IPL( configKERNEL_INTERRUPT_PRIORITY ); __asm volatile ( "NOP" )
#define portENABLE_INTERRUPTS() SET_CPU_IPL( 0 )
/* Note that exiting a critical sectino will set the IPL bits to 0, nomatter
what their value was prior to entering the critical section. */

View file

@ -1062,8 +1062,8 @@ StackType_t *pxTopOfStack;
taskENTER_CRITICAL();
{
/* If null is passed in here then we are changing the
priority of the calling function. */
/* If null is passed in here then it is the priority of the that
called uxTaskPriorityGet() that is being queried. */
pxTCB = prvGetTCBFromHandle( xTask );
uxReturn = pxTCB->uxPriority;
}
@ -3960,6 +3960,8 @@ TickType_t uxReturn;
}
#endif /* INCLUDE_vTaskSuspend */
traceTASK_NOTIFY_TAKE_BLOCK();
/* All ports are written to allow a yield in a critical
section (some will yield immediately, others wait until the
critical section exits) - but it is not something that
@ -3980,6 +3982,7 @@ TickType_t uxReturn;
taskENTER_CRITICAL();
{
traceTASK_NOTIFY_TAKE();
ulReturn = pxCurrentTCB->ulNotifiedValue;
if( ulReturn != 0UL )
@ -4075,6 +4078,8 @@ TickType_t uxReturn;
}
#endif /* INCLUDE_vTaskSuspend */
traceTASK_NOTIFY_WAIT_BLOCK();
/* All ports are written to allow a yield in a critical
section (some will yield immediately, others wait until the
critical section exits) - but it is not something that
@ -4095,6 +4100,8 @@ TickType_t uxReturn;
taskENTER_CRITICAL();
{
traceTASK_NOTIFY_WAIT();
if( pulNotificationValue != NULL )
{
/* Output the current notification value, which may or may not
@ -4183,6 +4190,7 @@ TickType_t uxReturn;
break;
}
traceTASK_NOTIFY();
/* If the task is in the blocked state specifically to wait for a
notification then unblock it now. */
@ -4307,7 +4315,8 @@ TickType_t uxReturn;
break;
}
traceTASK_NOTIFY_FROM_ISR();
/* If the task is in the blocked state specifically to wait for a
notification then unblock it now. */
if( eOriginalNotifyState == eWaitingNotification )
@ -4388,6 +4397,8 @@ TickType_t uxReturn;
/* 'Giving' is equivalent to incrementing a count in a counting
semaphore. */
( pxTCB->ulNotifiedValue )++;
traceTASK_NOTIFY_GIVE_FROM_ISR();
/* If the task is in the blocked state specifically to wait for a
notification then unblock it now. */