想问一下工程中的中断向量表在哪里查看,还有就是怎么自己在工程中编写并加载中断向量表。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
想问一下工程中的中断向量表在哪里查看,还有就是怎么自己在工程中编写并加载中断向量表。
工程中的中断向量表是你自己要编写和添加的,见下面intvecs.asm文件,是timer中断向量表例子。
;*-----------------------------------------------------------------------------
;* Project: TIMER_interrupt_dspL138
;* File: intvecs.asm
;*
;*-----------------------------------------------------------------------------
;*
;* intvecs.asm
;* -----------
;*
;* Description:
;* This file includes a generic setup to map the DSP interrupt service
;* table (IST) to the corresponding interrupt service routines (ISR).
;*
;*-----------------------------------------------------------------------------
; Global symbols defined here
.global _intcVectorTable
.global _c_int00
.global _TIMER0_12_isr
;******************************************************************************
;* VEC_ENTRY: Macro that instantiates one entry in the interrupt service table.
;******************************************************************************
VEC_ENTRY .macro addr
STW B0,*--B15
MVKL addr,B0
MVKH addr,B0
B B0
LDW *B15++,B0
NOP 2
NOP
NOP
.endm
;******************************************************************************
;* vec_dummy: Dummy interrupt service routine used to initialize the IST.
;******************************************************************************
_vec_dummy:
B B3
NOP 5
;***************************************************************************************
;* Map interrupt service table (IST) to corresponding interrupt service routines (ISR)
;***************************************************************************************
.sect ".vecs"
.align 1024
_intcVectorTable:
_vector0: VEC_ENTRY _c_int00 ;RESET
_vector1: VEC_ENTRY _vec_dummy ;NMI
_vector2: VEC_ENTRY _vec_dummy ;RSVD
_vector3: VEC_ENTRY _vec_dummy ;RSVD
_vector4: VEC_ENTRY _TIMER0_12_isr ;DSP Maskable INT4 : Mapped to func 'TIMER0_12_isr'
_vector5: VEC_ENTRY _vec_dummy ;DSP Maskable INT5 : Empty
_vector6: VEC_ENTRY _vec_dummy ;DSP Maskable INT6 : Empty
_vector7: VEC_ENTRY _vec_dummy ;DSP Maskable INT7 : Empty
_vector8: VEC_ENTRY _vec_dummy ;DSP Maskable INT8 : Empty
_vector9: VEC_ENTRY _vec_dummy ;DSP Maskable INT9 : Empty
_vector10: VEC_ENTRY _vec_dummy ;DSP Maskable INT10: Empty
_vector11: VEC_ENTRY _vec_dummy ;DSP Maskable INT11: Empty
_vector12: VEC_ENTRY _vec_dummy ;DSP Maskable INT12: Empty
_vector13: VEC_ENTRY _vec_dummy ;DSP Maskable INT13: Empty
_vector14: VEC_ENTRY _vec_dummy ;DSP Maskable INT14: Empty
_vector15: VEC_ENTRY _vec_dummy ;DSP Maskable INT15: Empty
能解释下这段汇编是什么意思吗?
;* VEC_ENTRY: Macro that instantiates one entry in the interrupt service table. ;****************************************************************************** VEC_ENTRY .macro addr STW B0,*--B15 MVKL addr,B0 MVKH addr,B0 B B0 LDW *B15++,B0 NOP 2 NOP NOP .endm ;****************************************************************************** ;* vec_dummy: Dummy interrupt service routine used to initialize the IST. ;****************************************************************************** _vec_dummy: B B3 NOP 5