I try to test the interrupt handler and wrote the code and only run on the arm core:
_c_int00:
ldr r0, stack
mov sp, r0
mov r0, #512
add sp, sp, r0
svc #123
.sect ".intvects"
.retain ".intvects"
Vecs:
; b _c_int00 ; Reset Handler
b Undefined_Handler ; Undefined
b SWI_Handler ; Software Interrupt (SWI)
b Prefetch_Handler ; Prefetch abort
b Abort_Handler ; Data abort
.word 0 ; unsued
b IRQ_Handler ; IRQ
b FIQ_Handler ; FIQ
When the code runs to svc, it should trigger a Software Interrupt and go to SWI_Handler, but the program stopped after svc command and shows the following message, when I press "Assembly Step Over" button, it will jump to the SWI_Handler. What does the message mean? Is it a error message?
My question is, why the program will stop, and can not directly jump to SWI_Handler? Or something wrong with the Interrupt vector table?
In the CMD file, interrupts vector defined as .intvects > 0x4020FFC8 according TRM, which shows:
" These instructions are executed when an exception occurs, because they are called from ROM exception vectors. By default, all exceptions are redirected to the exception dead loops. Users can redirect an exception to another handler by writing its address to the appropriate position from 0x4020FFE4 to 0x4020FFFC, or by overriding instructions between addresses from 0x4020FFC8 to 0x4020FFE0. "
Best Regards
Zhiwen
