Andes Workshop http://forum.andestech.com/ |
|
Sample Code of IVB Changing http://forum.andestech.com/viewtopic.php?f=16&t=894 |
Page 1 of 1 |
Author: | HuJin [ Sat Oct 11, 2014 7:07 pm ] |
Post subject: | Sample Code of IVB Changing |
User may want to change IVBASE when the system has booted up and enter into normal stage. Here is an example demo (built on demo-int) to show how to do it. As: Step1: Add new vector table in crt0.S. Attachment: pic1.png [ 16.22 KiB | Viewed 13495 times ] Step2: Implement new ISR in interrupt.c Attachment: pic2.png [ 21.15 KiB | Viewed 13495 times ] Step3: Place the new vector table to the new IVBBASE,create a user section and fix the address in sag file. Attachment: pic3.png [ 13.53 KiB | Viewed 13495 times ] Step4: Modify the system header file to enable new vector table and new ISR.( In this demo, we only modify N968A 4GB IVIC related code). Step5:Change IVBASE (ir3) in main function. Attachment: pic4.png [ 13.51 KiB | Viewed 13495 times ] Now we can run this demo on simulator or EVB, the result shows when timer1 interrupt occurs, it will go to new timer1's ISR. Attachment: The demo code is attached. Attachment:
|
Page 1 of 1 | All times are UTC + 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |