Skip to content

Commit 1277ba1

Browse files
Revert "Remove coroutines (FreeRTOS#874)" (FreeRTOS#1019)
* Revert "Remove coroutines (FreeRTOS#874)" This reverts commit 569c78f. * 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>
1 parent 9ccae85 commit 1277ba1

File tree

605 files changed

+11240
-3628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

605 files changed

+11240
-3628
lines changed

.github/scripts/core_checker.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@
306306
'interrupt_vector.s',
307307
'reg_test.S',
308308
'gdbinit',
309-
310309
]
311310

312311
FREERTOS_HEADER = [
@@ -358,4 +357,3 @@ def main():
358357

359358
if __name__ == '__main__':
360359
exit(main())
361-

FreeRTOS/Demo/ARM7_AT91FR40008_GCC/FreeRTOSConfig.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* application requirements.
3939
*
4040
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
41-
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
41+
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
4242
*
4343
* See http://www.freertos.org/a00110.html
4444
*/
@@ -59,6 +59,9 @@
5959
#define configUSE_16_BIT_TICKS 0
6060
#define configIDLE_SHOULD_YIELD 1
6161

62+
/* Co-routine definitions. */
63+
#define configUSE_CO_ROUTINES 0
64+
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
6265

6366
/* Set the following definitions to 1 to include the API function, or zero
6467
to exclude the API function. */

FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ParTest/ParTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void vParTestInitialise( void )
6464
{
6565
/* This is performed from main() as the io bits are shared with other setup
6666
functions. Ensure the outputs are off to start. */
67-
ulLEDReg = partstALL_OUTPUTS_OFF;
67+
ulLEDReg = partstALL_OUTPUTS_OFF;
6868

6969
/* Enable clock to PIO... */
7070
AT91C_BASE_PS->PS_PCER = AT91C_PS_PIO;

FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serial.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
*
2525
*/
2626

27-
/*
28-
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
27+
/*
28+
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
2929
3030
This file contains all the serial port components that can be compiled to
3131
either ARM or THUMB mode. Components that must be compiled to ARM mode are
@@ -60,14 +60,14 @@
6060

6161
/* Queues used to hold received characters, and characters waiting to be
6262
transmitted. */
63-
static QueueHandle_t xRxedChars;
64-
static QueueHandle_t xCharsForTx;
63+
static QueueHandle_t xRxedChars;
64+
static QueueHandle_t xCharsForTx;
6565

6666
/*-----------------------------------------------------------*/
6767

68-
/*
68+
/*
6969
* The queues are created in serialISR.c as they are used from the ISR.
70-
* Obtain references to the queues and THRE Empty flag.
70+
* Obtain references to the queues and THRE Empty flag.
7171
*/
7272
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx );
7373

@@ -84,10 +84,10 @@ extern void ( vUART_ISR_Wrapper )( void );
8484
serialISR.c (which is always compiled to ARM mode. */
8585
vSerialISRCreateQueues( uxQueueLength, &xRxedChars, &xCharsForTx );
8686

87-
if(
88-
( xRxedChars != serINVALID_QUEUE ) &&
89-
( xCharsForTx != serINVALID_QUEUE ) &&
90-
( ulWantedBaud != ( unsigned long ) 0 )
87+
if(
88+
( xRxedChars != serINVALID_QUEUE ) &&
89+
( xCharsForTx != serINVALID_QUEUE ) &&
90+
( ulWantedBaud != ( unsigned long ) 0 )
9191
)
9292
{
9393
portENTER_CRITICAL();
@@ -109,10 +109,10 @@ extern void ( vUART_ISR_Wrapper )( void );
109109
AT91C_BASE_US0->US_TCR = 0;
110110

111111
/* Input clock to baud rate generator is MCK */
112-
ulSpeed = configCPU_CLOCK_HZ * 10;
112+
ulSpeed = configCPU_CLOCK_HZ * 10;
113113
ulSpeed = ulSpeed / 16;
114114
ulSpeed = ulSpeed / ulWantedBaud;
115-
115+
116116
/* compute the error */
117117
ulCD = ulSpeed / 10;
118118
if ((ulSpeed - (ulCD * 10)) >= 5)
@@ -131,10 +131,10 @@ extern void ( vUART_ISR_Wrapper )( void );
131131
132132
Store interrupt handler function address in USART0 vector register... */
133133
AT91C_BASE_AIC->AIC_SVR[ portUSART0_AIC_CHANNEL ] = (unsigned long)vUART_ISR_Wrapper;
134-
134+
135135
/* USART0 interrupt level-sensitive, priority 1... */
136136
AT91C_BASE_AIC->AIC_SMR[ portUSART0_AIC_CHANNEL ] = AIC_SRCTYPE_INT_LEVEL_SENSITIVE | 1;
137-
137+
138138
/* Clear some pending USART0 interrupts (just in case)... */
139139
AT91C_BASE_US0->US_CR = US_RSTSTA;
140140

FreeRTOS/Demo/ARM7_AT91FR40008_GCC/serial/serialISR.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
*/
2626

2727

28-
/*
29-
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
28+
/*
29+
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
3030
3131
This file contains all the serial port components that must be compiled
3232
to ARM mode. The components that can be compiled to either ARM or THUMB
@@ -61,16 +61,16 @@
6161

6262
/* Queues used to hold received characters, and characters waiting to be
6363
transmitted. */
64-
static QueueHandle_t xRxedChars;
65-
static QueueHandle_t xCharsForTx;
64+
static QueueHandle_t xRxedChars;
65+
static QueueHandle_t xCharsForTx;
6666

6767
/*-----------------------------------------------------------*/
6868

6969
/* UART0 interrupt service routine. This can cause a context switch so MUST
7070
be declared "naked". */
7171
void vUART_ISR_Wrapper( void ) __attribute__ ((naked));
7272

73-
/* The ISR function that actually performs the work. This must be separate
73+
/* The ISR function that actually performs the work. This must be separate
7474
from the wrapper to ensure the correct stack frame is set up. */
7575
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
7676

@@ -81,7 +81,7 @@ void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t
8181
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
8282
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
8383

84-
/* Pass back a reference to the queues so the serial API file can
84+
/* Pass back a reference to the queues so the serial API file can
8585
post/receive characters. */
8686
*pxRxedChars = xRxedChars;
8787
*pxCharsForTx = xCharsForTx;
@@ -93,7 +93,7 @@ void vUART_ISR_Wrapper( void )
9393
/* Save the context of the interrupted task. */
9494
portSAVE_CONTEXT();
9595

96-
/* Call the handler. This must be a separate function to ensure the
96+
/* Call the handler. This must be a separate function to ensure the
9797
stack frame is correctly set up. */
9898
__asm volatile( "bl vUART_ISR_Handler" );
9999

@@ -126,7 +126,7 @@ unsigned long ulStatus;
126126
{
127127
/* Queue empty, nothing to send so turn off the Tx interrupt. */
128128
AT91C_BASE_US0->US_IDR = US_TXRDY;
129-
}
129+
}
130130
}
131131

132132
if (ulStatus & US_RXRDY)

FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* application requirements.
3838
*
3939
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
40-
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
40+
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
4141
*
4242
* See http://www.freertos.org/a00110.html
4343
-----------------------------------------------------------*/
@@ -55,6 +55,9 @@
5555
#define configUSE_16_BIT_TICKS 0
5656
#define configIDLE_SHOULD_YIELD 1
5757

58+
/* Co-routine definitions. */
59+
#define configUSE_CO_ROUTINES 0
60+
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
5861

5962
/* Set the following definitions to 1 to include the API function, or zero
6063
to exclude the API function. */

FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
const unsigned long led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
3636

3737
void vParTestInitialise( void )
38-
{
38+
{
3939
/* Start with all LED's off. */
40-
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, LED_MASK );
40+
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, LED_MASK );
4141
}
4242
/*-----------------------------------------------------------*/
4343

@@ -67,7 +67,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
6767
}
6868
else
6969
{
70-
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, led_mask[ uxLED ] );
70+
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, led_mask[ uxLED ] );
7171
}
7272
}
7373
}

0 commit comments

Comments
 (0)