Adds justfile to build everything
This commit is contained in:
21
user/test_pic/src/main.rs
Normal file
21
user/test_pic/src/main.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(_panic_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn entry() {
|
||||
let test = "Hello from user mode";
|
||||
unsafe {
|
||||
core::arch::asm!(
|
||||
"ecall",
|
||||
in("a0") 999,
|
||||
in("a1") test.as_ptr(),
|
||||
in("a2") test.len(),
|
||||
clobber_abi("system")
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user