Better user programs with a special std. Sleep and exit are calling scheduler instead of wfi.

This commit is contained in:
2026-02-21 18:29:27 +01:00
parent 235f17e7cf
commit 8a8034bd11
25 changed files with 263 additions and 210 deletions

View File

@@ -1,21 +1,11 @@
#![no_std]
#![no_main]
os_std::custom_std_setup! {}
#[panic_handler]
fn panic(_panic_info: &core::panic::PanicInfo) -> ! {
loop {}
}
use os_std::syscall::write_string_temp;
#[unsafe(no_mangle)]
pub extern "C" fn entry() {
let test = "Hello from PIC program loaded dynamically";
unsafe {
core::arch::asm!(
"ecall",
in("a0") 999,
in("a1") test.as_ptr(),
in("a2") test.len(),
clobber_abi("system")
);
}
fn main() {
write_string_temp(
"Hello from PIC program loaded dynamically with custom std and a better justfile, and syscalls !",
);
}