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:
Paul Bartell 2022-11-21 20:59:53 -08:00 committed by GitHub
parent eb7fd55a49
commit 569c78fd8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1153 changed files with 4875 additions and 12450 deletions

View file

@ -508,9 +508,6 @@
<Compile Include="src\asf\sam\utils\cmsis\sam4s\source\templates\system_sam4s.c">
<SubType>compile</SubType>
</Compile>
<Compile Include="src\asf\thirdparty\FreeRTOS\include\croutine.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="src\asf\thirdparty\FreeRTOS\include\FreeRTOS.h">
<SubType>compile</SubType>
</Compile>

View file

@ -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
*
*/

View file

@ -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
*
*/
@ -30,58 +30,58 @@
typedef void * xComPortHandle;
typedef enum
{
serCOM1,
serCOM2,
serCOM3,
serCOM4,
serCOM5,
serCOM6,
serCOM7,
serCOM8
{
serCOM1,
serCOM2,
serCOM3,
serCOM4,
serCOM5,
serCOM6,
serCOM7,
serCOM8
} eCOMPort;
typedef enum
{
serNO_PARITY,
serODD_PARITY,
serEVEN_PARITY,
serMARK_PARITY,
serSPACE_PARITY
typedef enum
{
serNO_PARITY,
serODD_PARITY,
serEVEN_PARITY,
serMARK_PARITY,
serSPACE_PARITY
} eParity;
typedef enum
{
serSTOP_1,
serSTOP_2
typedef enum
{
serSTOP_1,
serSTOP_2
} eStopBits;
typedef enum
{
serBITS_5,
serBITS_6,
serBITS_7,
serBITS_8
typedef enum
{
serBITS_5,
serBITS_6,
serBITS_7,
serBITS_8
} eDataBits;
typedef enum
{
ser50,
ser75,
ser110,
ser134,
ser150,
typedef enum
{
ser50,
ser75,
ser110,
ser134,
ser150,
ser200,
ser300,
ser600,
ser1200,
ser1800,
ser2400,
ser300,
ser600,
ser1200,
ser1800,
ser2400,
ser4800,
ser9600,
ser19200,
ser38400,
ser57600,
ser9600,
ser19200,
ser38400,
ser57600,
ser115200
} eBaud;

View file

@ -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
*
*/
@ -73,9 +73,6 @@ extern uint32_t SystemCoreClock;
#define configUSE_QUEUE_SETS 1
#define configGENERATE_RUN_TIME_STATS 0
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Software timer definitions. */
#define configUSE_TIMERS 1

View file

@ -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
*
*/
@ -91,22 +91,22 @@ uint32_t ulInputFrequency;
ulInputFrequency = configCPU_CLOCK_HZ;
ulInputFrequency /= trmDIVIDER;
/* Three channels are used - two that run at or under
/* Three channels are used - two that run at or under
configMAX_SYSCALL_INTERRUPT_PRIORITY, and one that runs over
configMAX_SYSCALL_INTERRUPT_PRIORITY. */
sysclk_enable_peripheral_clock( ID_TC0 );
sysclk_enable_peripheral_clock( ID_TC1 );
sysclk_enable_peripheral_clock( ID_TC2 );
/* Init TC channels to waveform mode - up mode clean on RC match. */
tc_init( TC0, tmrTIMER_0_CHANNEL, TC_CMR_TCCLKS_TIMER_CLOCK4 | TC_CMR_WAVE | TC_CMR_ACPC_CLEAR | TC_CMR_CPCTRG );
tc_init( TC0, tmrTIMER_1_CHANNEL, TC_CMR_TCCLKS_TIMER_CLOCK4 | TC_CMR_WAVE | TC_CMR_ACPC_CLEAR | TC_CMR_CPCTRG );
tc_init( TC0, tmrTIMER_2_CHANNEL, TC_CMR_TCCLKS_TIMER_CLOCK4 | TC_CMR_WAVE | TC_CMR_ACPC_CLEAR | TC_CMR_CPCTRG );
tc_enable_interrupt( TC0, tmrTIMER_0_CHANNEL, tmrTRIGGER_ON_RC );
tc_enable_interrupt( TC0, tmrTIMER_1_CHANNEL, tmrTRIGGER_ON_RC );
tc_enable_interrupt( TC0, tmrTIMER_2_CHANNEL, tmrTRIGGER_ON_RC );
tc_write_rc( TC0, tmrTIMER_0_CHANNEL, ( ulInputFrequency / tmrTIMER_0_FREQUENCY ) );
tc_write_rc( TC0, tmrTIMER_1_CHANNEL, ( ulInputFrequency / tmrTIMER_1_FREQUENCY ) );
tc_write_rc( TC0, tmrTIMER_2_CHANNEL, ( ulInputFrequency / tmrTIMER_2_FREQUENCY ) );
@ -131,7 +131,7 @@ void TC0_Handler( void )
caused by a compare on RC? */
if( ( tc_get_status( TC0, tmrTIMER_0_CHANNEL ) & ~TC_SR_CPCS ) != 0 )
{
portYIELD_FROM_ISR( xFirstTimerHandler() );
portYIELD_FROM_ISR( xFirstTimerHandler() );
}
}
/*-----------------------------------------------------------*/

View file

@ -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
*
*/

View file

@ -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
*
*/
@ -50,7 +50,7 @@ the power LED. */
#define partstsINVERTED_LED ( 0UL )
/* The index of the pins to which the LEDs are connected. The ordering of the
LEDs in this array is intentional and matches the order they appear on the
LEDs in this array is intentional and matches the order they appear on the
hardware. */
static const uint32_t ulLED[] = { LED2_GPIO, LED0_GPIO, LED1_GPIO };
@ -70,14 +70,14 @@ unsigned long ul;
/*-----------------------------------------------------------*/
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
{
if( uxLED < partestNUM_LEDS )
{
if( uxLED == partstsINVERTED_LED )
{
xValue = !xValue;
xValue = !xValue;
}
if( xValue != pdFALSE )
{
/* Turn the LED on. */
@ -105,12 +105,12 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
if( uxLED < partestNUM_LEDS )
{
taskENTER_CRITICAL();
{
{
gpio_toggle_pin( ulLED[ uxLED ] );
}
taskEXIT_CRITICAL();
taskEXIT_CRITICAL();
}
}

View file

@ -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
*
*/
@ -141,11 +141,11 @@ void vApplicationIdleHook( void )
important that vApplicationIdleHook() is permitted to return to its calling
function, because it is the responsibility of the idle task to clean up
memory allocated by the kernel to any task that has since been deleted. */
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 )
{
extern void vFullDemoIdleHook( void );
vFullDemoIdleHook();
}
#endif /* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY */
@ -176,7 +176,7 @@ void vApplicationTickHook( void )
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 )
{
extern void vFullDemoTickHook( void );
vFullDemoTickHook();
}
#endif /* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY */

View file

@ -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
*
*/

View file

@ -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
*
*/
@ -260,27 +260,27 @@ unsigned long ulErrorFound = pdFALSE;
{
ulErrorFound |= 1UL << 11UL;
}
if( xAreTaskNotificationTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 12UL;
}
if( xAreTimerDemoTasksStillRunning( mainCHECK_TIMER_PERIOD_MS ) != pdTRUE )
{
ulErrorFound |= 1UL << 13UL;
}
if( xAreEventGroupTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 14UL;
}
if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
{
ulErrorFound |= 1UL << 15UL;
}
/* Toggle the check LED to give an indication of the system status. If
the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then
@ -309,10 +309,10 @@ unsigned long ulErrorFound = pdFALSE;
void vFullDemoIdleHook( void )
{
static TimerHandle_t xCheckTimer = NULL;
if( xCheckTimer == NULL )
{
/* Create the software timer that performs the 'check'
/* Create the software timer that performs the 'check'
functionality, in the full demo. This is not done before the
scheduler is started as to do so would prevent the standard demo
timer tasks from passing their tests (they expect the timer
@ -328,7 +328,7 @@ static TimerHandle_t xCheckTimer = NULL;
{
xTimerStart( xCheckTimer, mainDONT_BLOCK );
}
/* Also start some timers that just flash LEDs. */
vStartLEDFlashTimers( mainNUMBER_OF_FLASH_TIMERS_LEDS );
}
@ -339,16 +339,16 @@ void vFullDemoTickHook( void )
{
/* In this case the tick hook is used as part of the queue set test. */
vQueueSetAccessQueueSetFromISR();
/* Use task notifications from an interrupt. */
xNotifyTaskFromISR();
/* Use timers from an interrupt. */
vTimerPeriodicISRTests();
/* Use event groups from an interrupt. */
vPeriodicEventGroupsProcessing();
/* Use mutexes from interrupts. */
vInterruptSemaphorePeriodicTest();
}

View file

@ -20,19 +20,19 @@
* 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
*
*/
/*
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART1.
***Note*** This example uses queues to send each character into an interrupt
service routine and out of an interrupt service routine individually. This
is done to demonstrate queues being used in an interrupt, and to deliberately
load the system to test the FreeRTOS port. It is *NOT* meant to be an
load the system to test the FreeRTOS port. It is *NOT* meant to be an
example of an efficient implementation. An efficient implementation should
use FIFO's or DMA if available, and only use FreeRTOS API functions when
use FIFO's or DMA if available, and only use FreeRTOS API functions when
enough has been received to warrant a task being unblocked to process the
data.
*/
@ -78,20 +78,20 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port
{
uint32_t ulChar;
xComPortHandle xReturn;
const sam_usart_opt_t xUSARTSettings =
const sam_usart_opt_t xUSARTSettings =
{
ulWantedBaud,
US_MR_CHRL_8_BIT,
US_MR_PAR_NO,
US_MR_NBSTOP_1_BIT,
US_MR_CHMODE_NORMAL,
US_MR_CHMODE_NORMAL,
0 /* Only used in IrDA mode. */
};
/* Create the queues used to hold Rx/Tx characters. */
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
/* If the queues were created correctly then setup the serial port
hardware. */
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
@ -108,10 +108,10 @@ const sam_usart_opt_t xUSARTSettings =
/* Enable the receiver and transmitter. */
usart_enable_tx( serUSART_PORT );
usart_enable_rx( serUSART_PORT );
/* Clear any characters before enabling interrupt. */
usart_getchar( serUSART_PORT, &ulChar );
/* Enable Rx end interrupt. */
usart_enable_interrupt( serUSART_PORT, US_IER_RXRDY );
@ -165,7 +165,7 @@ signed char *pxNext;
/* Send each character in the string, one at a time. */
pxNext = ( signed char * ) pcString;
while( *pxNext )
{
{
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
pxNext++;
}
@ -200,12 +200,12 @@ void vSerialClose( xComPortHandle xPort )
}
/*-----------------------------------------------------------*/
/*
* It should be noted that the com test tasks (which use make use of this file)
* are included to demonstrate queues being used to communicate between tasks
* and interrupts, and to demonstrate a context switch being performed from
* inside an interrupt service routine. The serial driver used here is *not*
* intended to represent an efficient implementation. Real applications should
/*
* It should be noted that the com test tasks (which use make use of this file)
* are included to demonstrate queues being used to communicate between tasks
* and interrupts, and to demonstrate a context switch being performed from
* inside an interrupt service routine. The serial driver used here is *not*
* intended to represent an efficient implementation. Real applications should
* make use of the USARTS peripheral DMA channel (PDC).
*/
void USART1_Handler( void )
@ -221,7 +221,7 @@ uint32_t ulUSARTStatus, ulUSARTMask;
if( ( ulUSARTStatus & US_CSR_TXRDY ) != 0UL )
{
/* The interrupt was caused by the TX register becoming empty. Are
/* The interrupt was caused by the TX register becoming empty. Are
there any more characters to transmit? */
if( xQueueReceiveFromISR( xCharsForTx, &ucChar, &xHigherPriorityTaskWoken ) == pdTRUE )
{
@ -231,10 +231,10 @@ uint32_t ulUSARTStatus, ulUSARTMask;
}
else
{
usart_disable_interrupt( serUSART_PORT, US_IER_TXRDY );
}
usart_disable_interrupt( serUSART_PORT, US_IER_TXRDY );
}
}
if( ( ulUSARTStatus & US_CSR_RXRDY ) != 0UL )
{
/* A character has been received on the USART, send it to the Rx
@ -242,13 +242,13 @@ uint32_t ulUSARTStatus, ulUSARTMask;
usart_getchar( serUSART_PORT, &ulChar );
ucChar = ( uint8_t ) ( ulChar & 0xffUL );
xQueueSendFromISR( xRxedChars, &ucChar, &xHigherPriorityTaskWoken );
}
}
/* If sending or receiving from a queue has caused a task to unblock, and
the unblocked task has a priority equal to or higher than the currently
running task (the task this ISR interrupted), then xHigherPriorityTaskWoken
will have automatically been set to pdTRUE within the queue send or receive
function. portEND_SWITCHING_ISR() will then ensure that this ISR returns
the unblocked task has a priority equal to or higher than the currently
running task (the task this ISR interrupted), then xHigherPriorityTaskWoken
will have automatically been set to pdTRUE within the queue send or receive
function. portEND_SWITCHING_ISR() will then ensure that this ISR returns
directly to the higher priority unblocked task. */
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
}
@ -257,4 +257,4 @@ uint32_t ulUSARTStatus, ulUSARTMask;