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

Compare commits

...

2 Commits

3 changed files with 10 additions and 5 deletions

View File

@ -39,7 +39,7 @@ use libcortex_a9::{
};
use libregister::{RegisterR, RegisterW};
use libsupport_zynq::{
boot, ram,
abort, boot, ram,
};
use log::{info, warn};
use core::sync::atomic::{AtomicBool, Ordering};
@ -96,6 +96,7 @@ pub fn restart_core1() {
#[no_mangle]
pub fn main_core0() {
abort::set_vector_table(0x0);
// zynq::clocks::CpuClocks::enable_io(1_250_000_000);
enable_l2_cache(0x8);
println!("\nZynq experiments");

View File

@ -1,6 +1,10 @@
use libregister::RegisterR;
use libcortex_a9::{regs::{DFSR, MPIDR}, interrupt_handler};
use libboard_zynq::{println, stdio};
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();

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;