panic_reset/lib.rs
1//! Set the panicking behavior to reset
2//!
3//! This crate contains an implementation of `panic_fmt` that simply reset the chip.
4//!
5//! # Usage
6//!
7//! ``` ignore
8//! #![no_std]
9//!
10//! use panic_reset as _;
11//!
12//! fn main() {
13//! panic!("argument is ignored");
14//! }
15//! ```
16//!
17//! # Breakable symbols
18//!
19//! With the panic handler being `#[inline(never)]` the symbol `rust_begin_unwind` will be
20//! available to place a breakpoint on to halt when a panic is happening.
21
22#![deny(missing_docs)]
23#![deny(warnings)]
24#![no_std]
25
26use core::panic::PanicInfo;
27
28#[inline(never)]
29#[panic_handler]
30fn panic(_info: &PanicInfo) -> ! {
31 cortex_m::peripheral::SCB::sys_reset();
32}