mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 13:31:58 -04:00
Remove guards against __ARMCC_VERSION version numbers that were previously used to avoid compiler warnings in some GCC ARM Cortex ports.
This commit is contained in:
parent
d1fb8907ab
commit
46e5937529
|
@ -210,13 +210,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will never be reached,
|
|
||||||
* but some compilers warn if it is not included, while others won't compile
|
|
||||||
* if it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -228,14 +221,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) /
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
* the compiler can't see that. Some compilers generate warnings without
|
|
||||||
* the following line, while others generate warnings if the line is
|
|
||||||
* included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -205,13 +205,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will never be reached,
|
|
||||||
* but some compilers warn if it is not included, while others won't compile
|
|
||||||
* if it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -223,14 +216,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) /
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
* the compiler can't see that. Some compilers generate warnings without
|
|
||||||
* the following line, while others generate warnings if the line is
|
|
||||||
* included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -185,13 +185,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will never be reached,
|
|
||||||
* but some compilers warn if it is not included, while others won't compile
|
|
||||||
* if it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -203,14 +196,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) /
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
* the compiler can't see that. Some compilers generate warnings without
|
|
||||||
* the following line, while others generate warnings if the line is
|
|
||||||
* included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -180,13 +180,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will never be reached,
|
|
||||||
* but some compilers warn if it is not included, while others won't compile
|
|
||||||
* if it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -198,14 +191,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) /
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
* the compiler can't see that. Some compilers generate warnings without
|
|
||||||
* the following line, while others generate warnings if the line is
|
|
||||||
* included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -225,8 +225,8 @@ void vPortYield( void )
|
||||||
|
|
||||||
void vPortEnterCritical( void )
|
void vPortEnterCritical( void )
|
||||||
{
|
{
|
||||||
portDISABLE_INTERRUPTS();
|
portDISABLE_INTERRUPTS();
|
||||||
uxCriticalNesting++;
|
uxCriticalNesting++;
|
||||||
__asm volatile( "dsb" ::: "memory" );
|
__asm volatile( "dsb" ::: "memory" );
|
||||||
__asm volatile( "isb" );
|
__asm volatile( "isb" );
|
||||||
}
|
}
|
||||||
|
@ -235,11 +235,11 @@ void vPortEnterCritical( void )
|
||||||
void vPortExitCritical( void )
|
void vPortExitCritical( void )
|
||||||
{
|
{
|
||||||
configASSERT( uxCriticalNesting );
|
configASSERT( uxCriticalNesting );
|
||||||
uxCriticalNesting--;
|
uxCriticalNesting--;
|
||||||
if( uxCriticalNesting == 0 )
|
if( uxCriticalNesting == 0 )
|
||||||
{
|
{
|
||||||
portENABLE_INTERRUPTS();
|
portENABLE_INTERRUPTS();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -251,13 +251,6 @@ uint32_t ulSetInterruptMaskFromISR( void )
|
||||||
" bx lr "
|
" bx lr "
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will nevere be reached,
|
|
||||||
but some compilers warn if it is not included, while others won't compile if
|
|
||||||
it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -268,13 +261,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask )
|
||||||
" bx lr "
|
" bx lr "
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
the compiler can't see that. Some compilers generate warnings without the
|
|
||||||
following line, while others generate warnings if the line is included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -210,13 +210,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will never be reached,
|
|
||||||
* but some compilers warn if it is not included, while others won't compile
|
|
||||||
* if it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -228,14 +221,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) /
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
* the compiler can't see that. Some compilers generate warnings without
|
|
||||||
* the following line, while others generate warnings if the line is
|
|
||||||
* included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -205,13 +205,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will never be reached,
|
|
||||||
* but some compilers warn if it is not included, while others won't compile
|
|
||||||
* if it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -223,14 +216,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) /
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
* the compiler can't see that. Some compilers generate warnings without
|
|
||||||
* the following line, while others generate warnings if the line is
|
|
||||||
* included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -185,13 +185,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will never be reached,
|
|
||||||
* but some compilers warn if it is not included, while others won't compile
|
|
||||||
* if it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -203,14 +196,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) /
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
* the compiler can't see that. Some compilers generate warnings without
|
|
||||||
* the following line, while others generate warnings if the line is
|
|
||||||
* included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -180,13 +180,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* To avoid compiler warnings. The return statement will never be reached,
|
|
||||||
* but some compilers warn if it is not included, while others won't compile
|
|
||||||
* if it is. */
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -198,14 +191,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) /
|
||||||
" bx lr \n"
|
" bx lr \n"
|
||||||
::: "memory"
|
::: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
|
||||||
/* Just to avoid compiler warning. ulMask is used from the asm code but
|
|
||||||
* the compiler can't see that. Some compilers generate warnings without
|
|
||||||
* the following line, while others generate warnings if the line is
|
|
||||||
* included. */
|
|
||||||
( void ) ulMask;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
||||||
PSW is set with U and I set, and PM and IPL clear. */
|
PSW is set with U and I set, and PM and IPL clear. */
|
||||||
#define portINITIAL_PSW ( ( StackType_t ) 0x00030000 )
|
#define portINITIAL_PSW ( ( StackType_t ) 0x00030000 )
|
||||||
|
|
||||||
/* The peripheral clock is divided by this value before being supplying the
|
/* The peripheral clock is divided by this value before being supplying the
|
||||||
CMT. */
|
CMT. */
|
||||||
|
@ -105,7 +105,7 @@ void vPortTickISR( void ) __attribute__((interrupt));
|
||||||
static void prvSetupTimerInterrupt( void );
|
static void prvSetupTimerInterrupt( void );
|
||||||
#ifndef configSETUP_TICK_INTERRUPT
|
#ifndef configSETUP_TICK_INTERRUPT
|
||||||
/* The user has not provided their own tick interrupt configuration so use
|
/* The user has not provided their own tick interrupt configuration so use
|
||||||
the definition in this file (which uses the interval timer). */
|
the definition in this file (which uses the interval timer). */
|
||||||
#define configSETUP_TICK_INTERRUPT() prvSetupTimerInterrupt()
|
#define configSETUP_TICK_INTERRUPT() prvSetupTimerInterrupt()
|
||||||
#endif /* configSETUP_TICK_INTERRUPT */
|
#endif /* configSETUP_TICK_INTERRUPT */
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* R0 is not included as it is the stack pointer. */
|
/* R0 is not included as it is the stack pointer. */
|
||||||
*pxTopOfStack = 0x00;
|
*pxTopOfStack = 0x00;
|
||||||
pxTopOfStack--;
|
pxTopOfStack--;
|
||||||
*pxTopOfStack = 0x00;
|
*pxTopOfStack = 0x00;
|
||||||
pxTopOfStack--;
|
pxTopOfStack--;
|
||||||
*pxTopOfStack = portINITIAL_PSW;
|
*pxTopOfStack = portINITIAL_PSW;
|
||||||
pxTopOfStack--;
|
pxTopOfStack--;
|
||||||
|
@ -284,22 +284,22 @@ static void prvStartFirstTask( void )
|
||||||
|
|
||||||
/* Restore the registers from the stack of the task pointed to by
|
/* Restore the registers from the stack of the task pointed to by
|
||||||
pxCurrentTCB. */
|
pxCurrentTCB. */
|
||||||
"POP R15 \n" \
|
"POP R15 \n" \
|
||||||
|
|
||||||
/* Accumulator low 32 bits. */
|
/* Accumulator low 32 bits. */
|
||||||
"MVTACLO R15 \n" \
|
"MVTACLO R15 \n" \
|
||||||
"POP R15 \n" \
|
"POP R15 \n" \
|
||||||
|
|
||||||
/* Accumulator high 32 bits. */
|
/* Accumulator high 32 bits. */
|
||||||
"MVTACHI R15 \n" \
|
"MVTACHI R15 \n" \
|
||||||
|
|
||||||
/* R1 to R15 - R0 is not included as it is the SP. */
|
/* R1 to R15 - R0 is not included as it is the SP. */
|
||||||
"POPM R1-R15 \n" \
|
"POPM R1-R15 \n" \
|
||||||
|
|
||||||
/* This pops the remaining registers. */
|
/* This pops the remaining registers. */
|
||||||
"RTE \n" \
|
"RTE \n" \
|
||||||
"NOP \n" \
|
"NOP \n" \
|
||||||
"NOP \n"
|
"NOP \n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -573,14 +573,14 @@ static void prvSetupTimerInterrupt( void )
|
||||||
}
|
}
|
||||||
else if( eSleepAction == eNoTasksWaitingTimeout )
|
else if( eSleepAction == eNoTasksWaitingTimeout )
|
||||||
{
|
{
|
||||||
/* Protection off. */
|
/* Protection off. */
|
||||||
SYSTEM.PRCR.WORD = portUNLOCK_KEY;
|
SYSTEM.PRCR.WORD = portUNLOCK_KEY;
|
||||||
|
|
||||||
/* Ready for software standby with all clocks stopped. */
|
/* Ready for software standby with all clocks stopped. */
|
||||||
SYSTEM.SBYCR.BIT.SSBY = 1;
|
SYSTEM.SBYCR.BIT.SSBY = 1;
|
||||||
|
|
||||||
/* Protection on. */
|
/* Protection on. */
|
||||||
SYSTEM.PRCR.WORD = portLOCK_KEY;
|
SYSTEM.PRCR.WORD = portLOCK_KEY;
|
||||||
|
|
||||||
/* Sleep until something happens. Calling prvSleep() will
|
/* Sleep until something happens. Calling prvSleep() will
|
||||||
automatically reset the i bit in the PSW. */
|
automatically reset the i bit in the PSW. */
|
||||||
|
@ -591,18 +591,18 @@ static void prvSetupTimerInterrupt( void )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Protection off. */
|
/* Protection off. */
|
||||||
SYSTEM.PRCR.WORD = portUNLOCK_KEY;
|
SYSTEM.PRCR.WORD = portUNLOCK_KEY;
|
||||||
|
|
||||||
/* Ready for deep sleep mode. */
|
/* Ready for deep sleep mode. */
|
||||||
SYSTEM.MSTPCRC.BIT.DSLPE = 1;
|
SYSTEM.MSTPCRC.BIT.DSLPE = 1;
|
||||||
SYSTEM.MSTPCRA.BIT.MSTPA28 = 1;
|
SYSTEM.MSTPCRA.BIT.MSTPA28 = 1;
|
||||||
SYSTEM.SBYCR.BIT.SSBY = 0;
|
SYSTEM.SBYCR.BIT.SSBY = 0;
|
||||||
|
|
||||||
/* Protection on. */
|
/* Protection on. */
|
||||||
SYSTEM.PRCR.WORD = portLOCK_KEY;
|
SYSTEM.PRCR.WORD = portLOCK_KEY;
|
||||||
|
|
||||||
/* Adjust the match value to take into account that the current
|
/* Adjust the match value to take into account that the current
|
||||||
time slice is already partially complete. */
|
time slice is already partially complete. */
|
||||||
ulMatchValue -= ( uint32_t ) CMT0.CMCNT;
|
ulMatchValue -= ( uint32_t ) CMT0.CMCNT;
|
||||||
CMT0.CMCOR = ( uint16_t ) ulMatchValue;
|
CMT0.CMCOR = ( uint16_t ) ulMatchValue;
|
||||||
|
|
Loading…
Reference in a new issue