File syn_coredump.c¶
FileList > src > syntropic > system > syn_coredump.c
Go to the source code of this file
Persistent core dump implementation. More...
#include "../port/syn_port_flash.h"#include "../port/syn_port_system.h"#include "../util/syn_assert.h"#include "../util/syn_crc.h"#include "syn_coredump.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_coredump_clear (void) Clear the core dump from flash. |
| bool | syn_coredump_read (SYN_CoreDump * out) Read a core dump from flash. |
| void | syn_coredump_save (const SYN_FaultContext * ctx) Save a core dump to flash. |
Public Static Functions¶
| Type | Name |
|---|---|
| uint32_t | coredump_compute_crc (const SYN_CoreDump * dump) Compute CRC-32 over all fields preceding the crc member. |
Detailed Description¶
Writes fault context + partial stack to a reserved flash sector. Designed to be callable from a hard fault handler (no heap, no locks, minimal stack usage).
Public Functions Documentation¶
function syn_coredump_clear¶
Clear the core dump from flash.
Erases the reserved sector so subsequent reads return false.
function syn_coredump_read¶
Read a core dump from flash.
Validates the magic number and CRC. If valid, copies the dump into the output buffer.
Parameters:
outOutput buffer for the core dump.
Returns:
true if a valid core dump was found.
function syn_coredump_save¶
Save a core dump to flash.
Safe to call from a hard fault handler: no heap, no locks. Erases the reserved sector and writes the dump.
Parameters:
ctxRegister context captured at fault time.
Public Static Functions Documentation¶
function coredump_compute_crc¶
Compute CRC-32 over all fields preceding the crc member.
Parameters:
dumpCore dump to checksum.
Returns:
CRC-32 value.
The documentation for this class was generated from the following file src/syntropic/system/syn_coredump.c