vectors.s

来自「ARM7下的UC0S原代码」· S 代码 · 共 60 行

S
60
字号
	IMPORT IRQHandler       
	AREA Vect, CODE, READONLY

; These exception vectors and dummy exception handlers will be
; relocated at start-up from FLASH to 32bitRAM at address 0

; *****************
; Exception Vectors
; *****************

        LDR     PC, Reset_Addr
        NOP
        NOP
        NOP
        NOP
        NOP                             ; Reserved vector
        LDR     PC, IRQ_Addr
        LDR     PC, FIQ_Addr        
        IMPORT  Start_Boot              ; In boot.s
        
Reset_Addr      DCD     Start_Boot
Undefined_Addr  DCD     Undefined_Handler
SWI_Addr        DCD     SWI_Handler
Prefetch_Addr   DCD     Prefetch_Handler
Abort_Addr      DCD     Abort_Handler
                DCD     0               ; Reserved vector
IRQ_Addr        DCD     IRQ_Handler
FIQ_Addr        DCD     FIQ_Handler


; ************************
; Dummy Exception Handlers
; ************************
; The following handlers do not do anything useful in this example.
; They are set up here for completeness.

Undefined_Handler
        mov pc,lr
SWI_Handler
        mov pc,lr
    
Prefetch_Handler
       mov pc,lr

Abort_Handler
      mov pc,lr

IRQ_Handler
	LDR	r0,=0x01
	LDR	r2,=0x3ff5000
	STR	r0,[r2]
	LDR	R2,=0x3ff5008
	STR	r0,[r2]
        mov pc,lr

FIQ_Handler
       mov pc,lr        
        END

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?