rust-embedded/cortex-m

HardFault handler is completely broken in c-m-rt 0.7.4

thejpster opened this issue · 0 comments

cortex-m-rt 0.7.4 changes the exception macro so that hardfaults now have an optional trampoline argument. If the argument isn't given, the exception frame reference isn't passed.

Unfortunately the macro crate wasn't published, and cortex-m-rt has a tight pin on the old version: 0.7.0

This means if you use the exception frame argument, the reference will get a garbage value. This causes a failure inside the hard fault handler, putting the CPU into a lock-up state.

We need to publish the cortex-m-rt-macros crate, yank cortex-m-rt 0.7.4, and publish 0.7.5 with a pin on the new macro crate. And then somehow update the docs / write some tests so that in future it's much more difficult to release cortex-m-rt with the wrong version of the macro crate.