This tutorial will cover integrating the coredump collection functionality of the Memfault Firmware SDK into your system.
With coredumps integrated, variable, register, & task state can all be collected at the time a fault, assert, or unexpected error takes place.
This guide assumes you have already completed the minimal integration of the Memfault SDK. If you have not, check out the appropriate guide in the table below.
|MCU Architecture||Getting Started Guide|
|ARM Cortex-M||ARM Cortex-M Integration Guide|
|nRF Connect SDK||nRF Connect SDK Integration Guide|
|ESP32 ESP-IDF||ESP32 ESP-IDF Integration Guide|
|ESP8266||ESP8266 RTOS Integration Guide|
When a crash takes place, a snapshot of the state needs to be stored in a storage area that persists across a device reboot.
We typically recommend starting with the RAM backed Coredump port from
By default this will only save the top of the stack at the time of crash but it lets you quickly get coredumps up and running and get a feel for how things work.
Coredump data can also be stored to any other backing storage (eMMC, external
NOR flash, internal flash, etc). We have a number of ports available for
different MCUs in the
directory of the memfault-firmware-sdk or you can add your own port by
implementing the required
At the very end of saving a coredump, the
implemented as part of your initial port will be called. From here any final
system cleanup can be performed before restarting the system