diff options
-rw-r--r-- | cortex-m-rt/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs index f2a7929..fe2156f 100644 --- a/cortex-m-rt/src/lib.rs +++ b/cortex-m-rt/src/lib.rs @@ -182,9 +182,10 @@ macro_rules! exception { f() } }; + (HardFault, $path:path) => { #[allow(non_snake_case)] - #[export_name = "HardFaultr"] + #[export_name = "HardFault"] pub unsafe extern "C" fn __impl_HardFault() { // XXX should we really prevent this handler from returning? // validate the signature of the user provided handler @@ -193,6 +194,7 @@ macro_rules! exception { f() } }; + // NOTE Unfortunately, this will end up leaking `$exception` into the function call namespace. // But the damage is somewhat reduced by having `$exception` not being a `snake_case` function. ($ExceptionName:ident, $path:path) => { |