From: RichardBarry Date: Mon, 26 Jan 2009 17:30:18 +0000 (+0000) Subject: More work in progress on NEC port and demo. X-Git-Tag: V5.1.2~70 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7425d684d92200a34fd41becece0d18de866ade8;p=freertos More work in progress on NEC port and demo. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@626 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/NEC_V850ES_Fx3_IAR/FreeRTOSConfig.h b/Demo/NEC_V850ES_Fx3_IAR/FreeRTOSConfig.h index dc8338112..14bc86b30 100644 --- a/Demo/NEC_V850ES_Fx3_IAR/FreeRTOSConfig.h +++ b/Demo/NEC_V850ES_Fx3_IAR/FreeRTOSConfig.h @@ -86,8 +86,8 @@ #define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 48000000 ) /* using the external clock source */ #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 64 ) -#define configTOTAL_HEAP_SIZE ( (size_t ) ( 20000 ) ) +#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 85 ) +#define configTOTAL_HEAP_SIZE ( (size_t ) ( 60000 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) #define configUSE_TRACE_FACILITY 0 #define configUSE_16_BIT_TICKS 0 diff --git a/Demo/NEC_V850ES_Fx3_IAR/main.c b/Demo/NEC_V850ES_Fx3_IAR/main.c index c6d5d2568..38a0864f3 100644 --- a/Demo/NEC_V850ES_Fx3_IAR/main.c +++ b/Demo/NEC_V850ES_Fx3_IAR/main.c @@ -81,6 +81,8 @@ #define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY ) #define mainCOMTEST_PRIORITY ( tskIDLE_PRIORITY + 1 ) +#define mainCHECK_PARAMETER ( ( void * ) 0x12345678 ) + /* The period between executions of the check task. */ #define mainNO_ERROR_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS ) #define mainERROR_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS ) @@ -129,10 +131,10 @@ void main( void ) vAltStartComTestTasks( mainCOMTEST_PRIORITY, mainBAUD_RATE, mainCOMTEST_LED ); /* Create the tasks defined within this file. */ - xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); + xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, mainCHECK_PARAMETER, mainCHECK_TASK_PRIORITY, NULL ); - xTaskCreate( vRegTest1, "Check", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); - xTaskCreate( vRegTest2, "Check", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether @@ -152,8 +154,11 @@ static void prvCheckTask( void *pvParameters ) { portTickType xDelayPeriod = mainNO_ERROR_DELAY, xLastWakeTime; - /* Just to remove the compiler warning. */ - ( void ) pvParameters; + /* Ensure parameter is passed in correctly. */ + if( pvParameters != mainCHECK_PARAMETER ) + { + xDelayPeriod = mainERROR_DELAY; + } xLastWakeTime = xTaskGetTickCount(); @@ -293,5 +298,3 @@ void vApplicationStackOverflowHook( void ) for( ;; ); } - - diff --git a/Demo/NEC_V850ES_Fx3_IAR/rtosdemo.ewp b/Demo/NEC_V850ES_Fx3_IAR/rtosdemo.ewp index 42db43982..4b1c1ff7e 100644 --- a/Demo/NEC_V850ES_Fx3_IAR/rtosdemo.ewp +++ b/Demo/NEC_V850ES_Fx3_IAR/rtosdemo.ewp @@ -481,6 +481,7 @@