forked from M-Labs/zynq-rs
abort: support custom exception vector table addr
This commit is contained in:
parent
5bd336c961
commit
b1994dbe16
|
@ -1,6 +1,10 @@
|
||||||
use libregister::RegisterR;
|
use libregister::{RegisterR, RegisterW};
|
||||||
use libcortex_a9::{regs::{DFSR, MPIDR}, interrupt_handler};
|
use libcortex_a9::{regs::{DFSR, MPIDR, VBAR}, interrupt_handler};
|
||||||
use libboard_zynq::{println, stdio};
|
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, {
|
interrupt_handler!(UndefinedInstruction, undefined_instruction, __irq_stack0_start, __irq_stack1_start, {
|
||||||
stdio::drop_uart();
|
stdio::drop_uart();
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub extern crate alloc;
|
||||||
pub extern crate compiler_builtins;
|
pub extern crate compiler_builtins;
|
||||||
|
|
||||||
pub mod boot;
|
pub mod boot;
|
||||||
mod abort;
|
pub mod abort;
|
||||||
#[cfg(feature = "panic_handler")]
|
#[cfg(feature = "panic_handler")]
|
||||||
mod panic;
|
mod panic;
|
||||||
pub mod ram;
|
pub mod ram;
|
||||||
|
|
Loading…
Reference in New Issue