mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-23 15:01:56 -04:00
Removed unused function from IAR CM4F port.c.
Modified the stack alignment when a task first starts in the IAR CM4F port.
This commit is contained in:
parent
6360632cca
commit
7a0996f246
|
@ -119,7 +119,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
||||||
|
|
||||||
/* Offset added to account for the way the MCU uses the stack on entry/exit
|
/* Offset added to account for the way the MCU uses the stack on entry/exit
|
||||||
of interrupts, and to ensure alignment. */
|
of interrupts, and to ensure alignment. */
|
||||||
pxTopOfStack -= 2;
|
pxTopOfStack--;
|
||||||
|
|
||||||
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */
|
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */
|
||||||
pxTopOfStack--;
|
pxTopOfStack--;
|
||||||
|
@ -131,7 +131,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
||||||
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */
|
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */
|
||||||
*pxTopOfStack = ( portSTACK_TYPE ) pvParameters; /* R0 */
|
*pxTopOfStack = ( portSTACK_TYPE ) pvParameters; /* R0 */
|
||||||
|
|
||||||
/* A save method is being used that requiers each task to maintain its
|
/* A save method is being used that requires each task to maintain its
|
||||||
own exec return value. */
|
own exec return value. */
|
||||||
pxTopOfStack--;
|
pxTopOfStack--;
|
||||||
*pxTopOfStack = portINITIAL_EXEC_RETURN;
|
*pxTopOfStack = portINITIAL_EXEC_RETURN;
|
||||||
|
|
|
@ -56,11 +56,9 @@
|
||||||
RSEG CODE:CODE(2)
|
RSEG CODE:CODE(2)
|
||||||
thumb
|
thumb
|
||||||
|
|
||||||
EXTERN vPortYieldFromISR
|
|
||||||
EXTERN pxCurrentTCB
|
EXTERN pxCurrentTCB
|
||||||
EXTERN vTaskSwitchContext
|
EXTERN vTaskSwitchContext
|
||||||
|
|
||||||
PUBLIC vSetMSP
|
|
||||||
PUBLIC xPortPendSVHandler
|
PUBLIC xPortPendSVHandler
|
||||||
PUBLIC vPortSetInterruptMask
|
PUBLIC vPortSetInterruptMask
|
||||||
PUBLIC vPortClearInterruptMask
|
PUBLIC vPortClearInterruptMask
|
||||||
|
@ -68,11 +66,6 @@
|
||||||
PUBLIC vPortStartFirstTask
|
PUBLIC vPortStartFirstTask
|
||||||
PUBLIC vPortEnableVFP
|
PUBLIC vPortEnableVFP
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
vSetMSP
|
|
||||||
msr msp, r0
|
|
||||||
bx lr
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -137,7 +130,7 @@ vPortClearInterruptMask:
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
vPortSVCHandler;
|
vPortSVCHandler:
|
||||||
/* Get the location of the current TCB. */
|
/* Get the location of the current TCB. */
|
||||||
ldr r3, =pxCurrentTCB
|
ldr r3, =pxCurrentTCB
|
||||||
ldr r1, [r3]
|
ldr r1, [r3]
|
||||||
|
@ -151,7 +144,7 @@ vPortSVCHandler;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
vPortStartFirstTask
|
vPortStartFirstTask:
|
||||||
/* Use the NVIC offset register to locate the stack. */
|
/* Use the NVIC offset register to locate the stack. */
|
||||||
ldr r0, =0xE000ED08
|
ldr r0, =0xE000ED08
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
|
@ -164,7 +157,7 @@ vPortStartFirstTask
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
vPortEnableVFP
|
vPortEnableVFP:
|
||||||
/* The FPU enable bits are in the CPACR. */
|
/* The FPU enable bits are in the CPACR. */
|
||||||
ldr.w r0, =0xE000ED88
|
ldr.w r0, =0xE000ED88
|
||||||
ldr r1, [r0]
|
ldr r1, [r0]
|
||||||
|
|
|
@ -117,6 +117,10 @@ extern void vPortClearInterruptMask( void );
|
||||||
#define portSET_INTERRUPT_MASK_FROM_ISR() 0;vPortSetInterruptMask()
|
#define portSET_INTERRUPT_MASK_FROM_ISR() 0;vPortSetInterruptMask()
|
||||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortClearInterruptMask();(void)x
|
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortClearInterruptMask();(void)x
|
||||||
|
|
||||||
|
/* There are an uneven number of items on the initial stack, so
|
||||||
|
portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */
|
||||||
|
#define portALIGNMENT_ASSERT_pxCurrentTCB ( void )
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
||||||
|
|
Loading…
Reference in a new issue