aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/macros/src/lib.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-09-17 18:36:18 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-09-17 18:36:18 +0200
commit3498c7433c020b02dc30a5e532607d1ad850d112 (patch)
tree133ecf8f63a0aa6ea60ae10b9c7502aac95613e6 /cortex-m-rt/macros/src/lib.rs
parent27501f88b8c6ae9746efea01416f5276e43171eb (diff)
downloadcortex-m-3498c7433c020b02dc30a5e532607d1ad850d112.tar.gz
cortex-m-3498c7433c020b02dc30a5e532607d1ad850d112.tar.zst
cortex-m-3498c7433c020b02dc30a5e532607d1ad850d112.zip
make all exception handlers extern "C"
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.
Diffstat (limited to 'cortex-m-rt/macros/src/lib.rs')
-rw-r--r--cortex-m-rt/macros/src/lib.rs2
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