1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[alloc_error_handler]
fn alloc_error_handler(_layout: core::alloc::Layout) -> ! {
    panic!("OOM! memory allocation of {} bytes failed", _layout.size())
}

#[panic_handler]
pub fn panic_handler(_info: &core::panic::PanicInfo<'_>) -> ! {
    error!("RMM: {}", _info);
    halt()
}

pub fn halt() -> ! {
    loop {}
}