Releases: memfault/memfault-firmware-sdk
1.31.0
This is a minor feature and bugfix release. Key updates:
- Fix for compact log serialization error when logs exceed max length
- Handle an upcoming Zephyr API change that renames BLE connection interval
field (used in built-in Bluetooth metrics)
📈 Added
-
Zephyr:
-
Added CPU temperature metrics support for additional platforms:
-
Devices with a die temp device tree node with
compatible = "nordic,nrf-temp"; -
Platforms using
die_tempordie_temp0aliases, atempnodelabel, or
thememfault_cpu_tempalias. This support is enabled out of the box for
the nRF54L15-DK board.
-
-
Add a new demo CLI command,
mflt get_reboot_reason, which displays the
device reboot reason and the prior stored reboot reason. Example output:uart:~$ mflt get_reboot_reason Current Reboot Reason Reg: 0x0008 Prior Stored Reboot Reason: 0x0002
-
🛠️ Changed
-
Zephyr:
-
Updated the
mflt exportcommand to print out chunk data using
shell_print()instead ofprintk(). Usingprintk()can lead to dropped
chunk data whenCONFIG_LOG_PRINTK=yandCONFIG_LOG_MODE_DEFERRED=y.
Usingshell_print()avoids this issue. -
Change the precedence of reboot reason bits when decoding the Zephyr hwinfo
reset reason register. This improves the accuracy of reboot reasons on STM32
platforms, where the Pin Reset and Software Reset bits can be set
simultaneously with other reset reasons. -
Support an
upcoming change
in Zephyr v4.4.0 / nRF Connect SDK v3.2.0, where the
bt_conn_le_info.intervalfield changes tobt_conn_le_info.interval_us.
Thanks to @weeTike for providing this patch in
#97 🎉!This removes the existing metric
bt_connection_interval, replacing with
bt_connection_interval_us. Please reach out if you need support for the
previous metric (which was added in SDK v1.29.0)
-
-
General:
- Fix a few new warnings when building with clang 21.0.0+.
🐛 Fixed
-
General:
-
Fixed an error in Compact Log serialization that resulted in invalid log
data, which caused decoding to fail when processing the log in the Memfault
cloud. This issue only impacted compact logs that were within 4 bytes of the
MEMFAULT_LOG_MAX_LINE_SAVE_LENlimit; longer compact logs were silently
dropped but did not cause decoding failures.This fix will now insert a placeholder log line when a compact log exceeds
the maximum length:
[MFLT] compact log serialized length exceeds MEMFAULT_LOG_MAX_LINE_SAVE_LEN: 1234 bytes (path/to/source/file.c:218)(where1234
is the serialized log entry length that exceeded the limit).
-
-
FreeRTOS
- Fixed an undefined macros build error on FreeRTOS versions < V11.0.0 in the
FreeRTOS thread metrics port. Thread metric collection is enabled by default
on FreeRTOS platforms but can be disabled with
#define MEMFAULT_FREERTOS_COLLECT_THREAD_METRICS 0.
- Fixed an undefined macros build error on FreeRTOS versions < V11.0.0 in the
1.30.3
This is a patch release, fixing build errors and one bug.
🛠️ Changed
-
Zephyr:
-
Update the RRAM coredump storage backend implementation to support the
Nordic nRF54LM20 (and other Nordic nRF54L series chips) when not using
partition manager to assign flash regions (i.e. using device tree fixed
partitions). See
ports/zephyr/common/memfault_rram_backed_coredump.c
for details, and how to enable the coredump storage backend. -
Fix a compilation error when
CONFIG_MEMFAULT_METRICS_THREADS_DEFAULTS=n. -
Remove an error log statement from
memfault_platform_thread_metrics.c.
Previously this would log as
<err> mflt: No thread name registered for 0x2000eae8, for example, but was
not useful in many cases, and is not an error in any case.
-
🐛 Fixed
-
ESP-IDF:
- Fix a compilation issue when building the ESP32 sample app
for an ESP32-C6 withMEMFAULT_DISABLE=set (i.e.
MEMFAULT_DISABLE=1 idf.py set-target esp32c6 build). This only impacts the
sample application.
- Fix a compilation issue when building the ESP32 sample app
-
Zephyr:
-
Disable invoking
LOG_PANIC()during fault handling by default. When
deferred logging is used (CONFIG_LOG_MODE_DEFERRED=y), triggering a panic
flush from fault context may result in some log backends
(CONFIG_SHELL_LOG_BACKENDfor example) to double-fault, which results in
failed coredump captures. This specifically can happen when running a
non-secure application with TF-M, and passing back from a secure fault
handler usingCONFIG_TFM_ALLOW_NON_SECURE_FAULT_HANDLING=y. Users who are
comfortable enabling this can re-enableLOG_PANIC()with
CONFIG_MEMFAULT_FAULT_HANDLER_LOG_PANIC=y. -
Remove an unnecessary
depends on PARTITION_MANAGER_ENABLEDin the
MEMFAULT_COREDUMP_STORAGE_RRAMKconfig setting. This feature only requires
a partition labeledmemfault_coredump_partition, but does not require
partition manager specifically (which is a Nordic nRF-Connect SDK feature,
not a Zephyr feature). Thanks to
@JordanYates for reporting this issue in
#96!
-
1.30.2
This is a patch release, including only a change to boolean Kconfig prompts so
they comply with Kconfig requirements in the nRF-Connect SDK.
1.30.1
This is a patch release, fixing one bug and applying a minor code quality
improvement to the Python tooling files.
🐛 Fixed
-
nRF-Connect SDK:
- Fixed an issue where panic logs generated from ISRs caused a double fault
for Nordic nRF91 users whereCONFIG_LOG_MODE_IMMEDIATE=nand
MEMFAULT_LOG_TIMESTAMPS_ENABLEis 1.
- Fixed an issue where panic logs generated from ISRs caused a double fault
-
General:
- Added Python type annotations to the files in the
tasksdirectory.
- Added Python type annotations to the files in the
1.30.0
This is a minor release. Highlights:
- Added active task stack collection control in Zephyr
- Changed mount point selection for filesystem metric to look up from Zephyr
device tree fstab entries - Fixed potential WiFi stack overflow on nRF70 series devices during HTTP
uploads
📈 Added
-
Zephyr
-
Add Kconfig option
CONFIG_MEMFAULT_COREDUMP_ACTIVE_TASK_STACK_SIZE_TO_COLLECTto control how
much of the active task stack is collected in coredumps. This can be used to
prioritize capturing details about the running task when coredump storage
space is limited. Defaults to
CONFIG_MEMFAULT_COREDUMP_STACK_SIZE_TO_COLLECTfor backwards
compatibility. -
Add the
mflt_httpworkqueue thread to the default set of threads tracked
with max stack usage metrics. The default thread metrics can be controlled
withCONFIG_MEMFAULT_METRICS_THREADS_DEFAULTS.
-
🛠️ Changed
-
Zephyr
-
Replace use of deprecated API
bt_hci_cmd_create()with
bt_hci_cmd_alloc()for Zephyr 4.2+. -
Enable
FileSystem_BytesFreemetric by default only when fstab is present
in the device tree. If present, the mount point is now automatically
detected from checking fstab nodes. Manual configuration of the mount point
viaCONFIG_MEMFAULT_FS_BYTES_FREE_VFS_PATHstill takes precedence when
set. If not using fstab, setCONFIG_MEMFAULT_FS_BYTES_FREE_METRIC=yto
enable collection.
-
🐛 Fixed
-
nRF-Connect SDK:
1.29.0
This is a minor release. Highlights:
- Added 9 new built-in metrics for BLE devices for Zephyr projects 🎉
- Added a session metrics API to deactivate a session
- Fixed a bug where thread state was missing from small coredumps in ESP-IDF
📈 Added
-
General:
- Add a new Session Metric API:
MEMFAULT_METRICS_SESSION_RESET(), which can
be used to deactivate an active session instead of ending it with
MEMFAULT_METRICS_SESSION_END(). This will discard the metrics in the
specified session.
- Add a new Session Metric API:
-
nRF-Connect SDK:
-
Added an implementation for storing coredumps in RRAM, for SOCs that support
it (nRF54L series for example). Enable with
CONFIG_MEMFAULT_COREDUMP_STORAGE_RRAM=y. Requires a partition manager
entry namedmemfault_coredump_partition. -
Also added a coredump storage implementation for MRAM, specifically
targeting the nRF54H series of devices. Enable with
CONFIG_MEMFAULT_COREDUMP_STORAGE_MRAM=y. Requires adding a fixed partition
entry namedmemfault_coredump_partition, for example via a devicetree
overlay.For the
nrf54h20dk_nrf54h20_cpuapp, the following sample overlay reduces
the default size of thestorage_partitionand adds the necessary
memfault_coredump_partitionentry:&mram1x { partitions { storage_partition: partition@1a4000 { reg = <0x1a4000 DT_SIZE_K(20)>; }; memfault_coredump_partition: partition@1b4000 { reg = <0x1a9000 DT_SIZE_K(20)>; }; }; };
-
Added example definition and usage of custom reboot reasons in the nRF9160
app. These reboot reasons can be triggered with a new shell command:
app reboot_custom <expected|unexpected>
-
🛠️ Changed
-
nRF-Connect SDK:
- Moved the default statement setting
CONFIG_MEMFAULT_HTTP_USES_MBEDTLS=n
whenCONFIG_NRF_MODEM_LIB=yinto the Memfault SDK Kconfig file. This
default currently exists in NCS in a symbol re-definition but will be
removed in the next version of NCS (v3.2expected).
- Moved the default statement setting
-
Zephyr:
-
The default implementation of
memfault_zephyr_get_device_id(), used to
populate the Device Serial, will use thehwinfo_get_device_id()value by
default ifCONFIG_HWINFOis enabled. Previously this also required
CONFIG_MEMFAULT_REBOOT_REASON_GET_HWINFO=y, and would default to
{BOARD}-testserialwhen that was not enabled. -
Add several new built-in BLE metrics:
bt_gatt_mtu_sizebt_connection_remote_infobt_connection_event_countbt_connection_intervalbt_connection_latencybt_connection_timeoutbt_connection_rssibt_connected_time_msbt_disconnect_count
These metrics are enabled by default when
CONFIG_BT=yand
CONFIG_BT_CONN=y.
-
-
ESP-IDF:
-
Support
CONFIG_ESP_HTTPS_OTA_ENABLE_PARTIAL_DOWNLOADoptional HTTP client
parameters in upcoming ESP-IDF v6
(this change
made them optionally declared). -
Update the post-link steps to be compatible with upcoming ESP-IDF build
changes for ESP-IDF > 5.5.
-
🐛 Fixed
-
ESP-IDF
- Fixed a bug where some FreeRTOS symbols needed for thread awareness were
missing from coredumps if the coredump storage was too small.
- Fixed a bug where some FreeRTOS symbols needed for thread awareness were
1.28.0
This is a minor update release. Highlights:
- added a new test command for simulating hangs in ISRs
- improved NMI exception capture
- fixed a build issue in the nRF-Connect SDK port
📈 Added
-
Zephyr:
-
Add a new test command,
mflt test isr_hang, which will cause a busy loop
hang inside ak_timer, which normally is executing from an ISR context.
The system will only exit this condition if there is a watchdog or other
higher-priority interrupt capable of preempting thek_timerISR. The
qemusample app is updated to enable a watchdog
which generates an NMI exception, caught by Memfault. -
Added a debug print when uploading data using
CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOADthat shows the bytes sent:[00:09:45.821,000] <dbg> mflt: memfault_platform_log: Uploaded 118 bytes of Memfault data
Only enabled when debug level prints are enabled for Memfault
(CONFIG_MEMFAULT_LOG_LEVEL_DBG=y).
-
🛠️ Changed
-
Zephyr:
-
NMI exceptions are now properly handled. Prior to this change, a coredump
was captured on NMI exceptions but the MSP context was not fully unwound and
the NVIC state was not included in the trace data. -
Add a new Kconfig option,
CONFIG_MEMFAULT_COREDUMP_NVIC_INTERRUPTS_TO_COLLECT, which controls the
existingmemfault_platform_config.hsetting
MEMFAULT_NVIC_INTERRUPTS_TO_COLLECTfor Cortex-M targets. The default now
is to collect allNUM_IRQSas defined by Zephyr, which on many platforms
will increase from the previous default of32. This improves the
out-of-the-box information at the cost of 44 bytes in coredump storage
consumed per additional 32 interrupts. Some example deltas shown below,
including the byte delta in the stored coredump:Platform Previous Default New Default Byte Delta nRF52840 32 64 (*48, rounded up to nearest multiple of 32) +44 nRF91 32 96 (*65 rounded up) +88 nRF53 32 96 (*69 rounded up) +88 STM32F407 32 96 (*82 rounded up) +88 STM32H7B0 32 160 (*155 rounded up) +176 STM32H563 32 160 (*155 rounded up) +176 To restore the previous default, set
CONFIG_MEMFAULT_COREDUMP_NVIC_INTERRUPTS_TO_COLLECT=32.
-
-
nRF-Connect SDK:
1.27.0
📈 Added
-
General:
-
Add a reference software watchdog port for the STM32L4 series LPTIM
peripheral. Users of the STM32 HAL can now compile in the reference port and
theMemfaultWatchdog_Handler. The handler will save a coredump so the full
system state can be recovered when a watchdog takes place. More details can
be found in
ports/include/memfault/ports/watchdog.h. -
Add CLI commands
wdg_enable,wdg_disable, andwdog_update <timeout_ms>
for testing a software watchdog port. These commands are disabled by default
and can be enabled for platforms using the minimal shell/console with
MEMFAULT_DEMO_CLI_WATCHDOG.
-
-
Zephyr:
-
Add a new Kconfig option,
CONFIG_MEMFAULT_HTTP_MAX_MESSAGES_TO_SEND, which
controls the max number of messages that will be sent in a single invocation
ofmemfault_zephyr_port_post_data()or similar APIs. The default is100,
which is suitable for most applications. Before this change, the limit was
hard coded to 5 messages, which was too low for systems with infrequent
upload intervals. -
Support building for
native_simon arm64 hosts (specifically, the
native_sim/native/64target), in addition to x86 hosts.
-
🛠️ Changed
-
Zephyr:
-
Improve the default implementation of
memfault_platform_sanitize_address_range()to include all memory
accessible by the kernel. This enables collection of heap-allocated task
control blocks, which was previously unsupported. Users with discontiguous
memory regions should provide their own implementation, as before. -
Prioritize the thread bookkeeping array when collecting thread information
in a coredump (whenCONFIG_MEMFAULT_COREDUMP_COLLECT_TASKS_REGIONS=y, the
default). This improves the quality of the processed coredump if the
coredump region is too small to collect all stacks for all threads in the
system (impacts systems with many threads and limited coredump storage
space). -
Add a new Kconfig option,
CONFIG_MEMFAULT_HTTP_PACKETIZER_BUFFER_SIZE,
which controls the size of the intermediate buffer used when reading data
from the underlying data source (coredump storage, log buffer, CDR, etc)
when uploading data to Memfault via HTTP. The default size is 128 bytes, and
1024 bytes on nRF91x series SOCs to better support modem trace CDR upload.
Thanks to @DematteisGiacomo for submitting this in
#92.
-
-
ESP-IDF:
-
Handle deprecated Deep Sleep API calls for upcoming ESP-IDF v5.5 and v6.
-
Supporting building with the Memfault CLI commands disabled,
CONFIG_MEMFAULT_CLI_ENABLED=n. Thanks to @finger563 for reporting this
issue and providing a fix in
#93 🎉!
-
🐛 Fixed
-
Zephyr:
- Fix an issue where the socket file descriptor can potentially be leaked when
the connection terminated unexpectedly during an HTTP chunk upload. Thanks
to @DematteisGiacomo for submitting this in
#92.
- Fix an issue where the socket file descriptor can potentially be leaked when
1.26.1
1.26.0
This is a feature release, primarily addressing future compatibility changes for
the next nRF-Connect SDK release.
📈 Added
-
Zephyr:
-
Add support for the ESP32 chip on Zephyr, adding to the existing support for
ESP32-S3 and ESP32 C series chips. -
Add support for building the Memfault SDK on the
native_simboard. Note
that Memfault does not support reboot tracking or coredumps on this target,
but other features are supported.
-
🛠️ Changed
-
General:
- Add a
MEMFAULT_ENABLE_WARNING(warning)macro complementing the existing
MEMFAULT_DISABLE_WARNING(warning)macro. This macro is only implemented
for GCC + Clang.
- Add a
-
Zephyr:
-
Remove the External Module logic, used to support multiple Zephyr versions,
and instead use the normal Zephyr module Kconfig path specifier. There
should be no user-facing changes from this change. It addresses an issue
with Kconfig symbol linting. -
In the Zephyr QEMU sample app, add
the--param=min-pagesize=0x1000compiler option, which will catch
dereferences to low memory addresses. This is only for static analysis
purposes and does not affect any behavior.
-
-
ESP-IDF:
- The heartbeat metrics timer is now enabled by default when
CONFIG_MEMFAULT_DEEP_SLEEP_SUPPORT=y. Version1.25.0, which added deep
sleep support, had disabled the normal heartbeat metrics timer by default.
The default behavior can be overridden with the Kconfig option
CONFIG_MEMFAULT_METRICS_HEARTBEAT_TIMER_ENABLE.
- The heartbeat metrics timer is now enabled by default when
-
nRF-Connect SDK:
- Replace use of
LTE_LC_ON_CFUNwithNRF_MODEM_LIB_ON_CFUNfor nRF-Connect
SDK v2.8.0+. This deprecated API is scheduled to be removed in the next
nRF-Connect SDK release.
- Replace use of