各位高手,小弟基于友善之臂的MINI6410开发板编写裸板定时器中断程序。将裸板程序复制到SD卡中,设置开发板模式为SD卡启动。运行发现:系统未跳转到IRQ异常向量处执行。请教其中的原因。谢谢!启动文件内容如下:
.text
.globl _start
_start:
b reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
ldr pc, _data_abort
ldr pc, _not_used
ldr pc, _irq
ldr pc, _fiq
_undefined_instruction:
.wordundefined_instruction
_software_interrupt:
.wordsoftware_interrupt
_prefetch_abort:
.wordprefetch_abort
_data_abort:
.worddata_abort
_not_used:
.wordnot_used
_irq:
.wordirq
_fiq:
.wordfiq
_pad:
.word0x12345678 /* now 16*4=64 */
reset:
ldrr0 , =0x7e004000
movr1 , #0x0
strr1 , [r0]
/*复制中断向量表至0x0*/
movr8 , #0
adrr9 , _start
ldmiar9! , {r0-r7}
stmiar8! , {r0-r7}
ldmiar9! , {r0-r7}
stmiar8! , {r0-r7}
ldrsp, =1024*4
blmain
/*
* exception handlers
*/
.align 5
undefined_instruction:
ldrr0, =0x7f008800
ldrr1, =0x11110000
strr1, [r0]
ldrr0, =0x7f008808
ldrr1, =0x0
strr1, [r0]
bl do_undefined_instruction
.align 5
software_interrupt:
ldrr0, =0x7f008800
ldrr1, =0x11110000
strr1, [r0]
ldrr0, =0x7f008808
ldrr1, =0x0
strr1, [r0]
bl do_software_interrupt
.align 5
prefetch_abort:
ldrr0, =0x7f008800
ldrr1, =0x11110000
strr1, [r0]
ldrr0, =0x7f008808
ldrr1, =0x0
strr1, [r0]
bl do_prefetch_abort
.align 5
data_abort:
ldrr0, =0x7f008800
ldrr1, =0x11110000
strr1, [r0]
ldrr0, =0x7f008808
ldrr1, =0x0
strr1, [r0]
bl do_data_abort
.align 5
not_used:
ldrr0, =0x7f008800
ldrr1, =0x11110000
strr1, [r0]
ldrr0, =0x7f008808
ldrr1, =0x0
strr1, [r0]
bl do_not_used
.globlirq
/*importc_irq_handler*/
.align 5
irq:
ldrr0, =0x7f008800
ldrr1, =0x11110000
strr1, [r0]
ldrr0, =0x7f008808
ldrr1, =0x0
strr1, [r0]
/*stmfdsp!, {r0-r12, lr} ;保存现场 */
bl c_irq_handler
/*调用中断处理子程序*/
/*ldmfdsp!, {r0-r12, lr} ;恢复现场*/
/*subspc, lr, #4*/
/*END*/
.align 5
fiq:
ldrr0, =0x7f008800
ldrr1, =0x11110000
strr1, [r0]
ldrr0, =0x7f008808
ldrr1, =0x0
strr1, [r0]
bl do_fiq |