diff options
author | 2020-11-25 01:21:50 +0100 | |
---|---|---|
committer | 2020-11-25 01:21:50 +0100 | |
commit | 319076c14fed9a749af24d3f0c6e324f08715e68 (patch) | |
tree | dab6b957790444206ef3fea5dfcd4a265ad2c790 /cortex-m-rt/src | |
parent | 7ac8f7826048cf95b51fe6efdf91af9166439830 (diff) | |
download | cortex-m-319076c14fed9a749af24d3f0c6e324f08715e68.tar.gz cortex-m-319076c14fed9a749af24d3f0c6e324f08715e68.tar.zst cortex-m-319076c14fed9a749af24d3f0c6e324f08715e68.zip |
Initialize RAM in assembly
Diffstat (limited to 'cortex-m-rt/src')
-rw-r--r-- | cortex-m-rt/src/lib.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs index ab4bc3f..5285bd1 100644 --- a/cortex-m-rt/src/lib.rs +++ b/cortex-m-rt/src/lib.rs @@ -438,7 +438,6 @@ #![no_std] extern crate cortex_m_rt_macros as macros; -extern crate r0; use core::fmt; use core::sync::atomic::{self, Ordering}; @@ -923,41 +922,12 @@ pub fn heap_start() -> *mut u32 { #[doc(hidden)] #[link_section = ".vector_table.reset_vector"] #[no_mangle] -#[cfg(not(armv6m))] -pub static __RESET_VECTOR: unsafe extern "C" fn() -> ! = Reset; - -#[doc(hidden)] -#[link_section = ".vector_table.reset_vector"] -#[no_mangle] -#[cfg(armv6m)] pub static __RESET_VECTOR: unsafe extern "C" fn() -> ! = PreResetTrampoline; #[doc(hidden)] #[link_section = ".Reset"] #[no_mangle] pub unsafe extern "C" fn Reset() -> ! { - extern "C" { - - // These symbols come from `link.x` - static mut __sbss: u32; - static mut __ebss: u32; - - static mut __sdata: u32; - static mut __edata: u32; - static __sidata: u32; - } - - extern "Rust" { - // This symbol will be provided by the user via `#[pre_init]` - fn __pre_init(); - } - - __pre_init(); - - // Initialize RAM - r0::zero_bss(&mut __sbss, &mut __ebss); - r0::init_data(&mut __sdata, &mut __edata, &__sidata); - #[allow(clippy::match_single_binding)] match () { #[cfg(not(has_fpu))] @@ -1038,7 +1008,6 @@ pub enum Exception { pub use self::Exception as exception; extern "C" { - #[cfg(armv6m)] fn PreResetTrampoline() -> !; fn NonMaskableInt(); |