以下是uc/os-II在iar for arm 上的OS_CUP_A.asm文件的一段,是针对于cortex M3的。我有几个问题 1,为什么要在尾部定义__OS_Running: .long OSRunning 啊(指针)?不能直接对OSRunning等寻址吗? 2,如果一定要重新这样定义,怎么样移植到keil(RV) 中啊?
.extern OSRunning // ; External references .EXTERN OSPrioCur .EXTERN OSPrioHighRdy .EXTERN OSTCBCur .EXTERN OSTCBHighRdy .EXTERN OSIntNesting .EXTERN OSIntExit .EXTERN OSTaskSwHook
. . . . . .
OSStartHighRdy:
LDR R4, =NVIC_SYSPRI2 LDR R5, =NVIC_PENDSV_PRI STR R5, [R4] MOV R4, #0 MSR psp, R4 LDR R4, __OS_Running //通过 __OS_Running访问OSRunning MOV R5, #1 STRB R5, [R4]
LDR R4, =NVIC_INT_CTRL LDR R5, =NVIC_PENDSVSET STR R5, [R4]
CPSIE I . . . . . .
.DATA
__OS_TaskSwHook: .word OSTaskSwHook
__OS_IntExit: .long OSIntExit
__OS_IntNesting: .long OSIntNesting
__OS_PrioCur: .long OSPrioCur
__OS_PrioHighRdy: .long OSPrioHighRdy
__OS_Running: .long OSRunning
__OS_TCBCur: .long OSTCBCur
__OS_TCBHighRdy: .long OSTCBHighRdy
.END
|