From eb5d29689b641c2490052cadeb157cc834207f0d Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 2 Jan 2011 18:35:52 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1213 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/CCS4/MSP430X/port.c | 2 +- Source/portable/CCS4/MSP430X/portext.asm | 1 - Source/portable/IAR/MSP430X/port.c | 2 +- Source/tasks.c | 6 +++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/portable/CCS4/MSP430X/port.c b/Source/portable/CCS4/MSP430X/port.c index fa5e9300f..73af84f96 100644 --- a/Source/portable/CCS4/MSP430X/port.c +++ b/Source/portable/CCS4/MSP430X/port.c @@ -171,7 +171,7 @@ void vPortSetupTimerInterrupt( void ) } /*-----------------------------------------------------------*/ -#pragma vector=configTICK_INTERRUPT_VECTOR +#pragma vector=configTICK_VECTOR interrupt void vTickISREntry( void ) { extern void vPortTickISR( void ); diff --git a/Source/portable/CCS4/MSP430X/portext.asm b/Source/portable/CCS4/MSP430X/portext.asm index 97c69b65e..44ff501f2 100644 --- a/Source/portable/CCS4/MSP430X/portext.asm +++ b/Source/portable/CCS4/MSP430X/portext.asm @@ -127,7 +127,6 @@ vPortCooperativeTickISR: portSAVE_CONTEXT calla #vTaskIncrementTick - calla #vTaskSwitchContext portRESTORE_CONTEXT ;----------------------------------------------------------- diff --git a/Source/portable/IAR/MSP430X/port.c b/Source/portable/IAR/MSP430X/port.c index 65d0179fc..3020ff3c0 100644 --- a/Source/portable/IAR/MSP430X/port.c +++ b/Source/portable/IAR/MSP430X/port.c @@ -171,7 +171,7 @@ void vPortSetupTimerInterrupt( void ) } /*-----------------------------------------------------------*/ -#pragma vector=configTICK_INTERRUPT_VECTOR +#pragma vector=configTICK_VECTOR __interrupt void vTickISREntry( void ) { extern void vPortTickISR( void ); diff --git a/Source/tasks.c b/Source/tasks.c index 7fa375d0f..a39200b96 100644 --- a/Source/tasks.c +++ b/Source/tasks.c @@ -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 ); } } -- 2.39.5