From: RichardBarry Date: Sat, 7 Feb 2009 18:20:32 +0000 (+0000) Subject: Continued development on NEC ports. X-Git-Tag: V5.1.2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6780b130bfca3a939983d544222da45de7a5ee3b;p=freertos Continued development on NEC ports. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@693 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h b/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h index 03a726b88..385133be8 100644 --- a/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h +++ b/Demo/NEC_78K0R_IAR/FreeRTOSConfig.h @@ -64,7 +64,7 @@ * * This setting must match the setting in the IAR project options. */ -#define configMEMORY_MODE 1 +#define configMEMORY_MODE 0 /* * Application specific definitions. @@ -135,7 +135,7 @@ #include #include - #define configTOTAL_HEAP_SIZE ( (size_t ) ( 2400 ) ) + #define configTOTAL_HEAP_SIZE ( (size_t ) ( 2500 ) ) #endif /* _IAR_78K0R_Kx3L__ */ diff --git a/Demo/NEC_78K0R_IAR/main.c b/Demo/NEC_78K0R_IAR/main.c index 7c2c2e465..4274a4e3c 100644 --- a/Demo/NEC_78K0R_IAR/main.c +++ b/Demo/NEC_78K0R_IAR/main.c @@ -168,9 +168,6 @@ short main( void ) /* First create the 'standard demo' tasks. These are used to demonstrate API functions being used and also to test the kernel port. More information is provided on the FreeRTOS.org WEB site. */ - vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); - vStartSemaphoreTasks(mainSEMTEST_PRIORITY); - vStartGenericQueueTasks( mainGEN_QUEUE_PRIORITY ); vStartDynamicPriorityTasks(); vCreateBlockTimeTasks(); @@ -184,6 +181,15 @@ short main( void ) /* Create the 'check' task as described at the top of this file. */ xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, ( void* )mainCHECK_PARAMETER_VALUE, mainCHECK_TASK_PRIORITY, NULL ); + #ifdef __IAR_78K0R_Kx3__ + { + /* The Kx3 has enough RAM to create more of the standard demo tasks. */ + vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); + vStartSemaphoreTasks(mainSEMTEST_PRIORITY); + vStartGenericQueueTasks( mainGEN_QUEUE_PRIORITY ); + } + #endif + /* Finally start the scheduler running. */ vTaskStartScheduler(); @@ -217,21 +223,6 @@ portTickType xToggleRate = mainNO_ERROR_TOGGLE_PERIOD, xLastWakeTime; /* Wait until it is time to check all the other tasks again. */ vTaskDelayUntil( &xLastWakeTime, xToggleRate ); - if( xAreGenericQueueTasksStillRunning() != pdTRUE ) - { - xToggleRate = mainERROR_TOGGLE_PERIOD; - } - - if( xArePollingQueuesStillRunning() != pdTRUE) - { - xToggleRate = mainERROR_TOGGLE_PERIOD; - } - - if( xAreSemaphoreTasksStillRunning() != pdTRUE) - { - xToggleRate = mainERROR_TOGGLE_PERIOD; - } - if( xAreDynamicPriorityTasksStillRunning() != pdTRUE ) { xToggleRate = mainERROR_TOGGLE_PERIOD; @@ -247,6 +238,26 @@ portTickType xToggleRate = mainNO_ERROR_TOGGLE_PERIOD, xLastWakeTime; xToggleRate = mainERROR_TOGGLE_PERIOD; } + #ifdef __IAR_78K0R_Kx3__ + { + /* Only the Kx3 runs all the tasks. */ + if( xArePollingQueuesStillRunning() != pdTRUE) + { + xToggleRate = mainERROR_TOGGLE_PERIOD; + } + + if( xAreSemaphoreTasksStillRunning() != pdTRUE) + { + xToggleRate = mainERROR_TOGGLE_PERIOD; + } + + if( xAreGenericQueueTasksStillRunning() != pdTRUE ) + { + xToggleRate = mainERROR_TOGGLE_PERIOD; + } + } + #endif + /* Toggle the LED. The toggle rate will depend on whether or not an error has been found in any tasks. */ mainLED_0 = !mainLED_0; diff --git a/Demo/NEC_78K0R_IAR/rtosdemo.ewd b/Demo/NEC_78K0R_IAR/rtosdemo.ewd index 602fa5b1a..db935ff25 100644 --- a/Demo/NEC_78K0R_IAR/rtosdemo.ewd +++ b/Demo/NEC_78K0R_IAR/rtosdemo.ewd @@ -297,7 +297,7 @@