vexriscv: use upstream package
Use this package rather than the local xous-riscv package. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use crate::definitions::XousError;
|
||||
use crate::filled_array;
|
||||
use xous_riscv::register::{mstatus, vmim};
|
||||
use vexriscv::register::{mstatus, vmim};
|
||||
|
||||
static mut IRQ_HANDLERS: [Option<fn(usize)>; 32] = filled_array![None; 32];
|
||||
|
||||
|
12
src/lib.rs
12
src/lib.rs
@ -1,12 +0,0 @@
|
||||
#![no_std]
|
||||
|
||||
extern crate xous_riscv;
|
||||
|
||||
// use core::panic::PanicInfo;
|
||||
// #[panic_handler]
|
||||
// fn handle_panic(_arg: &PanicInfo) -> ! {
|
||||
// loop {}
|
||||
// }
|
||||
|
||||
// Allow consumers of this library to make syscalls
|
||||
// pub mod syscalls;
|
@ -1,7 +1,7 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
extern crate xous_riscv;
|
||||
extern crate vexriscv;
|
||||
mod definitions;
|
||||
mod irq;
|
||||
mod macros;
|
||||
@ -13,7 +13,7 @@ pub use irq::sys_interrupt_claim;
|
||||
|
||||
use core::panic::PanicInfo;
|
||||
use xous_kernel_riscv_rt::xous_kernel_entry;
|
||||
use xous_riscv::register::{mcause, mstatus, mie, vmim, vmip};
|
||||
use vexriscv::register::{mcause, mstatus, mie, vmim, vmip};
|
||||
use mem::MemoryManager;
|
||||
use processtable::ProcessTable;
|
||||
|
||||
@ -39,6 +39,7 @@ fn xous_main() -> ! {
|
||||
}
|
||||
let mut mm = MemoryManager::new();
|
||||
let mut pt = ProcessTable::new(&mut mm);
|
||||
|
||||
sys_interrupt_claim(2, |_| {
|
||||
let uart_ptr = 0xE000_1800 as *mut usize;
|
||||
print_str(uart_ptr, "hello, world!\r\n");
|
||||
@ -59,7 +60,7 @@ fn xous_main() -> ! {
|
||||
print_str(uart_ptr, "greetings!\r\n");
|
||||
|
||||
loop {
|
||||
unsafe { xous_riscv::asm::wfi() };
|
||||
unsafe { vexriscv::asm::wfi() };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::definitions::{XousError, XousPid, MemoryAddress};
|
||||
use core::num::NonZeroUsize;
|
||||
use xous_riscv::register::mstatus;
|
||||
use vexriscv::register::mstatus;
|
||||
|
||||
const FLASH_START: usize = 0x20000000;
|
||||
const FLASH_SIZE: usize = 16_777_216;
|
||||
|
Reference in New Issue
Block a user