mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-05-12 19:52:55 -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
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202112.00
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
@ -10,8 +10,7 @@
|
|||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software. If you wish to use our Amazon
|
||||
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
|
|
@ -21,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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -40,18 +39,18 @@
|
|||
/*
|
||||
* Timer instance | Value
|
||||
* ----------------|---------
|
||||
* TCB0 | 0
|
||||
* TCB1 | 1
|
||||
* TCB2 | 2
|
||||
* TCB0 | 0
|
||||
* TCB1 | 1
|
||||
* TCB2 | 2
|
||||
* TCB3 | 3
|
||||
* RTC | 4
|
||||
* RTC | 4
|
||||
*/
|
||||
|
||||
#define configUSE_TIMER_INSTANCE 0
|
||||
#define configUSE_PREEMPTION 1
|
||||
|
||||
/* NOTE: You can choose the following clock frequencies (Hz):
|
||||
20000000, 10000000, 5000000, 2000000.
|
||||
20000000, 10000000, 5000000, 2000000.
|
||||
For other frequency values, update clock_config.h with your own settings. */
|
||||
#define configCPU_CLOCK_HZ 10000000
|
||||
|
||||
|
|
@ -90,10 +89,6 @@ For other frequency values, update clock_config.h with your own settings. */
|
|||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
||||
|
||||
/* Co-routine related definitions. */
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES 2
|
||||
|
||||
/* Software timer related definitions. */
|
||||
#define configUSE_TIMERS 1
|
||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -155,10 +155,6 @@
|
|||
<Compile Include="main.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="..\..\..\Source\croutine.c">
|
||||
<SubType>compile</SubType>
|
||||
<Link>Source\croutine.c</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\..\Source\event_groups.c">
|
||||
<SubType>compile</SubType>
|
||||
<Link>Source\event_groups.c</Link>
|
||||
|
|
@ -203,10 +199,6 @@
|
|||
<SubType>compile</SubType>
|
||||
<Link>Source\include\atomic.h</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\..\Source\include\croutine.h">
|
||||
<SubType>compile</SubType>
|
||||
<Link>Source\include\croutine.h</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\..\Source\include\deprecated_definitions.h">
|
||||
<SubType>compile</SubType>
|
||||
<Link>Source\include\deprecated_definitions.h</Link>
|
||||
|
|
@ -312,14 +304,6 @@
|
|||
<SubType>compile</SubType>
|
||||
<Link>Common\Minimal\PollQ.c</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\..\Demo\Common\include\crflash.h">
|
||||
<SubType>compile</SubType>
|
||||
<Link>Common\include\crflash.h</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\..\Demo\Common\Minimal\crflash.c">
|
||||
<SubType>compile</SubType>
|
||||
<Link>Common\Minimal\crflash.c</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\..\Demo\Common\include\recmutex.h">
|
||||
<SubType>compile</SubType>
|
||||
<Link>Common\include\recmutex.h</Link>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ void main_blinky( void )
|
|||
{
|
||||
/* Create the queue. */
|
||||
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
||||
|
||||
|
||||
if( xQueue != NULL )
|
||||
{
|
||||
/* Start the two tasks as described in the comments at the top of this
|
||||
|
|
|
|||
|
|
@ -1,13 +1,37 @@
|
|||
/*
|
||||
* FreeRTOS V202112.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr/eeprom.h>
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "croutine.h"
|
||||
#include "PollQ.h"
|
||||
#include "integer.h"
|
||||
#include "serial.h"
|
||||
#include "comtest.h"
|
||||
#include "crflash.h"
|
||||
#include "partest.h"
|
||||
#include "regtest.h"
|
||||
|
||||
|
|
@ -37,9 +61,6 @@ again. */
|
|||
the demo application is not unexpectedly resetting. */
|
||||
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
||||
|
||||
/* The number of coroutines to create. */
|
||||
#define mainNUM_FLASH_COROUTINES ( 3 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
*/
|
||||
|
|
@ -66,13 +87,10 @@ void main_minimal( void )
|
|||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartRegTestTasks();
|
||||
|
||||
|
||||
/* Create the tasks defined within this file. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Create the co-routines that flash the LED's. */
|
||||
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
|
||||
|
||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||
configUSE_PREEMPTION as 0. */
|
||||
|
|
@ -84,7 +102,7 @@ void init_minimal( void )
|
|||
/* Configure UART pins: PB0 Rx, PB1 Tx */
|
||||
PORTB.DIR &= ~PIN1_bm;
|
||||
PORTB.DIR |= PIN0_bm;
|
||||
|
||||
|
||||
vParTestInitialise();
|
||||
}
|
||||
|
||||
|
|
@ -105,7 +123,7 @@ static volatile unsigned long ulDummyVariable = 3UL;
|
|||
integer tasks get some exercise. The result here is not important -
|
||||
see the demo application documentation for more info. */
|
||||
ulDummyVariable *= 3;
|
||||
|
||||
|
||||
prvCheckOtherTasksAreStillRunning();
|
||||
}
|
||||
}
|
||||
|
|
@ -134,7 +152,7 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
|||
{
|
||||
xErrorHasOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
|
||||
if( xErrorHasOccurred == pdFALSE )
|
||||
{
|
||||
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
||||
|
|
@ -156,5 +174,4 @@ unsigned char ucResetCount;
|
|||
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
vCoRoutineSchedule();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ portBASE_TYPE xReturn;
|
|||
{
|
||||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue