diff options
author | 2020-12-02 15:19:30 +0000 | |
---|---|---|
committer | 2020-12-02 15:19:30 +0000 | |
commit | 038396e6f944fb8697e2d4ecbd88cfca9d16b90e (patch) | |
tree | 7eb1e4514b8159b7e1657626dc27a45131b227b9 /asm/lib.rs | |
parent | d34b1ce3eda92777ba9bafe2fca96e1985ec6d72 (diff) | |
parent | 64842461ba4caa384487ae52cbe15a4f3834b4b4 (diff) | |
download | cortex-m-038396e6f944fb8697e2d4ecbd88cfca9d16b90e.tar.gz cortex-m-038396e6f944fb8697e2d4ecbd88cfca9d16b90e.tar.zst cortex-m-038396e6f944fb8697e2d4ecbd88cfca9d16b90e.zip |
Merge #299
299: Expose __syscall and add new bootstrap method r=jonas-schievink a=adamgreig
We added `__syscall` in the new inline asm, but did not expose it in the crate API, and the cortex-m-semihosting crate can't use it directly because the pre-built binaries would contain duplicate symbols (#271). This PR renames it to `__sh_syscall` (since we could imagine other different syscalls; this one is explicitly semihosting with the `bkpt 0xAB`) and exposes it in `cortex_m::asm::sh_syscall`.
This PR also adds the new methods discussed in #297 to permit sound bootstrapping, either from an MSP and RV or a vector table address.
Co-authored-by: Adam Greig <adam@adamgreig.com>
Diffstat (limited to 'asm/lib.rs')
-rw-r--r-- | asm/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -69,10 +69,11 @@ shims! { fn __psp_r() -> u32; fn __psp_w(val: u32); fn __sev(); - fn __udf(); + fn __udf() -> !; fn __wfe(); fn __wfi(); - fn __syscall(nr: u32, arg: u32) -> u32; + fn __sh_syscall(nr: u32, arg: u32) -> u32; + fn __bootstrap(msp: u32, rv: u32) -> !; } // v7m *AND* v8m.main, but *NOT* v8m.base |