Releases: memfault/memfault-firmware-sdk
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
1.25.0
This is a feature release of the Memfault Firmware SDK. The main new feature
released in this version is support for tracking metrics through deep sleep on
ESP32 devices. Full release notes are below.
📈 Added
-
Zephyr:
-
Add a new choice config
CONFIG_MEMFAULT_REBOOT_REASON_GET. By default,
CONFIG_MEMFAULT_REBOOT_REASON_GET_HWINFO=y, which is supported by
imply CONFIG_HWINFOin the overarchingMEMFAULTsymbol. This default
enables better reboot reasons out-of-the-box via Zephyr'shwinfomodule.
The fall-back option isCONFIG_MEMFAULT_REBOOT_REASON_GET_BASIC, which
provides a simple implementation. As before, users can override the default
implementations withCONFIG_MEMFAULT_REBOOT_REASON_GET_CUSTOM=y. -
Add a new Kconfig setting,
CONFIG_MEMFAULT_ENABLE_REBOOT_DIAG_DUMP, to
print the reboot reason code on system boot, for debugging purposes. This
feature is enabled by default. It can be disabled with
CONFIG_MEMFAULT_ENABLE_REBOOT_DIAG_DUMP=n. -
Add a
boot_time_msmetric, which tracks how long the system takes to boot
the application. Can be disabled withCONFIG_MEMFAULT_METRICS_BOOT_TIME=n. -
Add new builtin Wi-Fi metrics, enabled by default when
CONFIG_WIFI=y, and
can be disabled withCONFIG_MEMFAULT_METRICS_WIFI=n:wifi_beacon_intervalwifi_dtim_intervalwifi_frequency_bandwifi_primary_channelwifi_security_typewifi_sta_rssiwifi_standard_versionwifi_twt_capablewifi_tx_rate_mbps(Zephyr 4.1.0+ only)
These add on top of the existing Zephyr Wi-Fi metrics:
wifi_ap_ouiwifi_connected_time_mswifi_disconnect_count
-
Add an option to upload logs by default when using
MEMFAULT_HTTP_PERIODIC_UPLOAD, controlled with the Kconfig symbol
MEMFAULT_HTTP_PERIODIC_UPLOAD_LOGS. This can also be controlled at runtime
with the included API
memfault_zephyr_port_http_periodic_upload_logs(bool enable) -
Add a new Kconfig option,
CONFIG_MEMFAULT_PLATFORM_TIME_SINCE_BOOT_CUSTOM,
to provide a custom implementation of
memfault_platform_get_time_since_boot_ms()in your application. The
default is an implementation usingk_uptime_get().
-
-
ESP-IDF:
-
Add a
boot_time_msmetric, which tracks how long the system takes to boot
the application. Can be disabled withCONFIG_MEMFAULT_METRICS_BOOT_TIME=n. -
Add support for tracking metrics across ESP32 deep sleep cycles, enabled
with the KconfigCONFIG_MEMFAULT_DEEP_SLEEP_SUPPORT=y. To utilize this
feature, these functions must be called by the application:-
memfault_platform_deep_sleep_save_state()Must be called just prior to entering deep sleep
(esp_deep_sleep_start()) -
memfault_platform_deep_sleep_restore_state()Must be called before
memfault_platform_boot()in the application
startup sequence.
This feature includes built-in metrics for tracking deep sleep:
deep_sleep_time_ms- time spent in deep sleepactive_time_ms- time spent out of deep sleepdeep_sleep_wakeup_count- number of times the device woke up from deep
sleep
There are several Kconfig options for controlling the deep sleep feature,
including controlling the heartbeat trigger and HTTP periodic upload. See
menuconfig"Memfault deep sleep support" or
ports/esp_idf/memfault/Kconfigfor
details. -
-
Add new metrics tracking flash usage:
flash_spi_erase_bytesflash_spi_write_bytesflash_spi_total_size_bytes
-
Add capture of the ESP-IDF Task Watchdog stuck task list in coredumps. This
is enabled by default if ESP-IDF Task Watchdog is enabled, and can be
disabled with the Kconfig
CONFIG_MEMFAULT_COREDUMP_CAPTURE_TASK_WATCHDOG=n.
-
🛠️ Changed
-
nRF Connect SDK:
CONFIG_MEMFAULT_REBOOT_REASON_GET_CUSTOMis now a choice in the new choice
configCONFIG_MEMFAULT_REBOOT_REASON_GET. As a result, it will be the
default choice ifCONFIG_MEMFAULT_NRF_CONNECT_SDK=yinstead of being
imply-ed byCONFIG_MEMFAULT_NRF_CONNECT_SDKto work around the
restriction that choice configs cannot be selected. As before, users can
override this behavior withCONFIG_MEMFAULT_REBOOT_REASON_GET_CUSTOM=n.
-
ESP-IDF:
-
Rename
CONFIG_MEMFAULT_TIME_SINCE_BOOT_CUSTOM->
CONFIG_MEMFAULT_PLATFORM_TIME_SINCE_BOOT_CUSTOM. A new ESP-IDF port choice
KconfigCONFIG_MEMFAULT_PLATFORM_TIME_SINCE_BOOTnow supports 3 settings
for platform time since boot:MEMFAULT_PLATFORM_TIME_SINCE_BOOT_ESP_TIMERdefault, suitable for most
applicationsMEMFAULT_PLATFORM_TIME_SINCE_BOOT_DEEP_SLEEPapplicable for deep-sleep
applicationsMEMFAULT_PLATFORM_TIME_SINCE_BOOT_CUSTOMdisable builtin
implementations and implement a custom
memfault_platform_get_time_since_boot_ms()
-
Renamed the
spi_flash_chip_idmetric (added in1.23.0) to
flash_spi_manufacturer_id. -
Renamed the
wifi_auth_modemetric towifi_security_typeto more
accurately indicate the property being measured.
-
-
General:
-
Add the
democomponent to the default set of components added to an
Eclipse project when using the
eclipse_patch.pyutility. The default
components can be overridden with the--componentsargument. -
Coredumps no longer include the device serial by default. The uploading
serial (passed to the chunks endpoint) is instead used to identify the
device associated with the coredump. Enabling
#define MEMFAULT_EVENT_INCLUDE_DEVICE_SERIAL 1in
memfault_platform_config.hwill include the device serial in coredumps.
-
🐛 Fixed
-
ESP-IDF:
-
Remove debug logging from
memfault_platform_time_get_current(). When log
timestamps are enabled, and debug level logs are enabled, this function can
infinitely recurse. -
Fix Memfault Build ID insertion when
CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES=y. Previously, the build ID was
inserted at the wrong build step, resulting in a missing build ID in the
flashable image.
-
-
Zephyr:
-
Remove debug logging from the RTC-backed
memfault_platform_time_get_current()(enabled when
CONFIG_MEMFAULT_SYSTEM_TIME_SOURCE_RTC=y). When log timestamps are
enabled, logging from this function can result in infinite recursion under
certain conditions. -
Update the west module allowlist to include
cmsis_6in the
Zephyr QEMU Sample App. Thecmsis_6
module is now used for TF-M and Cortex-M as of
this PR. -
Update the Memfault Zephyr logging backend to properly capture log lines
whenCONFIG_LOG_MODE_IMMEDIATE=yon Zephyr 3.7.0+.
-
-
Wiced:
- Fix broken symlinks in the Wiced example.