mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Setup to work with both ARM and THUMB modes.
This commit is contained in:
parent
8347299546
commit
cf638edfaf
|
@ -55,17 +55,15 @@
|
||||||
EXPORT vPortYieldProcessor
|
EXPORT vPortYieldProcessor
|
||||||
EXPORT vPortStartFirstTask
|
EXPORT vPortStartFirstTask
|
||||||
EXPORT vPreemptiveTick
|
EXPORT vPreemptiveTick
|
||||||
|
EXPORT vPortYield
|
||||||
|
|
||||||
|
|
||||||
VICVECTADDR EQU 0xFFFFF030
|
VICVECTADDR EQU 0xFFFFF030
|
||||||
T0IR EQU 0xE0004000
|
T0IR EQU 0xE0004000
|
||||||
T0MATCHBIT EQU 0x00000001
|
T0MATCHBIT EQU 0x00000001
|
||||||
|
|
||||||
|
|
||||||
ARM
|
ARM
|
||||||
AREA PORT_ASM, CODE, READONLY
|
AREA PORT_ASM, CODE, READONLY
|
||||||
PRESERVE8
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,8 +72,17 @@ T0MATCHBIT EQU 0x00000001
|
||||||
; setup by pxPortInitialiseStack
|
; setup by pxPortInitialiseStack
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
vPortStartFirstTask
|
vPortStartFirstTask
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
portRESTORE_CONTEXT
|
portRESTORE_CONTEXT
|
||||||
|
|
||||||
|
vPortYield
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
|
SVC 0
|
||||||
|
bx lr
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; Interrupt service routine for the SWI interrupt. The vector table is
|
; Interrupt service routine for the SWI interrupt. The vector table is
|
||||||
|
@ -87,6 +94,8 @@ vPortStartFirstTask
|
||||||
|
|
||||||
vPortYieldProcessor
|
vPortYieldProcessor
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
; Within an IRQ ISR the link register has an offset from the true return
|
; Within an IRQ ISR the link register has an offset from the true return
|
||||||
; address, but an SWI ISR does not. Add the offset manually so the same
|
; address, but an SWI ISR does not. Add the offset manually so the same
|
||||||
; ISR return code can be used in both cases.
|
; ISR return code can be used in both cases.
|
||||||
|
@ -109,6 +118,9 @@ vPortYieldProcessor
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
vPreemptiveTick
|
vPreemptiveTick
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
portSAVE_CONTEXT ; Save the context of the current task.
|
portSAVE_CONTEXT ; Save the context of the current task.
|
||||||
|
|
||||||
LDR R0, =vTaskIncrementTick ; Increment the tick count.
|
LDR R0, =vTaskIncrementTick ; Increment the tick count.
|
||||||
|
|
|
@ -110,7 +110,8 @@ extern void vTaskSwitchContext(void); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
|
||||||
#define portYIELD() __asm{ SVC 0 }
|
extern void vPortYield( void );
|
||||||
|
#define portYIELD() vPortYield()
|
||||||
|
|
||||||
|
|
||||||
/* Critical section management. */
|
/* Critical section management. */
|
||||||
|
|
Loading…
Reference in a new issue