jovicks
jovicks

Reputation: 95

Where is the Reset_Addr, Undef_Addr etc. defined in ARM7?

I am experimenting with the ARM7TDMI-s in LPC2119 and trying to figure out what is in the startup.s code to understand the vector interrupt system.

I have this curiosity where the labels like Reset_Addr and SWI_Addr are defined because they are not in the same file and neither in the header.

; Exception Vectors
;  Mapped to Address 0.
;  Absolute addressing mode must be used.
;  Dummy Handlers are implemented as infinite loops which can be modified.

Vectors         LDR     PC, Reset_Addr         
                LDR     PC, Undef_Addr
                LDR     PC, SWI_Addr
                LDR     PC, PAbt_Addr
                LDR     PC, DAbt_Addr
                NOP                            ; Reserved Vector 
;               LDR     PC, IRQ_Addr
                LDR     PC, [PC, #-0x0FF0]     ; Vector from VicVectAddr
                LDR     PC, FIQ_Addr

Reset_Addr      DCD     Reset_Handler
Undef_Addr      DCD     Undef_Handler
SWI_Addr        DCD     SWI_Handler
PAbt_Addr       DCD     PAbt_Handler
DAbt_Addr       DCD     DAbt_Handler
                DCD     0                      ; Reserved Address 
IRQ_Addr        DCD     IRQ_Handler
FIQ_Addr        DCD     FIQ_Handler

Undef_Handler   B       Undef_Handler
SWI_Handler     B       SWI_Handler
PAbt_Handler    B       PAbt_Handler
DAbt_Handler    B       DAbt_Handler
IRQ_Handler     B       IRQ_Handler
FIQ_Handler     B       FIQ_Handler

Appreciate any help.

thanks

Upvotes: 1

Views: 315

Answers (1)

scottt
scottt

Reputation: 7248

  • I think you're just confused by armasm syntax.
  • Reset_Addr is a label and is defined simply by placing its name in the first column. i.e. Reset_Addr is defined by:

Reset_Addr DCD Reset_Handler

Upvotes: 2

Related Questions