2019-12-18 06:35:58 +08:00
|
|
|
use libboard_zynq::{slcr, print, println};
|
2019-11-11 09:37:06 +08:00
|
|
|
|
|
|
|
#[panic_handler]
|
|
|
|
fn panic(info: &core::panic::PanicInfo) -> ! {
|
2019-12-17 07:27:20 +08:00
|
|
|
print!("panic at ");
|
|
|
|
if let Some(location) = info.location() {
|
|
|
|
print!("{}:{}:{}", location.file(), location.line(), location.column());
|
|
|
|
} else {
|
|
|
|
print!("unknown location");
|
|
|
|
}
|
|
|
|
if let Some(message) = info.message() {
|
|
|
|
println!(": {}", message);
|
|
|
|
} else {
|
|
|
|
println!("");
|
|
|
|
}
|
2019-11-11 09:37:06 +08:00
|
|
|
|
|
|
|
loop {}
|
|
|
|
}
|