Skip to content
Snippets Groups Projects
Select Git revision
  • df85298c5a42a764805c2a24a64f2d08049404e9
  • master default
  • claim_mut_new
  • nested_resources
  • test_roread
  • noread
  • v0.2.0
  • v0.1.1
  • v0.1.0
9 results

install.sh

Blame
  • panic.rs 789 B
    //! 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;
    use stm32f4 as _;
    
    #[entry]
    fn main() -> ! {
        panic!("Oops")
    }