mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 10:08:33 -04:00
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:
parent
d6bccb1f4c
commit
5fb9b50da8
485 changed files with 108790 additions and 107581 deletions
|
@ -27,8 +27,8 @@
|
|||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Implementation of functions defined in portable.h for the PPC405 port.
|
||||
*----------------------------------------------------------*/
|
||||
* Implementation of functions defined in portable.h for the PPC405 port.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
|
||||
/* Scheduler includes. */
|
||||
|
@ -43,19 +43,19 @@
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Definitions to set the initial MSR of each task. */
|
||||
#define portCRITICAL_INTERRUPT_ENABLE ( 1UL << 17UL )
|
||||
#define portEXTERNAL_INTERRUPT_ENABLE ( 1UL << 15UL )
|
||||
#define portMACHINE_CHECK_ENABLE ( 1UL << 12UL )
|
||||
#define portCRITICAL_INTERRUPT_ENABLE ( 1UL << 17UL )
|
||||
#define portEXTERNAL_INTERRUPT_ENABLE ( 1UL << 15UL )
|
||||
#define portMACHINE_CHECK_ENABLE ( 1UL << 12UL )
|
||||
|
||||
#if configUSE_FPU == 1
|
||||
#define portAPU_PRESENT ( 1UL << 25UL )
|
||||
#define portFCM_FPU_PRESENT ( 1UL << 13UL )
|
||||
#define portAPU_PRESENT ( 1UL << 25UL )
|
||||
#define portFCM_FPU_PRESENT ( 1UL << 13UL )
|
||||
#else
|
||||
#define portAPU_PRESENT ( 0UL )
|
||||
#define portFCM_FPU_PRESENT ( 0UL )
|
||||
#define portAPU_PRESENT ( 0UL )
|
||||
#define portFCM_FPU_PRESENT ( 0UL )
|
||||
#endif
|
||||
|
||||
#define portINITIAL_MSR ( portCRITICAL_INTERRUPT_ENABLE | portEXTERNAL_INTERRUPT_ENABLE | portMACHINE_CHECK_ENABLE | portAPU_PRESENT | portFCM_FPU_PRESENT )
|
||||
#define portINITIAL_MSR ( portCRITICAL_INTERRUPT_ENABLE | portEXTERNAL_INTERRUPT_ENABLE | portMACHINE_CHECK_ENABLE | portAPU_PRESENT | portFCM_FPU_PRESENT )
|
||||
|
||||
|
||||
extern const unsigned _SDA_BASE_;
|
||||
|
@ -97,7 +97,9 @@ static XIntc xInterruptController;
|
|||
*
|
||||
* See the header file portable.h.
|
||||
*/
|
||||
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||
StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
||||
TaskFunction_t pxCode,
|
||||
void * pvParameters )
|
||||
{
|
||||
/* Place a known value at the bottom of the stack for debugging. */
|
||||
*pxTopOfStack = 0xDEADBEEF;
|
||||
|
@ -115,30 +117,30 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
|||
pxTopOfStack--;
|
||||
|
||||
/* Parameters in R2. */
|
||||
*pxTopOfStack = ( StackType_t ) &_SDA2_BASE_; /* address of the second small data area */
|
||||
*pxTopOfStack = ( StackType_t ) &_SDA2_BASE_; /* address of the second small data area */
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R1 is the stack pointer so is omitted. */
|
||||
|
||||
*pxTopOfStack = 0x10000001UL;; /* R0. */
|
||||
*pxTopOfStack = 0x10000001UL; /* R0. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x00000000UL; /* USPRG0. */
|
||||
*pxTopOfStack = 0x00000000UL; /* USPRG0. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x00000000UL; /* CR. */
|
||||
*pxTopOfStack = 0x00000000UL; /* CR. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x00000000UL; /* XER. */
|
||||
*pxTopOfStack = 0x00000000UL; /* XER. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x00000000UL; /* CTR. */
|
||||
*pxTopOfStack = 0x00000000UL; /* CTR. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) vPortEndScheduler; /* LR. */
|
||||
*pxTopOfStack = ( StackType_t ) vPortEndScheduler; /* LR. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) pxCode; /* SRR0. */
|
||||
*pxTopOfStack = ( StackType_t ) pxCode; /* SRR0. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = portINITIAL_MSR;/* SRR1. */
|
||||
*pxTopOfStack = portINITIAL_MSR; /* SRR1. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) vPortEndScheduler;/* Next LR. */
|
||||
*pxTopOfStack = ( StackType_t ) vPortEndScheduler; /* Next LR. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x00000000UL;/* Backchain. */
|
||||
*pxTopOfStack = 0x00000000UL; /* Backchain. */
|
||||
|
||||
return pxTopOfStack;
|
||||
}
|
||||
|
@ -158,7 +160,9 @@ BaseType_t xPortStartScheduler( void )
|
|||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented. */
|
||||
for( ;; );
|
||||
for( ; ; )
|
||||
{
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -167,7 +171,7 @@ void vPortEndScheduler( void )
|
|||
*/
|
||||
static void prvSetupTimerInterrupt( void )
|
||||
{
|
||||
const uint32_t ulInterval = ( ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL );
|
||||
const uint32_t ulInterval = ( ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL );
|
||||
|
||||
XTime_PITClearInterrupt();
|
||||
XTime_FITClearInterrupt();
|
||||
|
@ -183,18 +187,18 @@ const uint32_t ulInterval = ( ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortISRHandler( void *pvNullDoNotUse )
|
||||
void vPortISRHandler( void * pvNullDoNotUse )
|
||||
{
|
||||
uint32_t ulInterruptStatus, ulInterruptMask = 1UL;
|
||||
BaseType_t xInterruptNumber;
|
||||
XIntc_Config *pxInterruptController;
|
||||
XIntc_VectorTableEntry *pxTable;
|
||||
uint32_t ulInterruptStatus, ulInterruptMask = 1UL;
|
||||
BaseType_t xInterruptNumber;
|
||||
XIntc_Config * pxInterruptController;
|
||||
XIntc_VectorTableEntry * pxTable;
|
||||
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) pvNullDoNotUse;
|
||||
|
||||
/* Get the configuration by using the device ID - in this case it is
|
||||
assumed that only one interrupt controller is being used. */
|
||||
* assumed that only one interrupt controller is being used. */
|
||||
pxInterruptController = &XIntc_ConfigTable[ XPAR_XPS_INTC_0_DEVICE_ID ];
|
||||
|
||||
/* Which interrupts are pending? */
|
||||
|
@ -227,29 +231,31 @@ XIntc_VectorTableEntry *pxTable;
|
|||
|
||||
void vPortSetupInterruptController( void )
|
||||
{
|
||||
extern void vPortISRWrapper( void );
|
||||
extern void vPortISRWrapper( void );
|
||||
|
||||
/* Perform all library calls necessary to initialise the exception table
|
||||
and interrupt controller. This assumes only one interrupt controller is in
|
||||
use. */
|
||||
* and interrupt controller. This assumes only one interrupt controller is in
|
||||
* use. */
|
||||
XExc_mDisableExceptions( XEXC_NON_CRITICAL );
|
||||
XExc_Init();
|
||||
|
||||
/* The library functions save the context - we then jump to a wrapper to
|
||||
save the stack into the TCB. The wrapper then calls the handler defined
|
||||
above. */
|
||||
* save the stack into the TCB. The wrapper then calls the handler defined
|
||||
* above. */
|
||||
XExc_RegisterHandler( XEXC_ID_NON_CRITICAL_INT, ( XExceptionHandler ) vPortISRWrapper, NULL );
|
||||
XIntc_Initialize( &xInterruptController, XPAR_XPS_INTC_0_DEVICE_ID );
|
||||
XIntc_Start( &xInterruptController, XIN_REAL_MODE );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t xPortInstallInterruptHandler( uint8_t ucInterruptID, XInterruptHandler pxHandler, void *pvCallBackRef )
|
||||
BaseType_t xPortInstallInterruptHandler( uint8_t ucInterruptID,
|
||||
XInterruptHandler pxHandler,
|
||||
void * pvCallBackRef )
|
||||
{
|
||||
BaseType_t xReturn = pdFAIL;
|
||||
BaseType_t xReturn = pdFAIL;
|
||||
|
||||
/* This function is defined here so the scope of xInterruptController can
|
||||
remain within this file. */
|
||||
* remain within this file. */
|
||||
|
||||
if( XST_SUCCESS == XIntc_Connect( &xInterruptController, ucInterruptID, pxHandler, pvCallBackRef ) )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue