|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
HardFault handler with register dump. More...
#include <sbl/assert.hpp>Go to the source code of this file.
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs functionality. | |
| namespace | sbl::fault |
Functions | |
| void | sbl::fault::on_hard_fault (const uint32_t *frame) |
| Format and output the Cortex-M exception stack frame. | |
| __attribute__ ((used)) inline void sbl_on_hard_fault(const uint32_t *frame) | |
HardFault handler with register dump.
Bridge between the MCU's HardFault vector (in sbl-hardware startup.cpp) and the library's diagnostic output. Including this header provides:
The startup.cpp in sbl-hardware declares a weak sbl_on_hard_fault() that just hits a breakpoint. When this header is included in the application, the strong symbol here wins, giving formatted register output on any fault.
Usage: // Include once in your main.cpp (or any single TU) #include <sbl/fault.hpp>
// That's it. HardFaults now dump registers to your log output.
The output sink is shared with assert.hpp (SBL_FAULT_OUTPUT). See assert.hpp for sink configuration.
Definition in file fault.hpp.
| __attribute__ | ( | (used) | ) | const |
Definition at line 83 of file fault.hpp.
References sbl::fault::on_hard_fault().