Created
May 8, 2018 23:18
-
-
Save bofh/3f57054a62f47f06eaf857f6fc8878f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[export_name = "_reset"] | |
pub unsafe extern "C" fn reset() -> ! { | |
asm!(" | |
cpsie i\n | |
movw r0, 0xd800\n | |
movt r0, 0x1fff\n | |
ldr r0, [r0]\n | |
msr MSP, r0" ::: "r0" : "volatile"); | |
let f = 0x1FFFD804u32 as *const fn(); | |
(*f)(); | |
loop {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment