|How to re-direct vector table
|Page 1 of 1|
|Author:||ianfeng [ Tue Feb 10, 2015 12:07 pm ]|
|Post subject:||How to re-direct vector table|
Andes N705's IVB (Interruption Vector Base) can not be changed, and usually it is stored in ROM.
If you need to modify the contain in running time, you may re-direct it to flash.
This is a AndeSight demo project to re-direct vector table.
AndeSight version: AndeSight v2.1.0
Target Platform: XC7 with N705+AE210P netlist.
demo-int_NEWJump210.zip [217.59 KiB]Note:
Downloaded 412 times
This project is modified from "demo-int" project, and timer and GPIO interrupt are not enabled.
This project does NOT implement re-direct for all exceptions.
re-direct IVB.jpg [ 52.54 KiB | Viewed 6715 times ]
Check "nes32-ae210p.sag/.ld" for memory arrangement.
If exception happen in ROM, it jump to handler in ROM.
If exception happen in flash, it jump to handler in flash.
For example, system call run in line 130 of "main.c" file will jump to "syscall_handler()" in "main.c" file.
General exception happen in line 84 of "newmain.c" file will jump to "new_error_exception_handler()" in "newmain.c" file.
It uses $IPC register to check then jump to ROM or flash.
The source code to check $IPC and jump are in crt0.S file.
Please search the keyword JUMP_VALUE.
There are two vector tables and handler codes separately in "crt0.S" and "newcrt0.S" file.
The symbols in the two files must be the same.
Because the address to jump to flash is addition by $IPC and JUMP_VALUE.
|Page 1 of 1||All times are UTC + 8 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group