Skip to content

Commit ee5725b

Browse files
authored
Merge branch 'main' into main
2 parents a5c2779 + 529de56 commit ee5725b

File tree

13 files changed

+1047
-1083
lines changed

13 files changed

+1047
-1083
lines changed

portable/ThirdParty/XCC/Xtensa/port.c

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,34 @@
3737

3838

3939
/* Defined in portasm.h */
40-
extern void _frxt_tick_timer_init( void );
40+
extern void _frxt_tick_timer_init(void);
4141

4242
/* Defined in xtensa_context.S */
43-
extern void _xt_coproc_init( void );
43+
extern void _xt_coproc_init(void);
4444

4545

4646
/*-----------------------------------------------------------*/
4747

4848
/* We require the address of the pxCurrentTCB variable, but don't want to know
49-
* any details of its type. */
49+
any details of its type. */
5050
typedef void TCB_t;
5151
extern volatile TCB_t * volatile pxCurrentTCB;
5252

53-
unsigned port_xSchedulerRunning = 0; /* Duplicate of inaccessible xSchedulerRunning; needed at startup to avoid counting nesting */
54-
unsigned port_interruptNesting = 0; /* Interrupt nesting level */
53+
unsigned port_xSchedulerRunning = 0; // Duplicate of inaccessible xSchedulerRunning; needed at startup to avoid counting nesting
54+
unsigned port_interruptNesting = 0; // Interrupt nesting level
5555

5656
/*-----------------------------------------------------------*/
5757

58-
/* User exception dispatcher when exiting */
59-
void _xt_user_exit( void );
58+
// User exception dispatcher when exiting
59+
void _xt_user_exit(void);
6060

6161
/*
6262
* Stack initialization
6363
*/
6464
#if portUSING_MPU_WRAPPERS
65-
StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
66-
TaskFunction_t pxCode,
67-
void * pvParameters,
68-
BaseType_t xRunPrivileged )
65+
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged )
6966
#else
70-
StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
71-
TaskFunction_t pxCode,
72-
void * pvParameters )
67+
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
7368
#endif
7469
{
7570
StackType_t * sp;
@@ -134,18 +129,18 @@ void _xt_user_exit( void );
134129
void vPortEndScheduler( void )
135130
{
136131
/* It is unlikely that the Xtensa port will get stopped. If required simply
137-
* disable the tick interrupt here. */
132+
disable the tick interrupt here. */
138133
}
139134

140135
/*-----------------------------------------------------------*/
141136

142137
BaseType_t xPortStartScheduler( void )
143138
{
144-
/* Interrupts are disabled at this point and stack contains PS with enabled interrupts when task context is restored */
139+
// Interrupts are disabled at this point and stack contains PS with enabled interrupts when task context is restored
145140

146141
#if XCHAL_CP_NUM > 0
147-
/* Initialize co-processor management for tasks. Leave CPENABLE alone. */
148-
_xt_coproc_init();
142+
/* Initialize co-processor management for tasks. Leave CPENABLE alone. */
143+
_xt_coproc_init();
149144
#endif
150145

151146
/* Init the tick divisor value */
@@ -155,14 +150,14 @@ BaseType_t xPortStartScheduler( void )
155150
_frxt_tick_timer_init();
156151

157152
#if XT_USE_THREAD_SAFE_CLIB
158-
/* Init C library */
159-
vPortClibInit();
153+
// Init C library
154+
vPortClibInit();
160155
#endif
161156

162157
port_xSchedulerRunning = 1;
163158

164-
/* Cannot be directly called from C; never returns */
165-
__asm__ volatile ( "call0 _frxt_dispatch\n" );
159+
// Cannot be directly called from C; never returns
160+
__asm__ volatile ("call0 _frxt_dispatch\n");
166161

167162
/* Should not get here. */
168163
return pdTRUE;
@@ -195,13 +190,14 @@ BaseType_t xPortSysTickHandler( void )
195190
* Used to set coprocessor area in stack. Current hack is to reuse MPU pointer for coprocessor area.
196191
*/
197192
#if portUSING_MPU_WRAPPERS
193+
198194
void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
199195
const struct xMEMORY_REGION * const xRegions,
200196
StackType_t * pxBottomOfStack,
201-
configSTACK_DEPTH_TYPE ulStackDepth )
197+
configSTACK_DEPTH_TYPE uxStackDepth )
202198
{
203199
#if XCHAL_CP_NUM > 0
204-
xMPUSettings->coproc_area = ( StackType_t * ) ( ( uint32_t ) ( pxBottomOfStack + ulStackDepth - 1 ) );
200+
xMPUSettings->coproc_area = ( StackType_t * ) ( ( uint32_t ) ( pxBottomOfStack + uxStackDepth - 1 ) );
205201
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) xMPUSettings->coproc_area ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
206202
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( uint32_t ) xMPUSettings->coproc_area - XT_CP_SIZE ) & ~0xf );
207203

portable/ThirdParty/XCC/Xtensa/portbenchmark.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#endif
4343

4444
#define portbenchmarkINTERRUPT_DISABLE()
45-
#define portbenchmarkINTERRUPT_RESTORE( newstate )
45+
#define portbenchmarkINTERRUPT_RESTORE(newstate)
4646
#define portbenchmarkIntLatency()
4747
#define portbenchmarkIntWait()
4848
#define portbenchmarkReset()

0 commit comments

Comments
 (0)