;/*\r
-; FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+; FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
; All rights reserved\r
;\r
;\r
.global vPortEnableVFP\r
.global ulPortSetInterruptMask\r
.global vPortClearInterruptMask\r
- \r
+\r
;-----------------------------------------------------------\r
\r
.section .text\r
_vector_14: .type func\r
\r
mrs r0, psp\r
+ isb\r
\r
;Get the location of the current TCB.\r
ldr.w r3, =pxCurrentTCB\r
;Save the new top of stack into the first member of the TCB.\r
str r0, [r2]\r
\r
- stmdb sp!, {r3, r14}\r
+ stmdb sp!, {r3}\r
ldr.w r0, =ulMaxSyscallInterruptPriorityConst\r
+ ldr r0, [r0]\r
msr basepri, r0\r
bl vTaskSwitchContext\r
mov r0, #0\r
msr basepri, r0\r
- ldmia sp!, {r3, r14}\r
+ ldmia sp!, {r3}\r
\r
;The first item in pxCurrentTCB is the task top of stack.\r
ldr r1, [r3]\r
vldmiaeq r0!, {s16-s31}\r
\r
msr psp, r0\r
+ isb\r
bx r14\r
\r
.size _vector_14, $-_vector_14\r
_lc_ref__vector_pp_14: .type func\r
\r
mrs r0, psp\r
+ isb\r
\r
;Get the location of the current TCB.\r
ldr.w r3, =pxCurrentTCB\r
;Save the new top of stack into the first member of the TCB.\r
str r0, [r2]\r
\r
- stmdb sp!, {r3, r14}\r
+ stmdb sp!, {r3}\r
ldr.w r0, =ulMaxSyscallInterruptPriorityConst\r
+ ldr r0, [r0]\r
msr basepri, r0\r
bl vTaskSwitchContext\r
mov r0, #0\r
msr basepri, r0\r
- ldmia sp!, {r3, r14}\r
+ ldmia sp!, {r3}\r
\r
;The first item in pxCurrentTCB is the task top of stack.\r
ldr r1, [r3]\r
vldmiaeq r0!, {s16-s31}\r
\r
msr psp, r0\r
+ isb\r
push { lr }\r
pop { pc } ; XMC4000 specific errata workaround. Do not used "bx lr" here.\r
\r
;Pop the core registers.\r
ldmia r0!, {r4-r11, r14}\r
msr psp, r0\r
+ isb\r
mov r0, #0\r
msr basepri, r0\r
bx r14\r
msr msp, r0\r
;Call SVC to start the first task.\r
cpsie i\r
+ cpsie f\r
+ dsb\r
+ isb\r
svc 0\r
.size vPortStartFirstTask, $-vPortStartFirstTask\r
.endsec\r
ulPortSetInterruptMask:\r
mrs r0, basepri\r
ldr.w r1, =ulMaxSyscallInterruptPriorityConst\r
+ ldr r1, [r1]\r
msr basepri, r1\r
bx r14\r
.size ulPortSetInterruptMask, $-ulPortSetInterruptMask\r
;-----------------------------------------------------------\r
\r
.end\r
- \r
+\r