PendSV_Handler
CPSID I
MRS R0, PSP
CBZ R0, PendSV_Handler_Nosave ;compare and branch if zero.
SUBS R0, R0, #0x20
STM R0, {R4-R11}
LDR R1, =OSTCBCur
LDR R1, [R1]
STR R0, [R1]
PendSV_Handler_Nosave
PUSH {R14}
LDR R0, =OSTaskSwHook
BLX R0
POP {R14}
LDR R0, =OSPrioCur
LDR R1, =OSPrioHighRdy
LDRB R2, [R1]
STRB R2, [R0]
LDR R0, =OSTCBCur
LDR R1, =OSTCBHighRdy
LDR R2, [R1]
STR R2, [R0]
LDR R0, [R2]
LDM R0, {R4-R11}
ADDS R0, R0, #0x20
MSR PSP, R0
ORR LR, LR, #0x04
CPSIE I
BX LR
这是将 uc/OS-II 移植到 STM32F103,os_cpu_a.asm 中的一段
第4行如果PSP==0,那么就会跳转到 PendSV_Handler_Nosave
我想知道,PendSV_Handler_Nosave 完了之后会返回到第5行继续吗?
它末尾不是有一个 BX LR 么?不理解这个 BX LR 是什么意思
谢谢~