diff options
author | 2017-06-30 13:12:19 -0500 | |
---|---|---|
committer | 2017-06-30 13:12:19 -0500 | |
commit | 37fe84a083a7906f163b4d47524431be9baae2e0 (patch) | |
tree | b24101c4c8a53debd46f72ed5d08cd8c2e48eee5 /cortex-m-rt/src/lib.rs | |
parent | a2af5e27d0aeb3c507a1193b74dae24da2c17bda (diff) | |
parent | cfe8c2aad28327b3698dc02abe70b10ddc25b05c (diff) | |
download | cortex-m-37fe84a083a7906f163b4d47524431be9baae2e0.tar.gz cortex-m-37fe84a083a7906f163b4d47524431be9baae2e0.tar.zst cortex-m-37fe84a083a7906f163b4d47524431be9baae2e0.zip |
Merge pull request #19 from japaric/panic
[RFC] default panic! to abort, drop panic-* features, add panic_fmt! macro
Diffstat (limited to 'cortex-m-rt/src/lib.rs')
-rw-r--r-- | cortex-m-rt/src/lib.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs index fa87e6f..4e10b59 100644 --- a/cortex-m-rt/src/lib.rs +++ b/cortex-m-rt/src/lib.rs @@ -145,6 +145,7 @@ //! 8000404: b084 sub sp, #16 //! ``` +#![cfg_attr(feature = "abort-on-panic", feature(core_intrinsics))] #![deny(missing_docs)] #![deny(warnings)] #![feature(asm)] @@ -154,13 +155,9 @@ #![feature(used)] #![no_std] -#[cfg(any(feature = "panic-over-itm", feature = "exceptions"))] -#[cfg_attr(feature = "panic-over-itm", macro_use)] +#[cfg(feature = "exceptions")] extern crate cortex_m; extern crate compiler_builtins; -#[cfg(feature = "panic-over-semihosting")] -#[macro_use] -extern crate cortex_m_semihosting; extern crate r0; mod lang_items; @@ -189,8 +186,8 @@ extern "C" { /// This is the entry point of all programs #[link_section = ".reset_handler"] unsafe extern "C" fn reset_handler() -> ! { - ::r0::zero_bss(&mut _sbss, &mut _ebss); - ::r0::init_data(&mut _sdata, &mut _edata, &_sidata); + r0::zero_bss(&mut _sbss, &mut _ebss); + r0::init_data(&mut _sdata, &mut _edata, &_sidata); // Neither `argc` or `argv` make sense in bare metal context so we just // stub them |