* 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>