⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vectors.s

📁 motorola 针对coldfire 5275 评估板的Dbug bootloader源程序
💻 S
字号:
    #
    # File:     vectors.s
    #
    # Purpose:  Exception vectors for MPC8XX dBUG
    #
    #
    # Modificiations:
    #
    #

    # Globally accessible symbols
    .global VECTOR_TABLE

    .extern asm_startmeup
    .extern asm_exception_body
    .extern asm_isr_handler
    .extern dbug_sc_handler

    .text

    #
    # This is the vector table for the MPC8XX.  It is placed here so that it
    # can be in a FLASH/ROM at bootup to initialize the system.  All of the
    # exceptions use a generic "exception header" before branching to the
    # actual handler.
    #
    # This file MUST be the first file linked in order for this code to be
    # ROM-able.
    #
vector:     .macro  NUM,HANDLER
exception_\1:
    mtspr   sprg0,r31           # save r31 in exception register 0
    mfspr   r31,lr              # save LR in exception register 1
    mtspr   sprg1,r31
    bl      next\1
next\1:
    mfspr   r31,lr
    rlwinm  r31,r31,0,0,23
    lwz     r31,vect\1-exception_\1(r31)
    mtspr   lr,r31
    bclrl   20,0                # branch to asm_exception_body
vect\1:
    dc.l    HANDLER
    ds.l    64-((.-exception_\1)>>2)
            .endm


VECTOR_TABLE:

vector  0000,asm_exception_body     # reserved
vector  0100,asm_startmeup          # hard reset
vector  0200,asm_exception_body     # machine check
vector  0300,asm_exception_body     # data access
vector  0400,asm_exception_body     # instruction access
vector  0500,asm_isr_handler        # external interrupt
vector  0600,asm_exception_body     # alignment
vector  0700,asm_exception_body     # program
vector  0800,asm_exception_body     # floating-point unavail
vector  0900,asm_isr_handler        # decrementer
vector  0A00,asm_exception_body     # reserved
vector  0B00,asm_exception_body     # reserved
vector  0C00,dbug_sc_handler        # system call
vector  0D00,asm_exception_body     # trace
vector  0E00,asm_exception_body     # floating point assist
vector  0F00,asm_exception_body     # reserved
vector  1000,asm_exception_body     # software emulation
vector  1100,asm_exception_body     # instruction tlb miss
vector  1200,asm_exception_body     # data tlb miss
vector  1300,asm_exception_body     # instruction tlb error
vector  1400,asm_exception_body     # data tlb error
vector  1500,asm_exception_body     # reserved
vector  1600,asm_exception_body     # reserved
vector  1700,asm_exception_body     # reserved
vector  1800,asm_exception_body     # reserved
vector  1900,asm_exception_body     # reserved
vector  1A00,asm_exception_body     # reserved
vector  1B00,asm_exception_body     # reserved
vector  1C00,asm_exception_body     # data breakpoint
vector  1D00,asm_exception_body     # instruction breakpoint
vector  1E00,asm_exception_body     # peripheral breakpoint
vector  1F00,asm_exception_body     # development port

######################################################################

    .end

⌨️ 快捷键说明

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