Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
fault.hpp File Reference

HardFault handler with register dump. More...

Detailed Description

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:

  1. sbl::system::fault::on_hard_fault() - formats the Cortex-M exception frame
  2. sbl_on_hard_fault() - the C function the HardFault stub calls, which forwards the frame to on_hard_fault(). It is defined inline, so it has weak (COMDAT) linkage.

Include the header in one translation unit of the application:

HardFault handler with register dump.

The output sink is shared with assert.hpp (SBL_FAULT_OUTPUT). See assert.hpp for sink configuration.

Definition in file fault.hpp.

Go to the source code of this file.

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::system
 The system layer: execution levels, the control critical section, ring buffers, assertions and the fault handler, profiling, and the port contracts.
 
namespace  sbl::system::fault
 Assertions, panic and the HardFault handler.
 

Functions

void sbl::system::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)
 

Function Documentation

◆ __attribute__()

__attribute__ ( (used)  ) const

Definition at line 80 of file fault.hpp.