Hello,
In my current project I need to implement a transition from bootloader to application platform which is a data loadable software. When transition I need to update exception vector located at 0x0000 address.
The exception vector table in the boot loader looks something like this below:
resetEntry
b c_int00
undefEntry
b UndefinedException_Handler
svcEntry
b SVC
prefetchEntry
b PrefetchException_Handler
dataEntry
b dataAbortHandler
reservedEntry
b reservedEntry
ldr pc,[pc,#-0x1b0] ; IRQ
ldr pc,[pc,#-0x1b0] ; FIQ
I am trying to update on transition to application platform as below:
my new vector table of platform:
.global resetEntry
resetEntry:
b resetEntry
;undefEntry
b Handler_UndefinedException
;svcEntry
b soft_int
;prefetchEntry
b Handler_PrefetchException
;dataEntry
b dataAbortHandler
;reservedEntry
b Handler_ReservedEntryException
ldr pc,[pc,#-0x1b0] ; IRQ
ldr pc,[pc,#-0x1b0] ; FIQ
New setup function to update the vector table.
__resetEntry:
.word resetEntry
.def _Vector_Setup
; Save return location
cpy r12, r13
push {r11-r12,r14,pc}
sub r11, r12, #0x4
ldr r0, __resetEntry ; Get the start vector address
mcr p15, #0, r0, c12, c0, #0 ; Copy it to the vector base register
When I try this i get undefined exception, is there something wrong in my code or is not possible to update exception vector using above instructio.
I am working on TMS570LC43x micro controller cortex R5 core.
Thanks,
Nagaraj Hegde