Cortex-M Fault Decoder

Before I bore you with more text, you can get my Fault Decoder from github here. I put in a lot of comments so hopefully you can understand how it works. Please feel free to use it and I welcome suggestions for improvement.


If you have spent much time at all debugging using a Cortex-M based MCU, then you have probably encountered the Hard Fault. I'm not going to explain the Cortex-M fault system here, but it is a very useful mechanism that traps the system state when something goes wrong and provides clues needed to figure out the cause of the fault. more ...