Minor updates to the MSP430X CCS4 and IAR port layers.

Change the sprintf() in prvGenerateRunTimeStatsForTasksInList() to accept unsigned long instead of unsigned int parameters so it works on 16bit devices too.
This commit is contained in:
Richard Barry 2011-01-02 18:35:52 +00:00
parent 1b96233cf1
commit 4059be7918
4 changed files with 5 additions and 6 deletions

View file

@ -171,7 +171,7 @@ void vPortSetupTimerInterrupt( void )
}
/*-----------------------------------------------------------*/
#pragma vector=configTICK_INTERRUPT_VECTOR
#pragma vector=configTICK_VECTOR
interrupt void vTickISREntry( void )
{
extern void vPortTickISR( void );

View file

@ -127,7 +127,6 @@ vPortCooperativeTickISR:
portSAVE_CONTEXT
calla #vTaskIncrementTick
calla #vTaskSwitchContext
portRESTORE_CONTEXT
;-----------------------------------------------------------

View file

@ -171,7 +171,7 @@ void vPortSetupTimerInterrupt( void )
}
/*-----------------------------------------------------------*/
#pragma vector=configTICK_INTERRUPT_VECTOR
#pragma vector=configTICK_VECTOR
__interrupt void vTickISREntry( void )
{
extern void vPortTickISR( void );

View file

@ -1068,7 +1068,7 @@ portBASE_TYPE xReturn;
macro must be defined to configure the timer/counter used to generate
the run time counter time base. */
portCONFIGURE_TIMER_FOR_RUN_TIME_STATS();
/* Setting up the timer tick is hardware specific and thus in the
portable interface. */
if( xPortStartScheduler() )
@ -2128,13 +2128,13 @@ tskTCB *pxNewTCB;
if( ulStatsAsPercentage > 0UL )
{
sprintf( pcStatsString, ( char * ) "%s\t\t%u\t\t%u%%\r\n", pxNextTCB->pcTaskName, ( unsigned int ) pxNextTCB->ulRunTimeCounter, ( unsigned int ) ulStatsAsPercentage );
sprintf( pcStatsString, ( char * ) "%s\t\t%lu\t\t%lu%%\r\n", pxNextTCB->pcTaskName, pxNextTCB->ulRunTimeCounter, ulStatsAsPercentage );
}
else
{
/* If the percentage is zero here then the task has
consumed less than 1% of the total run time. */
sprintf( pcStatsString, ( char * ) "%s\t\t%u\t\t<1%%\r\n", pxNextTCB->pcTaskName, ( unsigned int ) pxNextTCB->ulRunTimeCounter );
sprintf( pcStatsString, ( char * ) "%s\t\t%lu\t\t<1%%\r\n", pxNextTCB->pcTaskName, pxNextTCB->ulRunTimeCounter );
}
}