forked from M-Labs/zynq-rs
1
0
Fork 0

abort: support custom exception vector table addr

This commit is contained in:
morgan 2024-03-06 16:00:58 +08:00
parent 5bd336c961
commit b1994dbe16
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,11 @@
use libregister::RegisterR;
use libcortex_a9::{regs::{DFSR, MPIDR}, interrupt_handler};
use libregister::{RegisterR, RegisterW};
use libcortex_a9::{regs::{DFSR, MPIDR, VBAR}, interrupt_handler};
use libboard_zynq::{println, stdio};
pub fn set_vector_table(base_addr: u32){
VBAR.write(base_addr);
}
interrupt_handler!(UndefinedInstruction, undefined_instruction, __irq_stack0_start, __irq_stack1_start, {
stdio::drop_uart();
println!("UndefinedInstruction");

View File

@ -9,7 +9,7 @@ pub extern crate alloc;
pub extern crate compiler_builtins;
pub mod boot;
mod abort;
pub mod abort;
#[cfg(feature = "panic_handler")]
mod panic;
pub mod ram;