diff options
author | 2018-09-17 19:22:09 +0000 | |
---|---|---|
committer | 2018-09-17 19:22:09 +0000 | |
commit | 9aaea565ca58ea735e1fb91281680816d91c5fa5 (patch) | |
tree | 133ecf8f63a0aa6ea60ae10b9c7502aac95613e6 | |
parent | 27501f88b8c6ae9746efea01416f5276e43171eb (diff) | |
parent | 3498c7433c020b02dc30a5e532607d1ad850d112 (diff) | |
download | cortex-m-9aaea565ca58ea735e1fb91281680816d91c5fa5.tar.gz cortex-m-9aaea565ca58ea735e1fb91281680816d91c5fa5.tar.zst cortex-m-9aaea565ca58ea735e1fb91281680816d91c5fa5.zip |
Merge #119
119: make all exception handlers extern "C" r=adamgreig a=japaric
They'll be called by the hardware and must comply to the stable C ABI.
Using the Rust ABI in this case was an oversight.
r? @rust-embedded/cortex-m (anyone)
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
-rw-r--r-- | cortex-m-rt/macros/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cortex-m-rt/macros/src/lib.rs b/cortex-m-rt/macros/src/lib.rs index 579e566..4c65916 100644 --- a/cortex-m-rt/macros/src/lib.rs +++ b/cortex-m-rt/macros/src/lib.rs @@ -418,7 +418,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream { quote!( #[export_name = #ident_s] #(#attrs)* - pub fn #hash() { + pub extern "C" fn #hash() { extern crate cortex_m_rt; // check that this exception actually exists |