initial commit with my changes

This commit is contained in:
J / Jacob Babich
2022-04-08 20:51:28 -04:00
commit 79de6fab06
19 changed files with 892 additions and 0 deletions

28
examples/panic.rs Normal file
View File

@@ -0,0 +1,28 @@
//! Changing the panicking behavior
//!
//! The easiest way to change the panicking behavior is to use a different [panic handler crate][0].
//!
//! [0]: https://crates.io/keywords/panic-impl
#![no_main]
#![no_std]
// Pick one of these panic handlers:
// `panic!` halts execution; the panic message is ignored
use panic_halt as _;
// Reports panic messages to the host stderr using semihosting
// NOTE to use this you need to uncomment the `panic-semihosting` dependency in Cargo.toml
// use panic_semihosting as _;
// Logs panic messages using the ITM (Instrumentation Trace Macrocell)
// NOTE to use this you need to uncomment the `panic-itm` dependency in Cargo.toml
// use panic_itm as _;
use cortex_m_rt::entry;
#[entry]
fn main() -> ! {
panic!("Oops")
}