Revert "Remove coroutines (#874)" (#1019)

* Revert "Remove coroutines (#874)"

This reverts commit 569c78fd8c.

* Update freertos Kernel submodule to latest head

* Remove temporary files

* Fix MingW demos and spell check

* Fix manifest version; fix headers

* Add ignore files and paths to core-checker.py

* Fix copyright in remaining files

* Fix PR check build failure

1. Remove defining `inline` in Makefile. This was causing build
   warnings.
2. Ensure that the linker removed unused functions from various
   compilation units.
3. Update the linker script so that all the functions are correctly
   placed in FLASH section.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
Aniruddha Kanhere 2023-06-09 15:25:48 -07:00 committed by GitHub
parent 9ccae851e7
commit 1277ba1661
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
605 changed files with 11240 additions and 3628 deletions

View file

@ -27,10 +27,10 @@
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
/*
/*
* The following #error directive is to remind users that a batch file must be
* executed prior to this project being built. The batch file *cannot* be
* executed from within the IDE! Once it has been executed, re-open or refresh
* executed prior to this project being built. The batch file *cannot* be
* executed from within the IDE! Once it has been executed, re-open or refresh
* the Eclipse project and remove the #error line below.
*/
#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
@ -44,14 +44,14 @@
* application requirements.
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configCPU_CLOCK_HZ ( ( unsigned long ) SYS_CLK_FREQ )
#define configCPU_CLOCK_HZ ( ( unsigned long ) SYS_CLK_FREQ )
#define configMAX_PRIORITIES ( 5 )
#define configMINIMAL_STACK_SIZE ( 1024 )
#define configISR_STACK_SIZE configMINIMAL_STACK_SIZE
@ -66,6 +66,9 @@
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configQUEUE_REGISTRY_SIZE 0
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */

View file

@ -51,7 +51,7 @@ static unsigned long ulLedStates;
void vParTestInitialise( void )
{
IOWR_ALTERA_AVALON_PIO_DIRECTION( LED_PIO_BASE, ALTERA_AVALON_PIO_DIRECTION_OUTPUT );
ulLedStates = 0;
ulLedStates = 0;
}
/*-----------------------------------------------------------*/
@ -83,7 +83,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
taskENTER_CRITICAL();
{
vParTestSetLED( uxLED, !( ulLedStates & ( 1 << uxLED ) ) );
}
}
taskEXIT_CRITICAL();
}
}

View file

@ -24,7 +24,7 @@
*
*/
/* NOTE: This is just a test file and not intended to be a generic
/* NOTE: This is just a test file and not intended to be a generic
COM driver. */
#include "altera_avalon_uart.h"
@ -41,8 +41,8 @@ COM driver. */
#define serNO_BLOCK ( ( TickType_t ) 0 )
/*---------------------------------------------------------------------------*/
static QueueHandle_t xRxedChars;
static QueueHandle_t xCharsForTx;
static QueueHandle_t xRxedChars;
static QueueHandle_t xCharsForTx;
alt_u32 uartControl;
/*---------------------------------------------------------------------------*/
@ -64,8 +64,8 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port
portENTER_CRITICAL();
{
uartControl = ALTERA_AVALON_UART_CONTROL_RTS_MSK | ALTERA_AVALON_UART_CONTROL_RRDY_MSK | ALTERA_AVALON_UART_CONTROL_DCTS_MSK;
IOWR_ALTERA_AVALON_UART_CONTROL( UART_BASE, uartControl );
IOWR_ALTERA_AVALON_UART_CONTROL( UART_BASE, uartControl );
/* register the interrupt handler */
alt_irq_register ( UART_IRQ, NULL, vUARTInterruptHandler );
}
@ -114,12 +114,12 @@ signed portBASE_TYPE lReturn = pdPASS;
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) == pdPASS )
{
/*Triggers an interrupt on every character or (down) when queue is full. */
uartControl |= ALTERA_AVALON_UART_CONTROL_TRDY_MSK;
uartControl |= ALTERA_AVALON_UART_CONTROL_TRDY_MSK;
IOWR_ALTERA_AVALON_UART_CONTROL( UART_BASE, uartControl );
lReturn = pdPASS;
}
else
{
{
lReturn = pdFAIL;
}
return lReturn;
@ -153,19 +153,19 @@ static void vUARTInterruptHandler( void* context, alt_u32 id )
{
alt_u32 status;
/* Read the status register in order to determine the cause of the
/* Read the status register in order to determine the cause of the
interrupt. */
status = IORD_ALTERA_AVALON_UART_STATUS( UART_BASE );
/* Clear any error flags set at the device */
IOWR_ALTERA_AVALON_UART_STATUS( UART_BASE, 0 );
/* process a read irq */
if ( status & ALTERA_AVALON_UART_STATUS_RRDY_MSK )
{
vUARTReceiveHandler( status );
}
/* process a write irq */
if ( status & ( ALTERA_AVALON_UART_STATUS_TRDY_MSK ) )
{
@ -190,12 +190,12 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
cChar = IORD_ALTERA_AVALON_UART_RXDATA( UART_BASE );
if ( pdTRUE != xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken ) )
{
/* If the circular buffer was full, disable interrupts. Interrupts will
/* If the circular buffer was full, disable interrupts. Interrupts will
be re-enabled when data is removed from the buffer. */
uartControl &= ~ALTERA_AVALON_UART_CONTROL_RRDY_MSK;
IOWR_ALTERA_AVALON_UART_CONTROL( UART_BASE, uartControl );
}
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
}
/*---------------------------------------------------------------------------*/
@ -213,8 +213,8 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
{
uartControl &= ~ALTERA_AVALON_UART_CONTROL_TRDY_MSK;
}
IOWR_ALTERA_AVALON_UART_CONTROL( UART_BASE, uartControl );
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
}
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
}
/*---------------------------------------------------------------------------*/