Andes Workshop

It is currently Fri Jun 30, 2017 1:05 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How to re-direct vector table
PostPosted: Tue Feb 10, 2015 12:07 pm 
Offline

Joined: Wed Apr 13, 2011 7:44 pm
Posts: 23
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.
Attachment:
demo-int_NEWJump210.zip [217.59 KiB]
Downloaded 104 times
Note:
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.

Attachment:
re-direct IVB.jpg
re-direct IVB.jpg [ 52.54 KiB | Viewed 1581 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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group