blob: c4737dc039e38c73c4ef6095917786dd70b9ae8f [file] [log] [blame]
// Triggers the panic handler. Should print an error message.
#![no_std]
use core::panic::PanicInfo;
use libtock::println;
use libtock::result::TockResult;
use libtock::syscalls;
libtock_core::stack_size! {0x800}
#[libtock::main]
async fn main() -> TockResult<()> {
panic!("Bye world!");
}
#[panic_handler]
unsafe fn panic_handler(_info: &PanicInfo) -> ! {
if let Ok(drivers) = libtock::retrieve_drivers() {
drivers.console.create_console();
println!("panic_handler called");
}
loop {
syscalls::raw::yieldk();
}
}