Skip to content

Releases: memfault/memfault-firmware-sdk

1.31.0

23 Nov 16:32

Choose a tag to compare

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_temp or die_temp0 aliases, a temp nodelabel, or
        the memfault_cpu_temp alias. 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 export command to print out chunk data using
      shell_print() instead of printk(). Using printk() can lead to dropped
      chunk data when CONFIG_LOG_PRINTK=y and CONFIG_LOG_MODE_DEFERRED=y.
      Using shell_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.interval field changes to bt_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_LEN limit; 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) (where 1234
      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.

1.30.3

27 Oct 16:10

Choose a tag to compare

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 with MEMFAULT_DISABLE= set (i.e.
      MEMFAULT_DISABLE=1 idf.py set-target esp32c6 build). This only impacts the
      sample application.
  • 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_BACKEND for 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 using CONFIG_TFM_ALLOW_NON_SECURE_FAULT_HANDLING=y. Users who are
      comfortable enabling this can re-enable LOG_PANIC() with
      CONFIG_MEMFAULT_FAULT_HANDLER_LOG_PANIC=y.

    • Remove an unnecessary depends on PARTITION_MANAGER_ENABLED in the
      MEMFAULT_COREDUMP_STORAGE_RRAM Kconfig setting. This feature only requires
      a partition labeled memfault_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

10 Oct 21:15

Choose a tag to compare

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

03 Oct 19:54

Choose a tag to compare

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 where CONFIG_LOG_MODE_IMMEDIATE=n and
      MEMFAULT_LOG_TIMESTAMPS_ENABLE is 1.
  • General:

    • Added Python type annotations to the files in the tasks directory.

1.30.0

23 Sep 15:02

Choose a tag to compare

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_COLLECT to 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_COLLECT for backwards
      compatibility.

    • Add the mflt_http workqueue thread to the default set of threads tracked
      with max stack usage metrics. The default thread metrics can be controlled
      with CONFIG_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_BytesFree metric 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
      via CONFIG_MEMFAULT_FS_BYTES_FREE_VFS_PATH still takes precedence when
      set. If not using fstab, set CONFIG_MEMFAULT_FS_BYTES_FREE_METRIC=y to
      enable collection.

🐛 Fixed

  • nRF-Connect SDK:

    • Increase the default value of
      CONFIG_MEMFAULT_HTTP_DEDICATED_WORKQUEUE_STACK_SIZE to 4kB when uploading
      via WiFi on the nRF70 series. This avoids potential stack overflows caused
      while performing periodic uploads via HTTP. Thanks to
      @chshzh for reporting this and proposing a fix
      in #95!

1.29.0

11 Sep 14:34

Choose a tag to compare

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.
  • 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 named memfault_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 named memfault_coredump_partition, for example via a devicetree
      overlay.

      For the nrf54h20dk_nrf54h20_cpuapp, the following sample overlay reduces
      the default size of the storage_partition and adds the necessary
      memfault_coredump_partition entry:

      &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
      when CONFIG_NRF_MODEM_LIB=y into 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.2 expected).
  • Zephyr:

    • The default implementation of memfault_zephyr_get_device_id(), used to
      populate the Device Serial, will use the hwinfo_get_device_id() value by
      default if CONFIG_HWINFO is enabled. Previously this also required
      CONFIG_MEMFAULT_REBOOT_REASON_GET_HWINFO=y, and would default to
      {BOARD}-testserial when that was not enabled.

    • Add several new built-in BLE metrics:

      • bt_gatt_mtu_size
      • bt_connection_remote_info
      • bt_connection_event_count
      • bt_connection_interval
      • bt_connection_latency
      • bt_connection_timeout
      • bt_connection_rssi
      • bt_connected_time_ms
      • bt_disconnect_count

      These metrics are enabled by default when CONFIG_BT=y and
      CONFIG_BT_CONN=y.

  • ESP-IDF:

    • Support CONFIG_ESP_HTTPS_OTA_ENABLE_PARTIAL_DOWNLOAD optional 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.

1.28.0

01 Aug 23:59

Choose a tag to compare

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 a k_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 the k_timer ISR. The
      qemu sample 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_UPLOAD that 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
      existing memfault_platform_config.h setting
      MEMFAULT_NVIC_INTERRUPTS_TO_COLLECT for Cortex-M targets. The default now
      is to collect all NUM_IRQS as defined by Zephyr, which on many platforms
      will increase from the previous default of 32. 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:

    • Fix a build issue impacting some nRF54 series chips related to reboot reason
      decoding. Thanks to @grochu for providing the
      fix in #94 🎉!

1.27.0

21 Jul 17:49

Choose a tag to compare

📈 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
      the MemfaultWatchdog_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, and wdog_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
      of memfault_zephyr_port_post_data() or similar APIs. The default is 100,
      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_sim on arm64 hosts (specifically, the
      native_sim/native/64 target), 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 (when CONFIG_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.

1.26.1

30 Jun 14:14

Choose a tag to compare

This is a minor fix release, addressing one future compatibility issue with the
Zephyr port.

🛠️ Changed

  • Zephyr:

    • Apply a compatibility fix for upcoming Zephyr 4.2.0, fixing the size of the
      net_mgmt callback mgmt_event parameter. Thanks to @rlubos for providing
      the fix in #91
      🎉!

1.26.0

26 Jun 20:05

Choose a tag to compare

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_sim board. 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.
  • 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=0x1000 compiler 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. Version 1.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.
  • nRF-Connect SDK:

    • Replace use of LTE_LC_ON_CFUN with NRF_MODEM_LIB_ON_CFUN for nRF-Connect
      SDK v2.8.0+. This deprecated API is scheduled to be removed in the next
      nRF-Connect SDK release.