mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 04:13:54 -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
107
portable/ThirdParty/CDK/T-HEAD_CK802/port.c
vendored
107
portable/ThirdParty/CDK/T-HEAD_CK802/port.c
vendored
|
@ -26,39 +26,41 @@
|
|||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
extern void vPortStartTask(void);
|
||||
extern void vPortStartTask( void );
|
||||
|
||||
/* Used to keep track of the number of nested calls to taskENTER_CRITICAL(). This
|
||||
will be set to 0 prior to the first task being started. */
|
||||
* will be set to 0 prior to the first task being started. */
|
||||
portLONG ulCriticalNesting = 0x9999UL;
|
||||
|
||||
/* Used to record one tack want to swtich task after enter critical area, we need know it
|
||||
* and implement task switch after exit critical area */
|
||||
portLONG pendsvflag = 0;
|
||||
|
||||
StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||
StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
||||
TaskFunction_t pxCode,
|
||||
void * pvParameters )
|
||||
{
|
||||
StackType_t *stk = NULL;
|
||||
StackType_t * stk = NULL;
|
||||
|
||||
stk = pxTopOfStack;
|
||||
|
||||
*(--stk) = (uint32_t)pxCode; /* Entry Point */
|
||||
*(--stk) = (uint32_t)0xE0000140L; /* PSR */
|
||||
*(--stk) = (uint32_t)0xFFFFFFFEL; /* R15 (LR) (init value will cause fault if ever used) */
|
||||
*(--stk) = (uint32_t)0x13131313L; /* R13 */
|
||||
*(--stk) = (uint32_t)0x12121212L; /* R12 */
|
||||
*(--stk) = (uint32_t)0x11111111L; /* R11 */
|
||||
*(--stk) = (uint32_t)0x10101010L; /* R10 */
|
||||
*(--stk) = (uint32_t)0x09090909L; /* R9 */
|
||||
*(--stk) = (uint32_t)0x08080808L; /* R8 */
|
||||
*(--stk) = (uint32_t)0x07070707L; /* R7 */
|
||||
*(--stk) = (uint32_t)0x06060606L; /* R6 */
|
||||
*(--stk) = (uint32_t)0x05050505L; /* R5 */
|
||||
*(--stk) = (uint32_t)0x04040404L; /* R4 */
|
||||
*(--stk) = (uint32_t)0x03030303L; /* R3 */
|
||||
*(--stk) = (uint32_t)0x02020202L; /* R2 */
|
||||
*(--stk) = (uint32_t)0x01010101L; /* R1 */
|
||||
*(--stk) = (uint32_t)pvParameters; /* R0 : argument */
|
||||
*( --stk ) = ( uint32_t ) pxCode; /* Entry Point */
|
||||
*( --stk ) = ( uint32_t ) 0xE0000140L; /* PSR */
|
||||
*( --stk ) = ( uint32_t ) 0xFFFFFFFEL; /* R15 (LR) (init value will cause fault if ever used) */
|
||||
*( --stk ) = ( uint32_t ) 0x13131313L; /* R13 */
|
||||
*( --stk ) = ( uint32_t ) 0x12121212L; /* R12 */
|
||||
*( --stk ) = ( uint32_t ) 0x11111111L; /* R11 */
|
||||
*( --stk ) = ( uint32_t ) 0x10101010L; /* R10 */
|
||||
*( --stk ) = ( uint32_t ) 0x09090909L; /* R9 */
|
||||
*( --stk ) = ( uint32_t ) 0x08080808L; /* R8 */
|
||||
*( --stk ) = ( uint32_t ) 0x07070707L; /* R7 */
|
||||
*( --stk ) = ( uint32_t ) 0x06060606L; /* R6 */
|
||||
*( --stk ) = ( uint32_t ) 0x05050505L; /* R5 */
|
||||
*( --stk ) = ( uint32_t ) 0x04040404L; /* R4 */
|
||||
*( --stk ) = ( uint32_t ) 0x03030303L; /* R3 */
|
||||
*( --stk ) = ( uint32_t ) 0x02020202L; /* R2 */
|
||||
*( --stk ) = ( uint32_t ) 0x01010101L; /* R1 */
|
||||
*( --stk ) = ( uint32_t ) pvParameters; /* R0 : argument */
|
||||
|
||||
return stk;
|
||||
}
|
||||
|
@ -81,21 +83,25 @@ void vPortEndScheduler( void )
|
|||
void vPortEnterCritical( void )
|
||||
{
|
||||
portDISABLE_INTERRUPTS();
|
||||
ulCriticalNesting ++;
|
||||
ulCriticalNesting++;
|
||||
}
|
||||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
if (ulCriticalNesting == 0) {
|
||||
while(1);
|
||||
if( ulCriticalNesting == 0 )
|
||||
{
|
||||
while( 1 )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
ulCriticalNesting --;
|
||||
if (ulCriticalNesting == 0)
|
||||
ulCriticalNesting--;
|
||||
|
||||
if( ulCriticalNesting == 0 )
|
||||
{
|
||||
portENABLE_INTERRUPTS();
|
||||
|
||||
if (pendsvflag)
|
||||
if( pendsvflag )
|
||||
{
|
||||
pendsvflag = 0;
|
||||
portYIELD();
|
||||
|
@ -104,30 +110,30 @@ void vPortExitCritical( void )
|
|||
}
|
||||
|
||||
#if configUSE_PREEMPTION == 0
|
||||
void xPortSysTickHandler( void )
|
||||
{
|
||||
portLONG ulDummy;
|
||||
void xPortSysTickHandler( void )
|
||||
{
|
||||
portLONG ulDummy;
|
||||
|
||||
ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
xTaskIncrementTick();
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy );
|
||||
}
|
||||
ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
xTaskIncrementTick();
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy );
|
||||
}
|
||||
|
||||
#else
|
||||
void xPortSysTickHandler( void )
|
||||
{
|
||||
portLONG ulDummy;
|
||||
|
||||
ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
void xPortSysTickHandler( void )
|
||||
{
|
||||
if (xTaskIncrementTick() != pdFALSE)
|
||||
portLONG ulDummy;
|
||||
|
||||
ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
{
|
||||
portYIELD_FROM_ISR(pdTRUE);
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
portYIELD_FROM_ISR( pdTRUE );
|
||||
}
|
||||
}
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy );
|
||||
}
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy );
|
||||
}
|
||||
#endif
|
||||
#endif /* if configUSE_PREEMPTION == 0 */
|
||||
|
||||
void vPortYieldHandler( void )
|
||||
{
|
||||
|
@ -140,12 +146,17 @@ void vPortYieldHandler( void )
|
|||
portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask );
|
||||
}
|
||||
|
||||
__attribute__((weak)) void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )
|
||||
__attribute__( ( weak ) ) void vApplicationStackOverflowHook( xTaskHandle * pxTask,
|
||||
signed portCHAR * pcTaskName )
|
||||
{
|
||||
for(;;);
|
||||
for( ; ; )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void vApplicationMallocFailedHook( void )
|
||||
__attribute__( ( weak ) ) void vApplicationMallocFailedHook( void )
|
||||
{
|
||||
for(;;);
|
||||
for( ; ; )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue