diff options
author | 2018-08-08 07:02:29 +0000 | |
---|---|---|
committer | 2018-08-08 07:02:29 +0000 | |
commit | b4186cfe5fc9a8e51d73549cddbf0f49db3a49ba (patch) | |
tree | 769033ab47421b56ed6710cff6c5be095b654404 /cortex-m-rt/examples | |
parent | 7865725aacf3c9718902361b9d9919b7bebce7be (diff) | |
parent | 335856a05a9cd4d78b3dd4e2348fdd5702edb9ba (diff) | |
download | cortex-m-b4186cfe5fc9a8e51d73549cddbf0f49db3a49ba.tar.gz cortex-m-b4186cfe5fc9a8e51d73549cddbf0f49db3a49ba.tar.zst cortex-m-b4186cfe5fc9a8e51d73549cddbf0f49db3a49ba.zip |
Merge #85
85: [WIP] provide defaults for DefaultHandler and HardFault r=korken89 a=japaric
`exception!(HardFault, ..)` and `exception!(*, ..)` can now be omitted from
programs to pick up the default behavior of an infinite loop. Existing programs
that define these exception handlers will continue to work w/o any functional
change.
closes #72
--
Annoyances:
- The handlers can't be *just* an infinite loop because of rust-lang/rust#28728.
If we define the handlers as just `loop {}` they will become an abort (UDF)
instruction. And that would turn HardFault into infinite recursion. For that
reason I have made them into an infinite loop that does some side effect
- If you stick to the defaults then the symbol name of the default handler
changes from `DefaultHandler` (override) to `DefaultDefaultHandler` (default).
We can make these two names more similar but I think we can not prevent the
rename. Something similar happens with UserHardFault (which becomes
DefaultUserHardFault when not overridden).
cc @rust-embedded/cortex-m
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'cortex-m-rt/examples')
0 files changed, 0 insertions, 0 deletions