mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Correct long time mis-spelled portINITIAL_EXEC_RETURN to portINITIAL_EXC_RETURN
This commit is contained in:
parent
3f74cd483b
commit
6eea3d8d4b
|
@ -127,7 +127,7 @@
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* The systick is a 24-bit counter. */
|
/* The systick is a 24-bit counter. */
|
||||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||||
|
@ -239,7 +239,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ xPortPendSVHandler: .asmfunc
|
||||||
;/* Save the new top of stack into the first member of the TCB. */
|
;/* Save the new top of stack into the first member of the TCB. */
|
||||||
str r0, [r2]
|
str r0, [r2]
|
||||||
|
|
||||||
stmdb sp!, {r3}
|
stmdb sp!, {r0, r3}
|
||||||
ldr r0, ulMaxSyscallInterruptPriorityConst
|
ldr r0, ulMaxSyscallInterruptPriorityConst
|
||||||
ldr r1, [r0]
|
ldr r1, [r0]
|
||||||
msr basepri, r1
|
msr basepri, r1
|
||||||
|
@ -132,7 +132,7 @@ xPortPendSVHandler: .asmfunc
|
||||||
bl vTaskSwitchContext
|
bl vTaskSwitchContext
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
ldmia sp!, {r3}
|
ldmia sp!, {r0, r3}
|
||||||
|
|
||||||
;/* The first item in pxCurrentTCB is the task top of stack. */
|
;/* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
ldr r1, [r3]
|
ldr r1, [r3]
|
||||||
|
|
|
@ -332,7 +332,7 @@ void xPortPendSVHandler( void )
|
||||||
" ldr r3, pxCurrentTCBConst \n" /* Get the location of the current TCB. */
|
" ldr r3, pxCurrentTCBConst \n" /* Get the location of the current TCB. */
|
||||||
" ldr r2, [r3] \n"
|
" ldr r2, [r3] \n"
|
||||||
" \n"
|
" \n"
|
||||||
" subs r0, r0, #32 \n" /* Make space for the remaining low registers. */
|
" subs r0, r0, #32 \n" /* Make space for the remaining low registers. */
|
||||||
" str r0, [r2] \n" /* Save the new top of stack. */
|
" str r0, [r2] \n" /* Save the new top of stack. */
|
||||||
" stmia r0!, {r4-r7} \n" /* Store the low registers that are not saved automatically. */
|
" stmia r0!, {r4-r7} \n" /* Store the low registers that are not saved automatically. */
|
||||||
" mov r4, r8 \n" /* Store the high registers. */
|
" mov r4, r8 \n" /* Store the high registers. */
|
||||||
|
@ -349,7 +349,7 @@ void xPortPendSVHandler( void )
|
||||||
" \n"
|
" \n"
|
||||||
" ldr r1, [r2] \n"
|
" ldr r1, [r2] \n"
|
||||||
" ldr r0, [r1] \n" /* The first item in pxCurrentTCB is the task top of stack. */
|
" ldr r0, [r1] \n" /* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
" adds r0, r0, #16 \n" /* Move to the high registers. */
|
" adds r0, r0, #16 \n" /* Move to the high registers. */
|
||||||
" ldmia r0!, {r4-r7} \n" /* Pop the high registers. */
|
" ldmia r0!, {r4-r7} \n" /* Pop the high registers. */
|
||||||
" mov r8, r4 \n"
|
" mov r8, r4 \n"
|
||||||
" mov r9, r5 \n"
|
" mov r9, r5 \n"
|
||||||
|
|
|
@ -129,7 +129,7 @@ r0p1 port. */
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* The systick is a 24-bit counter. */
|
/* The systick is a 24-bit counter. */
|
||||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||||
|
@ -248,7 +248,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ void xPortPendSVHandler( void )
|
||||||
" stmdb r0!, {r4-r11, r14} \n" /* Save the core registers. */
|
" stmdb r0!, {r4-r11, r14} \n" /* Save the core registers. */
|
||||||
" str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */
|
" str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */
|
||||||
" \n"
|
" \n"
|
||||||
" stmdb sp!, {r3} \n"
|
" stmdb sp!, {r0, r3} \n"
|
||||||
" mov r0, %0 \n"
|
" mov r0, %0 \n"
|
||||||
" msr basepri, r0 \n"
|
" msr basepri, r0 \n"
|
||||||
" dsb \n"
|
" dsb \n"
|
||||||
|
@ -497,7 +497,7 @@ void xPortPendSVHandler( void )
|
||||||
" bl vTaskSwitchContext \n"
|
" bl vTaskSwitchContext \n"
|
||||||
" mov r0, #0 \n"
|
" mov r0, #0 \n"
|
||||||
" msr basepri, r0 \n"
|
" msr basepri, r0 \n"
|
||||||
" ldmia sp!, {r3} \n"
|
" ldmia sp!, {r0, r3} \n"
|
||||||
" \n"
|
" \n"
|
||||||
" ldr r1, [r3] \n" /* The first item in pxCurrentTCB is the task top of stack. */
|
" ldr r1, [r3] \n" /* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
" ldr r0, [r1] \n"
|
" ldr r0, [r1] \n"
|
||||||
|
|
|
@ -134,7 +134,7 @@ task.h is included from an application file. */
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000UL )
|
#define portINITIAL_XPSR ( 0x01000000UL )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffdUL )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffdUL )
|
||||||
#define portINITIAL_CONTROL_IF_UNPRIVILEGED ( 0x03 )
|
#define portINITIAL_CONTROL_IF_UNPRIVILEGED ( 0x03 )
|
||||||
#define portINITIAL_CONTROL_IF_PRIVILEGED ( 0x02 )
|
#define portINITIAL_CONTROL_IF_PRIVILEGED ( 0x02 )
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 9; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 9; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ void xPortPendSVHandler( void )
|
||||||
" stmdb r0!, {r1, r4-r11, r14} \n" /* Save the remaining registers. */
|
" stmdb r0!, {r1, r4-r11, r14} \n" /* Save the remaining registers. */
|
||||||
" str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */
|
" str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */
|
||||||
" \n"
|
" \n"
|
||||||
" stmdb sp!, {r3} \n"
|
" stmdb sp!, {r0, r3} \n"
|
||||||
" mov r0, %0 \n"
|
" mov r0, %0 \n"
|
||||||
" msr basepri, r0 \n"
|
" msr basepri, r0 \n"
|
||||||
" dsb \n"
|
" dsb \n"
|
||||||
|
@ -522,8 +522,8 @@ void xPortPendSVHandler( void )
|
||||||
" bl vTaskSwitchContext \n"
|
" bl vTaskSwitchContext \n"
|
||||||
" mov r0, #0 \n"
|
" mov r0, #0 \n"
|
||||||
" msr basepri, r0 \n"
|
" msr basepri, r0 \n"
|
||||||
" ldmia sp!, {r3} \n"
|
" ldmia sp!, {r0, r3} \n"
|
||||||
" \n" /* Restore the context. */
|
" \n" /* Restore the context. */
|
||||||
" ldr r1, [r3] \n"
|
" ldr r1, [r3] \n"
|
||||||
" ldr r0, [r1] \n" /* The first item in the TCB is the task top of stack. */
|
" ldr r0, [r1] \n" /* The first item in the TCB is the task top of stack. */
|
||||||
" add r1, r1, #4 \n" /* Move onto the second item in the TCB... */
|
" add r1, r1, #4 \n" /* Move onto the second item in the TCB... */
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* The systick is a 24-bit counter. */
|
/* The systick is a 24-bit counter. */
|
||||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||||
|
@ -242,7 +242,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ void xPortPendSVHandler( void )
|
||||||
" stmdb r0!, {r4-r11, r14} \n" /* Save the core registers. */
|
" stmdb r0!, {r4-r11, r14} \n" /* Save the core registers. */
|
||||||
" str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */
|
" str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */
|
||||||
" \n"
|
" \n"
|
||||||
" stmdb sp!, {r3} \n"
|
" stmdb sp!, {r0, r3} \n"
|
||||||
" mov r0, %0 \n"
|
" mov r0, %0 \n"
|
||||||
" cpsid i \n" /* Errata workaround. */
|
" cpsid i \n" /* Errata workaround. */
|
||||||
" msr basepri, r0 \n"
|
" msr basepri, r0 \n"
|
||||||
|
@ -487,7 +487,7 @@ void xPortPendSVHandler( void )
|
||||||
" bl vTaskSwitchContext \n"
|
" bl vTaskSwitchContext \n"
|
||||||
" mov r0, #0 \n"
|
" mov r0, #0 \n"
|
||||||
" msr basepri, r0 \n"
|
" msr basepri, r0 \n"
|
||||||
" ldmia sp!, {r3} \n"
|
" ldmia sp!, {r0, r3} \n"
|
||||||
" \n"
|
" \n"
|
||||||
" ldr r1, [r3] \n" /* The first item in pxCurrentTCB is the task top of stack. */
|
" ldr r1, [r3] \n" /* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
" ldr r0, [r1] \n"
|
" ldr r0, [r1] \n"
|
||||||
|
|
|
@ -136,7 +136,7 @@ r0p1 port. */
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* The systick is a 24-bit counter. */
|
/* The systick is a 24-bit counter. */
|
||||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||||
|
@ -244,7 +244,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ xPortPendSVHandler:
|
||||||
/* Save the new top of stack into the first member of the TCB. */
|
/* Save the new top of stack into the first member of the TCB. */
|
||||||
str r0, [r2]
|
str r0, [r2]
|
||||||
|
|
||||||
stmdb sp!, {r3}
|
stmdb sp!, {r0, r3}
|
||||||
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
dsb
|
dsb
|
||||||
|
@ -109,7 +109,7 @@ xPortPendSVHandler:
|
||||||
bl vTaskSwitchContext
|
bl vTaskSwitchContext
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
ldmia sp!, {r3}
|
ldmia sp!, {r0, r3}
|
||||||
|
|
||||||
/* The first item in pxCurrentTCB is the task top of stack. */
|
/* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
ldr r1, [r3]
|
ldr r1, [r3]
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* The systick is a 24-bit counter. */
|
/* The systick is a 24-bit counter. */
|
||||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||||
|
@ -238,7 +238,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ xPortPendSVHandler:
|
||||||
/* Save the new top of stack into the first member of the TCB. */
|
/* Save the new top of stack into the first member of the TCB. */
|
||||||
str r0, [r2]
|
str r0, [r2]
|
||||||
|
|
||||||
stmdb sp!, {r3}
|
stmdb sp!, {r0, r3}
|
||||||
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||||
cpsid i
|
cpsid i
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
|
@ -111,7 +111,7 @@ xPortPendSVHandler:
|
||||||
bl vTaskSwitchContext
|
bl vTaskSwitchContext
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
ldmia sp!, {r3}
|
ldmia sp!, {r0, r3}
|
||||||
|
|
||||||
/* The first item in pxCurrentTCB is the task top of stack. */
|
/* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
ldr r1, [r3]
|
ldr r1, [r3]
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* The systick is a 24-bit counter. */
|
/* The systick is a 24-bit counter. */
|
||||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||||
|
@ -257,7 +257,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
@ -483,16 +483,16 @@ void xPortPendSVHandler( void ) iv IVT_INT_PendSV ics ICS_OFF
|
||||||
|
|
||||||
str r0, [r2] /* Save the new top of stack into the first member of the TCB. */
|
str r0, [r2] /* Save the new top of stack into the first member of the TCB. */
|
||||||
|
|
||||||
stmdb sp!, (r3)
|
stmdb sp!, (r0, r3)
|
||||||
ldr r0, =_ucMaxSyscallInterruptPriority
|
ldr r0, =_ucMaxSyscallInterruptPriority
|
||||||
ldr r1, [r0]
|
ldr r1, [r0]
|
||||||
msr basepri, r1
|
msr basepri, r1
|
||||||
dsb
|
dsb
|
||||||
isb
|
isb
|
||||||
bl _vTaskSwitchContext
|
bl _vTaskSwitchContext
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
ldm sp!, (r3)
|
ldm sp!, (r0, r3)
|
||||||
|
|
||||||
ldr r1, [r3] /* The first item in pxCurrentTCB is the task top of stack. */
|
ldr r1, [r3] /* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
ldr r0, [r1]
|
ldr r0, [r1]
|
||||||
|
@ -625,13 +625,13 @@ void xPortSysTickHandler( void ) iv IVT_INT_SysTick ics ICS_AUTO
|
||||||
__asm { "cpsid i" };
|
__asm { "cpsid i" };
|
||||||
__asm { "dsb" };
|
__asm { "dsb" };
|
||||||
__asm { "isb" };
|
__asm { "isb" };
|
||||||
|
|
||||||
/* Disable the SysTick clock without reading the
|
/* Disable the SysTick clock without reading the
|
||||||
portNVIC_SYSTICK_CTRL_REG register to ensure the
|
portNVIC_SYSTICK_CTRL_REG register to ensure the
|
||||||
portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set. Again,
|
portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set. Again,
|
||||||
the time the SysTick is stopped for is accounted for as best it can
|
the time the SysTick is stopped for is accounted for as best it can
|
||||||
be, but using the tickless mode will inevitably result in some tiny
|
be, but using the tickless mode will inevitably result in some tiny
|
||||||
drift of the time maintained by the kernel with respect to calendar
|
drift of the time maintained by the kernel with respect to calendar
|
||||||
time*/
|
time*/
|
||||||
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );
|
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ r0p1 port. */
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* The systick is a 24-bit counter. */
|
/* The systick is a 24-bit counter. */
|
||||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||||
|
@ -252,7 +252,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
@ -503,7 +503,7 @@ __asm void xPortPendSVHandler( void )
|
||||||
/* Save the new top of stack into the first member of the TCB. */
|
/* Save the new top of stack into the first member of the TCB. */
|
||||||
str r0, [r2]
|
str r0, [r2]
|
||||||
|
|
||||||
stmdb sp!, {r3}
|
stmdb sp!, {r0, r3}
|
||||||
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
dsb
|
dsb
|
||||||
|
@ -511,7 +511,7 @@ __asm void xPortPendSVHandler( void )
|
||||||
bl vTaskSwitchContext
|
bl vTaskSwitchContext
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
ldmia sp!, {r3}
|
ldmia sp!, {r0, r3}
|
||||||
|
|
||||||
/* The first item in pxCurrentTCB is the task top of stack. */
|
/* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
ldr r1, [r3]
|
ldr r1, [r3]
|
||||||
|
@ -655,13 +655,13 @@ void xPortSysTickHandler( void )
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
__dsb( portSY_FULL_READ_WRITE );
|
__dsb( portSY_FULL_READ_WRITE );
|
||||||
__isb( portSY_FULL_READ_WRITE );
|
__isb( portSY_FULL_READ_WRITE );
|
||||||
|
|
||||||
/* Disable the SysTick clock without reading the
|
/* Disable the SysTick clock without reading the
|
||||||
portNVIC_SYSTICK_CTRL_REG register to ensure the
|
portNVIC_SYSTICK_CTRL_REG register to ensure the
|
||||||
portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set. Again,
|
portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set. Again,
|
||||||
the time the SysTick is stopped for is accounted for as best it can
|
the time the SysTick is stopped for is accounted for as best it can
|
||||||
be, but using the tickless mode will inevitably result in some tiny
|
be, but using the tickless mode will inevitably result in some tiny
|
||||||
drift of the time maintained by the kernel with respect to calendar
|
drift of the time maintained by the kernel with respect to calendar
|
||||||
time*/
|
time*/
|
||||||
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );
|
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ task.h is included from an application file. */
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000UL )
|
#define portINITIAL_XPSR ( 0x01000000UL )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffdUL )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffdUL )
|
||||||
#define portINITIAL_CONTROL_IF_UNPRIVILEGED ( 0x03 )
|
#define portINITIAL_CONTROL_IF_UNPRIVILEGED ( 0x03 )
|
||||||
#define portINITIAL_CONTROL_IF_PRIVILEGED ( 0x02 )
|
#define portINITIAL_CONTROL_IF_PRIVILEGED ( 0x02 )
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 9; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 9; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
@ -509,8 +509,8 @@ __asm void xPortPendSVHandler( void )
|
||||||
|
|
||||||
mrs r0, psp
|
mrs r0, psp
|
||||||
|
|
||||||
ldr r3, =pxCurrentTCB /* Get the location of the current TCB. */
|
ldr r3, =pxCurrentTCB /* Get the location of the current TCB. */
|
||||||
ldr r2, [r3]
|
ldr r2, [r3]
|
||||||
|
|
||||||
tst r14, #0x10 /* Is the task using the FPU context? If so, push high vfp registers. */
|
tst r14, #0x10 /* Is the task using the FPU context? If so, push high vfp registers. */
|
||||||
it eq
|
it eq
|
||||||
|
@ -520,7 +520,7 @@ __asm void xPortPendSVHandler( void )
|
||||||
stmdb r0!, {r1, r4-r11, r14} /* Save the remaining registers. */
|
stmdb r0!, {r1, r4-r11, r14} /* Save the remaining registers. */
|
||||||
str r0, [r2] /* Save the new top of stack into the first member of the TCB. */
|
str r0, [r2] /* Save the new top of stack into the first member of the TCB. */
|
||||||
|
|
||||||
stmdb sp!, {r3}
|
stmdb sp!, {r0, r3}
|
||||||
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
dsb
|
dsb
|
||||||
|
@ -528,7 +528,7 @@ __asm void xPortPendSVHandler( void )
|
||||||
bl vTaskSwitchContext
|
bl vTaskSwitchContext
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
ldmia sp!, {r3}
|
ldmia sp!, {r0, r3}
|
||||||
/* Restore the context. */
|
/* Restore the context. */
|
||||||
ldr r1, [r3]
|
ldr r1, [r3]
|
||||||
ldr r0, [r1] /* The first item in the TCB is the task top of stack. */
|
ldr r0, [r1] /* The first item in the TCB is the task top of stack. */
|
||||||
|
|
|
@ -136,7 +136,7 @@ is defined. */
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* The systick is a 24-bit counter. */
|
/* The systick is a 24-bit counter. */
|
||||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||||
|
@ -246,7 +246,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ __asm void xPortPendSVHandler( void )
|
||||||
/* Save the new top of stack into the first member of the TCB. */
|
/* Save the new top of stack into the first member of the TCB. */
|
||||||
str r0, [r2]
|
str r0, [r2]
|
||||||
|
|
||||||
stmdb sp!, {r3}
|
stmdb sp!, {r0, r3}
|
||||||
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||||
cpsid i
|
cpsid i
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
|
@ -497,7 +497,7 @@ __asm void xPortPendSVHandler( void )
|
||||||
bl vTaskSwitchContext
|
bl vTaskSwitchContext
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
ldmia sp!, {r3}
|
ldmia sp!, {r0, r3}
|
||||||
|
|
||||||
/* The first item in pxCurrentTCB is the task top of stack. */
|
/* The first item in pxCurrentTCB is the task top of stack. */
|
||||||
ldr r1, [r3]
|
ldr r1, [r3]
|
||||||
|
@ -641,13 +641,13 @@ void xPortSysTickHandler( void )
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
__dsb( portSY_FULL_READ_WRITE );
|
__dsb( portSY_FULL_READ_WRITE );
|
||||||
__isb( portSY_FULL_READ_WRITE );
|
__isb( portSY_FULL_READ_WRITE );
|
||||||
|
|
||||||
/* Disable the SysTick clock without reading the
|
/* Disable the SysTick clock without reading the
|
||||||
portNVIC_SYSTICK_CTRL_REG register to ensure the
|
portNVIC_SYSTICK_CTRL_REG register to ensure the
|
||||||
portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set. Again,
|
portNVIC_SYSTICK_COUNT_FLAG_BIT is not cleared if it is set. Again,
|
||||||
the time the SysTick is stopped for is accounted for as best it can
|
the time the SysTick is stopped for is accounted for as best it can
|
||||||
be, but using the tickless mode will inevitably result in some tiny
|
be, but using the tickless mode will inevitably result in some tiny
|
||||||
drift of the time maintained by the kernel with respect to calendar
|
drift of the time maintained by the kernel with respect to calendar
|
||||||
time*/
|
time*/
|
||||||
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );
|
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT );
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
/* Constants required to set up the initial stack. */
|
/* Constants required to set up the initial stack. */
|
||||||
#define portINITIAL_XPSR ( 0x01000000 )
|
#define portINITIAL_XPSR ( 0x01000000 )
|
||||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||||
|
|
||||||
/* Let the user override the pre-loading of the initial LR with the address of
|
/* Let the user override the pre-loading of the initial LR with the address of
|
||||||
prvTaskExitError() in case it messes up unwinding of the stack in the
|
prvTaskExitError() in case it messes up unwinding of the stack in the
|
||||||
|
@ -169,7 +169,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
/* A save method is being used that requires 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_EXC_RETURN;
|
||||||
|
|
||||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||||
|
|
||||||
|
|
|
@ -90,14 +90,14 @@ _vector_14: .type func
|
||||||
;Save the new top of stack into the first member of the TCB.
|
;Save the new top of stack into the first member of the TCB.
|
||||||
str r0, [r2]
|
str r0, [r2]
|
||||||
|
|
||||||
stmdb sp!, {r3}
|
stmdb sp!, {r0, r3}
|
||||||
ldr.w r0, =ulMaxSyscallInterruptPriorityConst
|
ldr.w r0, =ulMaxSyscallInterruptPriorityConst
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
bl vTaskSwitchContext
|
bl vTaskSwitchContext
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
msr basepri, r0
|
msr basepri, r0
|
||||||
ldmia sp!, {r3}
|
ldmia sp!, {r0, r3}
|
||||||
|
|
||||||
;The first item in pxCurrentTCB is the task top of stack.
|
;The first item in pxCurrentTCB is the task top of stack.
|
||||||
ldr r1, [r3]
|
ldr r1, [r3]
|
||||||
|
|
Loading…
Reference in a new issue