ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_crashlog.h
Go to the documentation of this file.
1
66
67#pragma once
68
69#ifdef __cplusplus
70extern "C" {
71#endif
72
73#include <stdint.h>
74
75#include "ra8_exception.h"
76
91typedef enum : uint32_t {
94
114
143typedef struct {
144 uint32_t magic;
145 uint32_t crc;
146 uint32_t boot_loops;
149
176void ra8_crashlog_install(void);
177
208void ra8_crashlog_record_fault(const volatile ra8_exception_last_t* decoded);
209
238
260void ra8_crashlog_claim(void);
261
287
288#ifdef __cplusplus
289}
290#endif
void ra8_crashlog_claim(void)
Consume the record and reset the reset-loop guard (clean claim).
ra8_crashlog_limits_t
Reset-loop threshold and the linker reservation size.
@ k_ra8_crashlog_loop_threshold
Safe mode when boot_loops exceeds this.
@ k_ra8_crashlog_reserve_bytes
Bytes reserved for .noinit at SRAM top.
bool ra8_crashlog_peek(ra8_crashlog_record_t *out)
Validate and copy out the last cross-reset record (non-destructive).
bool ra8_crashlog_safe_mode_requested(void)
Whether accumulated crashes crossed the reset-loop threshold.
void ra8_crashlog_record_fault(const volatile ra8_exception_last_t *decoded)
Persist a decoded fault snapshot into the cross-reset record.
void ra8_crashlog_install(void)
Arm the fault-persist hook so decoded faults are logged to .noinit.
ra8_crashlog_magic_t
Sentinel marking a fully-written ra8_crashlog_record_t.
@ k_ra8_crashlog_magic_valid
"SAFE-BOOT": record is valid.
Cortex-M85 CPU exception diagnostic helpers.
The .noinit cross-reset post-mortem record.
uint32_t crc
CRC-32 over boot_loops..end of record.
uint32_t magic
k_ra8_crashlog_magic_valid if valid (not CRC-covered).
ra8_exception_last_t fault
Embedded copy of the decoded fault / NMI snapshot.
uint32_t boot_loops
Monotonic recorded-fault counter; cleared by a claim.
Fixed-SRAM post-mortem snapshot of the most recent fault or NMI.