Skip to content
Snippets Groups Projects
Select Git revision
  • 22dce7b0dc1f515d14d0212b8aca19c419f3cb55
  • master default protected
  • upstream
  • Programming_of_nuttali
4 results

rtic_bare2.rs

Blame
  • Forked from Per Lindgren / e7020e_2021
    Source project has a limited visibility.
    panic.rs 782 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
    extern crate panic_halt;
    
    // Reports panic messages to the host stderr using semihosting
    // NOTE to use this you need to uncomment the `panic-semihosting` dependency in Cargo.toml
    // extern crate panic_semihosting;
    
    // Logs panic messages using the ITM (Instrumentation Trace Macrocell)
    // NOTE to use this you need to uncomment the `panic-itm` dependency in Cargo.toml
    //extern crate panic_itm;
    
    use cortex_m_rt::entry;
    
    #[entry]
    fn main() -> ! {
        panic!("Oops")
    }