This directory contains an implementation of Memfault dependency functions when a platform is built on top of FreeRTOS.
$MEMFAULT_FIRMWARE_SDK/ports/freertos/include to your projects include path#include "memfault/ports/freertos.h" void main(void) { memfault_freertos_port_boot(); }
The memfault-firmware-sdk has a built in utility for tracking heap allocations to facilitate debug of out of memory bugs. To enable, add the following to your memfault_platform_config.h file:
#define MEMFAULT_FREERTOS_PORT_HEAP_STATS_ENABLE 1 #define MEMFAULT_COREDUMP_HEAP_STATS_LOCK_ENABLE 0 #define MEMFAULT_COREDUMP_COLLECT_HEAP_STATS 1