CI-CD Updates (#768)

* Use new version of CI-CD Actions
* Use cSpell spell check, and use ubuntu-20.04 for formatting check
* Format and spell check all files in the portable directory
* Remove the https:// from #errors and #warnings as uncrustify attempts to change it to /*
* Use checkout@v3 instead of checkout@v2 on all jobs
---------
This commit is contained in:
Soren Ptak 2023-09-05 17:24:04 -04:00 committed by GitHub
parent d6bccb1f4c
commit 5fb9b50da8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
485 changed files with 108790 additions and 107581 deletions

View file

@ -27,8 +27,8 @@
*/
/*-----------------------------------------------------------
* Implementation of functions defined in portable.h for the NIOS2 port.
*----------------------------------------------------------*/
* Implementation of functions defined in portable.h for the NIOS2 port.
*----------------------------------------------------------*/
/* Standard Includes. */
#include <string.h>
@ -45,10 +45,13 @@
#include "task.h"
/* Interrupts are enabled. */
#define portINITIAL_ESTATUS ( StackType_t ) 0x01
#define portINITIAL_ESTATUS ( StackType_t ) 0x01
int _alt_ic_isr_register(alt_u32 ic_id, alt_u32 irq, alt_isr_func isr,
void *isr_context, void *flags);
int _alt_ic_isr_register( alt_u32 ic_id,
alt_u32 irq,
alt_isr_func isr,
void * isr_context,
void * flags );
/*-----------------------------------------------------------*/
/*
@ -59,23 +62,25 @@ static void prvSetupTimerInterrupt( void );
/*
* Call back for the alarm function.
*/
void vPortSysTickHandler( void * context);
void vPortSysTickHandler( void * context );
/*-----------------------------------------------------------*/
static void prvReadGp( uint32_t *ulValue )
static void prvReadGp( uint32_t * ulValue )
{
asm( "stw gp, (%0)" :: "r"(ulValue) );
asm ( "stw gp, (%0)" ::"r" ( ulValue ) );
}
/*-----------------------------------------------------------*/
/*
* See header file for description.
*/
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
TaskFunction_t pxCode,
void * pvParameters )
{
StackType_t *pxFramePointer = pxTopOfStack - 1;
StackType_t xGlobalPointer;
StackType_t * pxFramePointer = pxTopOfStack - 1;
StackType_t xGlobalPointer;
prvReadGp( &xGlobalPointer );
@ -114,12 +119,12 @@ StackType_t xGlobalPointer;
BaseType_t xPortStartScheduler( void )
{
/* Start the timer that generates the tick ISR. Interrupts are disabled
here already. */
* here already. */
prvSetupTimerInterrupt();
/* Start the first task. */
asm volatile ( " movia r2, restore_sp_from_pxCurrentTCB \n"
" jmp r2 " );
asm volatile ( " movia r2, restore_sp_from_pxCurrentTCB \n"
" jmp r2 " );
/* Should not get here! */
return 0;
@ -129,7 +134,7 @@ BaseType_t xPortStartScheduler( void )
void vPortEndScheduler( void )
{
/* It is unlikely that the NIOS2 port will require this function as there
is nothing to return to. */
* is nothing to return to. */
}
/*-----------------------------------------------------------*/
@ -140,10 +145,10 @@ void vPortEndScheduler( void )
void prvSetupTimerInterrupt( void )
{
/* Try to register the interrupt handler. */
if ( -EINVAL == _alt_ic_isr_register( SYS_CLK_IRQ_INTERRUPT_CONTROLLER_ID, SYS_CLK_IRQ, vPortSysTickHandler, 0x0, 0x0 ) )
if( -EINVAL == _alt_ic_isr_register( SYS_CLK_IRQ_INTERRUPT_CONTROLLER_ID, SYS_CLK_IRQ, vPortSysTickHandler, 0x0, 0x0 ) )
{
/* Failed to install the Interrupt Handler. */
asm( "break" );
asm ( "break" );
}
else
{
@ -159,7 +164,7 @@ void prvSetupTimerInterrupt( void )
}
/*-----------------------------------------------------------*/
void vPortSysTickHandler( void * context)
void vPortSysTickHandler( void * context )
{
/* Increment the kernel tick. */
if( xTaskIncrementTick() != pdFALSE )
@ -178,27 +183,30 @@ void vPortSysTickHandler( void * context)
* kernel has its scheduler started so that contexts are saved and switched
* correctly.
*/
int _alt_ic_isr_register(alt_u32 ic_id, alt_u32 irq, alt_isr_func isr,
void *isr_context, void *flags)
int _alt_ic_isr_register( alt_u32 ic_id,
alt_u32 irq,
alt_isr_func isr,
void * isr_context,
void * flags )
{
int rc = -EINVAL;
alt_irq_context status;
int id = irq; /* IRQ interpreted as the interrupt ID. */
int id = irq; /* IRQ interpreted as the interrupt ID. */
if (id < ALT_NIRQ)
if( id < ALT_NIRQ )
{
/*
* interrupts are disabled while the handler tables are updated to ensure
* that an interrupt doesn't occur while the tables are in an inconsistant
* that an interrupt doesn't occur while the tables are in an inconsistent
* state.
*/
status = alt_irq_disable_all ();
status = alt_irq_disable_all();
alt_irq[id].handler = isr;
alt_irq[id].context = isr_context;
alt_irq[ id ].handler = isr;
alt_irq[ id ].context = isr_context;
rc = (isr) ? alt_ic_irq_enable(ic_id, id) : alt_ic_irq_disable(ic_id, id);
rc = ( isr ) ? alt_ic_irq_enable( ic_id, id ) : alt_ic_irq_disable( ic_id, id );
/* alt_irq_enable_all(status); This line is removed to prevent the interrupt from being immediately enabled. */
}

View file

@ -48,48 +48,48 @@
*/
/* Type definitions. */
#define portCHAR char
#define portFLOAT float
#define portDOUBLE double
#define portLONG long
#define portSHORT short
#define portSTACK_TYPE uint32_t
#define portBASE_TYPE long
#define portCHAR char
#define portFLOAT float
#define portDOUBLE double
#define portLONG long
#define portSHORT short
#define portSTACK_TYPE uint32_t
#define portBASE_TYPE long
typedef portSTACK_TYPE StackType_t;
typedef long BaseType_t;
typedef unsigned long UBaseType_t;
typedef portSTACK_TYPE StackType_t;
typedef long BaseType_t;
typedef unsigned long UBaseType_t;
#if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
typedef uint16_t TickType_t;
#define portMAX_DELAY ( TickType_t ) 0xffff
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
typedef uint16_t TickType_t;
#define portMAX_DELAY ( TickType_t ) 0xffff
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
typedef uint32_t TickType_t;
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
typedef uint32_t TickType_t;
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
not need to be guarded with a critical section. */
#define portTICK_TYPE_IS_ATOMIC 1
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
* not need to be guarded with a critical section. */
#define portTICK_TYPE_IS_ATOMIC 1
#else
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
#endif
/*-----------------------------------------------------------*/
/* Architecture specifics. */
#define portSTACK_GROWTH ( -1 )
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 4
#define portNOP() asm volatile ( "NOP" )
#define portCRITICAL_NESTING_IN_TCB 1
#define portSTACK_GROWTH ( -1 )
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 4
#define portNOP() asm volatile ( "NOP" )
#define portCRITICAL_NESTING_IN_TCB 1
/*-----------------------------------------------------------*/
extern void vTaskSwitchContext( void );
#define portYIELD() asm volatile ( "trap" );
#define portEND_SWITCHING_ISR( xSwitchRequired ) do { if( xSwitchRequired ) vTaskSwitchContext(); } while( 0 )
#define portEND_SWITCHING_ISR( xSwitchRequired ) do { if( xSwitchRequired ) vTaskSwitchContext( ); } while( 0 )
/* Include the port_asm.S file where the Context saving/restoring is defined. */
__asm__( "\n\t.globl save_context" );
__asm__ ( "\n\t.globl save_context" );
/*-----------------------------------------------------------*/
@ -103,8 +103,8 @@ extern void vTaskExitCritical( void );
/*-----------------------------------------------------------*/
/* Task function macros as described on the FreeRTOS.org WEB site. */
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )
/* *INDENT-OFF* */
#ifdef __cplusplus