mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-17 02:07:48 -04:00
Remove coroutines (#874)
* Remove co-routine centric CORTEX_LM3S102_Rowley demos. Remove CORTEX_LM3S102_Rowley Demo2 and Demo3. Update Demo1 to no longer use coroutines. * Remove co-routines from MB91460_Softune demo * FreeRTOS_96348hs_SK16FX100PMC: Remove co-routine usage. Remove co-routine usage from FreeRTOS_96348hs_SK16FX100PMC demo. * MB96350_Softune_Dice_Kit: Remove co-routine usage Remove co-routines usage from MB96350_Softune_Dice_Kit demo * AVR_Dx_IAR: Remove co-routine usage * AVR_Dx_Atmel_Studio: Remove co-routine usage * PIC24_MPLAB: Remove autogenerated files and add to .gitignore * PIC24_MPLAB: Remove co-routine usage from demo * AVR_ATMega323_IAR: Remove co-routine usage * ColdFire_MCF52221_CodeWarrior: Remove coroutine usage * AVR_ATMega4809_MPLAB.X: Remove co-routine usage * AVR_ATMega4809_IAR: Remove co-routine usage * AVR_ATMega4809_Atmel_Studio: Remove coroutine usage * AVR_ATMega323_WinAVR: Remove coroutine usage * AVR_Dx_MPLAB.X: Remove coroutine usage * dsPIC_MPLAB: Remove coroutine usage * CORTEX_LM3S102_GCC: Remove coroutines and coroutine centric demos * CORTEX_LM3S102_GCC: Update makefile to discard unused symbols Allows fitting in the limited ram/flash for this part. * CORTEX_LM3S316_IAR: Remove coroutines * Demos: Remove references to crflash.c, crhook.c, crflash.h, crhook.h * Remove coroutine options from FreeRTOSConfig.h files * Xilinx: Remove backup file generated by revup utility * Demos: Remove Coroutine related config items and references * Format CBMC FreeRTOSConfig.h * Update URL from aws.amazon.com/freertos to github.com/FreeRTOS * Fix copyright year and license text * Fix license text in demo files * Update header check excluded path list * Add configBENCHMARK to lexicon
This commit is contained in:
parent
eb7fd55a49
commit
569c78fd8c
1153 changed files with 4875 additions and 12450 deletions
|
@ -20,7 +20,7 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -28,32 +28,32 @@
|
|||
/*
|
||||
*
|
||||
* vMain() is effectively the demo application entry point. It is called by
|
||||
* the main() function generated by the Processor Expert application.
|
||||
* the main() function generated by the Processor Expert application.
|
||||
*
|
||||
* vMain() creates all the demo application tasks, then starts the scheduler.
|
||||
* The WEB documentation provides more details of the demo application tasks.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task (other than the "flash" tasks) maintains a unique count that is
|
||||
* incremented each time the task successfully completes its function. Should
|
||||
* any error occur within such a task the count is permanently halted. The
|
||||
* Each task (other than the "flash" tasks) maintains a unique count that is
|
||||
* incremented each time the task successfully completes its function. Should
|
||||
* any error occur within such a task the count is permanently halted. The
|
||||
* check task inspects the count of each task to ensure it has changed since
|
||||
* the last time the check task executed. If all the count variables have
|
||||
* the last time the check task executed. If all the count variables have
|
||||
* changed all the tasks are still executing error free, and the check task
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||
*
|
||||
* This file also includes the functionality normally implemented within the
|
||||
* standard demo application file integer.c. Due to the limited memory
|
||||
* This file also includes the functionality normally implemented within the
|
||||
* standard demo application file integer.c. Due to the limited memory
|
||||
* available on the microcontroller the functionality has been included within
|
||||
* the idle task hook [vApplicationIdleHook()] - instead of within the usual
|
||||
* separate task. See the documentation within integer.c for the rationale
|
||||
* separate task. See the documentation within integer.c for the rationale
|
||||
* of the integer task functionality.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* The demo applications included with other FreeRTOS ports make use of the
|
||||
* standard ComTest tasks. These use a loopback connector to transmit and
|
||||
* receive RS232 characters between two tasks. The test is important for two
|
||||
|
@ -66,21 +66,21 @@
|
|||
*
|
||||
* The demo board used to develop this port does not include an RS232 interface
|
||||
* so the ComTest tasks could not easily be included. Instead these two tests
|
||||
* are created using a 'Button Push' task.
|
||||
*
|
||||
* are created using a 'Button Push' task.
|
||||
*
|
||||
* The 'Button Push' task blocks on a queue, waiting for data to arrive. A
|
||||
* simple interrupt routine connected to the PP0 input on the demo board places
|
||||
* data in the queue each time the PP0 button is pushed (this button is built
|
||||
* onto the demo board). As the 'Button Push' task is created with a
|
||||
* data in the queue each time the PP0 button is pushed (this button is built
|
||||
* onto the demo board). As the 'Button Push' task is created with a
|
||||
* relatively high priority it will unblock and want to execute as soon as data
|
||||
* arrives in the queue - resulting in a context switch within the PP0 input
|
||||
* ISR. If the data retrieved from the queue is that expected the 'Button Push'
|
||||
* task toggles LED 5. Therefore correct operation is indicated by the LED
|
||||
* toggling each time the PP0 button is pressed.
|
||||
*
|
||||
* This test is not as satisfactory as the ComTest method - but the simple
|
||||
* This test is not as satisfactory as the ComTest method - but the simple
|
||||
* nature of the port makes is just about adequate.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* Kernel includes. */
|
||||
|
@ -109,7 +109,7 @@
|
|||
|
||||
/* LED that is toggled by the check task. The check task periodically checks
|
||||
that all the other tasks are operating without error. If no errors are found
|
||||
the LED is toggled with mainCHECK_PERIOD frequency. If an error is found
|
||||
the LED is toggled with mainCHECK_PERIOD frequency. If an error is found
|
||||
then the toggle rate increases to mainERROR_CHECK_PERIOD. */
|
||||
#define mainCHECK_TASK_LED ( 7 )
|
||||
#define mainCHECK_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )
|
||||
|
@ -165,14 +165,14 @@ their status. If an error is detected in one of the locally defined tasks then
|
|||
this flag is set to pdTRUE. */
|
||||
portBASE_TYPE xLocalError = pdFALSE;
|
||||
|
||||
/* The queue used to send data from the button push ISR to the Button Push
|
||||
/* The queue used to send data from the button push ISR to the Button Push
|
||||
task. */
|
||||
static QueueHandle_t xButtonQueue;
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* This is called from the main() function generated by the Processor Expert.
|
||||
*/
|
||||
void vMain( void )
|
||||
|
@ -181,15 +181,15 @@ void vMain( void )
|
|||
vStartLEDFlashTasks( mainFLASH_PRIORITY );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
|
||||
|
||||
/* Start the locally defined tasks. There is also a task implemented as
|
||||
the idle hook. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vButtonTask, "Button", configMINIMAL_STACK_SIZE, NULL, mainBUTTON_TASK_PRIORITY, NULL );
|
||||
|
||||
|
||||
/* All the tasks have been created - start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
|
||||
/* Should not reach here! */
|
||||
for( ;; );
|
||||
}
|
||||
|
@ -206,11 +206,11 @@ TickType_t xLastWakeTime;
|
|||
|
||||
for( ;; )
|
||||
{
|
||||
/* Delay until it is time to execute again. The delay period is
|
||||
/* Delay until it is time to execute again. The delay period is
|
||||
shorter following an error. */
|
||||
vTaskDelayUntil( &xLastWakeTime, xDelayPeriod );
|
||||
|
||||
/* Check all the demo application tasks are executing without
|
||||
/* Check all the demo application tasks are executing without
|
||||
error. If an error is found the delay period is shortened - this
|
||||
has the effect of increasing the flash rate of the 'check' task
|
||||
LED. */
|
||||
|
@ -280,7 +280,7 @@ volatile long lValue;
|
|||
{
|
||||
taskYIELD();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -296,11 +296,11 @@ unsigned portBASE_TYPE uxExpected = 1, uxReceived;
|
|||
{
|
||||
/* Now the queue is created it is safe to enable the button interrupt. */
|
||||
ButtonInterrupt_Enable();
|
||||
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Simply wait for data to arrive from the button push interrupt. */
|
||||
if( xQueueReceive( xButtonQueue, &uxReceived, portMAX_DELAY ) == pdPASS )
|
||||
if( xQueueReceive( xButtonQueue, &uxReceived, portMAX_DELAY ) == pdPASS )
|
||||
{
|
||||
/* Was the data we received that expected? */
|
||||
if( uxReceived != uxExpected )
|
||||
|
@ -308,21 +308,21 @@ unsigned portBASE_TYPE uxExpected = 1, uxReceived;
|
|||
/* Error! */
|
||||
portENTER_CRITICAL();
|
||||
xLocalError = pdTRUE;
|
||||
portEXIT_CRITICAL();
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Toggle the LED for every successful push. */
|
||||
vParTestToggleLED( mainBUTTON_PUSH_LED );
|
||||
vParTestToggleLED( mainBUTTON_PUSH_LED );
|
||||
}
|
||||
|
||||
|
||||
uxExpected++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Will only get here if the queue could not be created. */
|
||||
for( ;; );
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -335,9 +335,9 @@ unsigned portBASE_TYPE uxExpected = 1, uxReceived;
|
|||
static unsigned long xHigherPriorityTaskWoken;
|
||||
|
||||
xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
|
||||
/* Send an incrementing value to the button push task each run. */
|
||||
uxValToSend++;
|
||||
uxValToSend++;
|
||||
|
||||
/* Clear the interrupt flag. */
|
||||
PIFP = 1;
|
||||
|
@ -352,10 +352,10 @@ unsigned portBASE_TYPE uxExpected = 1, uxReceived;
|
|||
{
|
||||
/* NOTE: This macro can only be used if there are no local
|
||||
variables defined. This function uses a static variable so it's
|
||||
use is permitted. If the variable were not static portYIELD()
|
||||
use is permitted. If the variable were not static portYIELD()
|
||||
would have to be used in it's place. */
|
||||
portTASK_SWITCH_FROM_ISR();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma CODE_SEG DEFAULT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue