$HandlerLabel
sub sp,sp,#4 ;decrement sp(to store jump address)
stmfd sp!,{r0} ;PUSH the work register to stack(lr doest push because it return to original address)
ldr r0,=$HandleLabel;load the address of HandleXXX to r0
ldr r0,[r0] ;load the contents(service routine start address) of HandleXXX
str r0,[sp,#4] ;store the contents(ISR) of HandleXXX to stack
ldmfd sp!,{r0,pc} ;POP the work register and pc(jump to ISR)
MEND
然后有一个vector_branch
......
entry
......
VECTOR_BRANCH
......
ldr pc,=HandlerTIMER1
......
HandlerTIMER1 HANDLER HandleTIMER1
然后,在另外的文件isr_address.s中有下面的语句:
AREA ISR_STARTADDRESS, DATA, NOINIT
......
EXPORT HandleTIMER1
......
HandleTIMER1 SPACE 4
......
END