Files
firmware/src
Andrew Yong f960c84f5b fix(stm32wl): reset instead of hanging on faults (#11420)
* fix(stm32wl): reset instead of hanging on faults

Reset instead of hanging forever on three unrecoverable faults,
each of which previously required a manual power cycle to recover:

- HardFault_Handler_C: blinked SOS forever with no debugger
  attached; now resets once the fault registers are printed.
- __wrap___assert_func: silently hung on an assert failure; now
  prints file/line/func/expr via debug_printf, then resets.
- earlyBootCheck: silently hung if the jump into the bootloader
  ROM failed to take; now calls the bare NVIC_SystemReset(), not
  the HAL wrapper, since it runs pre-HAL_Init() and MSP/VTOR are
  already repointed at the bootloader by this point, so a return
  would unwind through a corrupted stack frame.

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Andrew Yong <me@ndoo.sg>

* refactor(stm32wl): group fault-handling code

Group the fault-handling code together and drop incidental cruft:

- Move __wrap___assert_func next to HardFault_Handler_C and the
  other fault-reporting helpers.
- Add banner comments separating linker-hack wrappers from
  fault-handling/recovery code, matching the existing Bootloader
  redirect banner.
- Drop the forward declaration for debug_printf, no longer needed
  now that __wrap___assert_func sits below its definition.
- Trim the Bootloader redirect banner comment to 1-3 lines.

No behavior change.

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Andrew Yong <me@ndoo.sg>

---------

Signed-off-by: Andrew Yong <me@ndoo.sg>
2026-08-12 06:29:52 +00:00
..
2026-01-29 05:56:19 -06:00
2026-02-19 07:16:33 -06:00
2026-08-05 08:35:59 +00:00
2026-05-11 11:46:13 -05:00
…
2026-07-01 19:01:27 -05:00
2026-07-20 11:55:17 +02:00
2026-07-16 18:57:50 -05:00
2026-08-06 14:05:07 +00:00
2026-07-20 11:55:17 +02:00
…