mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-05-05 10:09:08 +00:00
14 lines
271 B
Rust
14 lines
271 B
Rust
#![no_std]
|
|
|
|
use core::panic::PanicInfo;
|
|
|
|
use cortex_m::asm;
|
|
|
|
#[panic_handler]
|
|
fn panic(info: &PanicInfo) -> ! {
|
|
defmt::error!("{}", defmt::Debug2Format(&info));
|
|
|
|
// abort instruction: triggers a HardFault exception which causes probe-run to exit
|
|
asm::udf()
|
|
}
|