All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Removed support for Zephyr < 2.7.0
- Removed support for nRF-Connect SDK < 1.9.2
- Removed support for ESP-IDF < 4.4.0
Please contact us if you need support for earlier versions!
-
General:
- Correct an issue where
eMemfaultRebootReason
is expressed as a 4-byte type instead of 2-bytes when compiling with Clang with high optimization, when targeting ARM. This results in Coredumps tagged asUnknown
instead of the correct reason code.
- Correct an issue where
-
General:
-
Add a pair of optional user-provided functions,
memfault_reboot_tracking_load()
/memfault_reboot_tracking_save()
, to allow users to provide their own implementations for saving and loading reboot tracking data. This is useful when the default implementation is not suitable for the platform or when the user wants to store the data in a different location. -
The Stable Sessions Device Vital added in SDK version
1.15.0
is fully available and no longer considered experimental. -
Add an optional
memfault_port_coredump_save_begin()
callback, for use by Memfault ports. This allowsmemfault_platform_coredump_save_begin()
to be implemented by the platform instead, for custom pre-coredump operations. Thanks to @finger563 for reporting this issue in #77! -
Improved API docs for events and data packetizer components by noting restrictions for use in ISR contexts
-
-
Zephyr:
- Update the Qemu app to support the
nucleo_l496zg
board, with support for the Zephyrbbram
subsystem, and implement the newmemfault_reboot_tracking_load()
/memfault_reboot_tracking_save()
functions to demonstrate the functionality.
- Update the Qemu app to support the
-
ESP-IDF:
- New Kconfig setting,
CONFIG_MEMFAULT_ENABLE_REBOOT_DIAG_DUMP
, to print the ESP-IDF reboot reason code on system boot, for debugging purposes. This feature is disabled by default.
- New Kconfig setting,
-
General:
- Update support links to refer to the preferred site https://mflt.io/contact-support instead of the Memfault support email. This link will redirect to a form where questions can be sent to the Memfault support team.
-
nRF-Connect SDK:
- Changed the Kconfig symbol
MEMFAULT_REBOOT_REASON_GET_CUSTOM
to beimply
instead ofselect
when the nRF-Connect SDK is enabled. This permits users to disable thenrfx
-based reboot reason tracking if needed.
- Changed the Kconfig symbol
-
General:
- EXPERIMENTAL: Metrics Sessions now include a built-in metric for the
Stable Sessions Device Vital
(
session.operational_crashes
) which tracks crashes that occurred when a session is active.
- EXPERIMENTAL: Metrics Sessions now include a built-in metric for the
Stable Sessions Device Vital
(
-
General:
- Minor changes to support compiling with GCC ARM v4.9.3.
- Corrected a spelling error, renamed
MEMFAULT_METRIS_KEY_DEFINE_WITH_SESSION_AND_SCALE_VALUE()
toMEMFAULT_METRICS_KEY_DEFINE_WITH_SESSION_AND_SCALE_VALUE()
-
ESP-IDF:
- The Memfault port will now disable the
IWDT
(Interrupt Watchdog Timer) before starting coredump saving, to prevent interrupting the coredump process. The ESP-IDF fault handler enables theWDT_RWDT
hardware watchdog when a fault occurs, so there is still protection if the fault handling hangs.
- The Memfault port will now disable the
-
FreeRTOS:
- The SDK now has a config to control whether to split CPU usage per core when
building for a multi-core device. Enable this setting by adding
#define MEMFAULT_FREERTOS_RUNTIME_STATS_MULTI_CORE_SPLIT 1
tomemfault_platform_config.h
. This setting is disabled by default.
- The SDK now has a config to control whether to split CPU usage per core when
building for a multi-core device. Enable this setting by adding
-
ESP-IDF:
- Added a Kconfig,
CONFIG_MEMFAULT_FREERTOS_RUNTIME_STATS_MULTI_CORE_SPLIT
, to controlMEMFAULT_FREERTOS_RUNTIME_STATS_MULTI_CORE_SPLIT
. This Kconfig is enabled by default for multi-core devices.
- Added a Kconfig,
-
FreeRTOS:
- Changed previous idle task run time percent metrics to measure CPU usage (i.e. the complement of the idle task run time)
- Renamed the following metrics:
- Single-Core + Multi-Core Default:
idle_task_run_time_percent
->cpu_usage_pct
- Multi-Core Split:
idle0_task_run_time_percent
->cpu_usage_pct
idle1_task_run_time_percent
->cpu1_usage_pct
- Single-Core + Multi-Core Default:
-
ESP-IDF:
- Unknown or unclassified reboot reason codes returned by
get_reset_reason()
are now correctly recorded askMfltRebootReason_Unknown
instead ofkMfltRebootReason_UnknownError
(UnknownError
is reserved for an "unexpected" reboot path, whereUnknown
is used when the reboot reason cannot be determined).
- Unknown or unclassified reboot reason codes returned by
Support for the following vendor platform versions is deprecated in this release, and will be removed in a future release:
- ESP-IDF <
v4.4
(Jan 26, 2022) - Zephyr <
v2.7.0
(Oct 16, 2021) - nRF-Connect SDK <
v1.9.2
(Jul 14, 2022)
Please contact us if you need support for earlier versions!
-
ESP-IDF:
-
The SDK now supports being installed as an ESP Component from the Espressif registry, by adding the following lines to an esp-idf project's
idf_component.yml
manifest:dependencies: memfault/memfault-firmware-sdk: version: "1.12.0"
-
Heap Allocation Tracking is now enabled by default for ESP-IDF projects, controlled with the Kconfig symbol
CONFIG_MEMFAULT_HEAP_STATS
. The Memfault Trace UI will show information about the most recent heap allocations formalloc()
calls.
-
-
ESP-IDF:
-
The Memfault Build ID will be applied by default, controlled by the Kconfig setting
CONFIG_MEMFAULT_USE_MEMFAULT_BUILD_ID
. This is only valid for ESP-IDF versions >= 4.2.5 , and will cause a build error on older versions, requiring it to be set ton
. Updating to this version of the SDK will require removing the similar logic in the project'sCMakeLists.txt
file (a build error will occur if both are present). -
The Memfault Core Vital for Periodic Connectivity will now count failures to sync Memfault data if the HTTP connection cannot be established, but WiFi connectivity is available. This can occur when the WAN connection is down but the access point is still up, or if there is an external DNS failure. Previously this was not counted as a failure.
-
-
Zephyr
-
The Memfault HTTP client, enabled with Kconfig
CONFIG_MEMFAULT_HTTP_ENABLE
, requiresPOSIX_API
to be enabled on newer versions of Zephyr. Previously, not explicitly enablingPOSIX_API
would result in a build error. Update it to be enabled by default in the Zephyr SDK, via Kconfigimply POSIX_API
. -
Zephyr 3.7.0+ requires enabling
CONFIG_MBEDTLS_SHA1
when using Zephyr's mbedtls implementation. Memfault added a build-time check for this setting in Memfault SDK 1.11.2, but that check would also trip when not using Zephyr's mbedtls implementation. Update the build check to be more precise.
-
-
nRF-Connect SDK:
- Minor changes to provide compatibility with NCS versions > 2.7.0, which target a Zephyr fork that is compatible with 3.7.0 but provides a "development" version number, 3.6.99.
-
ESP-IDF:
- Corrected a theoretical integer overflow issue in the demo CLI
crash
command, detected by static analysis tools. The impacted function was and is exclusively called with an argument of10
, so this issue was not exploitable in practice.
- Corrected a theoretical integer overflow issue in the demo CLI
-
General:
- Add two new core metrics,
MemfaultSdkMetric_os_name
andMemfaultSdkMetric_os_version
. These are string metrics that map to the OS / platform name and version string respectively, and are included in the the ELF at build time, and processed out-of-band by Memfault for NCS, Zephyr, and ESP-IDF. They are not ever transmitted over the air (no bandwidth impact). For example, for Zephyr these metric string values would bezephyr
and3.7.0
for a project on Zephyr v3.7.0. These metrics are attributes by default and will not be counted towards attribute quotas.
- Add two new core metrics,
-
Zephyr:
-
Add the following built-in WiFi metrics for Zephyr devices, enabled by default on systems with WiFi:
wifi_connected_time_ms
: time in milliseconds the device has been connected to a WiFi networkwifi_disconnect_count
: number of times the device has disconnected from a WiFi networkwifi_ap_oui
: the OUI of the WiFi AP the device is connected to
The metrics can be disabled by setting
CONFIG_MEMFAULT_METRICS_WIFI=n
. -
The Memfault Zephyr fault handler now labels faults as Stack Overflow, Bus Fault, MemManage Fault, and Usage Fault, among others, in addition to the existing Hard Fault label. Note that this does not change the types of faults collected (all these faults are already supported), but it does correct the label presented in the Memfault UI.
-
Add a new test command,
mflt test stack_overflow
, that will trigger a stack overflow fault whenCONFIG_STACK_SENTINEL
orCONFIG_MPU_STACK_GUARD
is enabled. -
The
cpu_temp
metric has been renamed tothermal_cpu_c
to better reflect the metric's purpose. The metric is still collected by default on platforms with an enableddie-temp0
sensor, and can be disabled by settingCONFIG_MEMFAULT_METRICS_CPU_TEMP=n
. -
Add a new metric,
memory_pct_max
, which captures the max percentage of the heap used. It is enabled by default. This metric and the existingHeap_BytesFree
metric are controlled withCONFIG_MEMFAULT_METRICS_MEMORY_USAGE
.
-
-
ESP-IDF:
-
Add an option to upload logs by default when using
MEMFAULT_HTTP_PERIODIC_UPLOAD
, controlled with the Kconfig symbolMEMFAULT_HTTP_PERIODIC_UPLOAD_LOGS
. This can also be controlled at runtime with the included APImemfault_esp_port_http_periodic_upload_logs(bool enable)
-
Add a new metric,
memory_pct_max
, which captures the max percentage of the heap used. It is enabled by default. This metric and the existingheap_*
metrics are now controlled withCONFIG_MEMFAULT_METRICS_MEMORY_USAGE
. -
Print the Memfault OTA URL from
memfault_esp_port_ota_update()
when a new update is available, for example:esp32> memfault_ota_check I (98125) mflt: Checking for OTA Update Download URL: https://ota-cdn.memfault.com/2950/9757/19036619757?token=0123456789abcdef&expires=1726192800&v=2 I (98775) mflt: Update available! esp32> memfault_ota_perform I (15515) mflt: Checking for OTA Update Download URL: https://ota-cdn.memfault.com/2950/9757/19036619757?token=0123456789abcdef&expires=1726192800&v=2 I (16205) mflt: Starting OTA download ...
-
-
Zephyr:
- The
cpu_temp
metric has been renamed tothermal_cpu_c
to better reflect the metric's purpose. The metric is still collected by default on platforms with an enableddie-temp0
sensor, and can be disabled by settingCONFIG_MEMFAULT_METRICS_CPU_TEMP=n
.
- The
-
ESP-IDF:
-
The
cpu_temp
metric has been renamed tothermal_cpu_c
to better reflect the metric's purpose. The metric is still collected by default on ESP32 variants that support it (all but ESP32), and can be disabled by settingCONFIG_MEMFAULT_METRICS_CPU_TEMP=n
. -
The Kconfig
CONFIG_MEMFAULT_ESP_HEAP_METRICS
has been replaced withCONFIG_MEMFAULT_METRICS_MEMORY_USAGE
.
-
-
ESP-IDF:
- Fix a minor issue where MEMFAULT_LOG_x() macros (MEMFAULT_LOG_ERROR() etc ) would be recorded twice in the log buffer.
-
General:
- Fix an error in the unit test CI build due to the addition of the
-Wc11-c2x-compat
compiler warning flag. This flag is not valid for the C++ compiler, and has been changed to be enabled only for the C compiler.
- Fix an error in the unit test CI build due to the addition of the
-
nRF-Connect SDK:
- Fix a possible stack overflow when tracking the Memfault Connectivity Connected Time Vital for the nRF9160 LTE connection, due to a change in the nRF-Connect SDK v2.7.0 from prior versions.
-
General:
- Improve assert stack unwinding for Clang builds when
-flto
is enabled.
- Improve assert stack unwinding for Clang builds when
-
Zephyr:
-
Add a new Kconfig option,
CONFIG_MEMFAULT_SOC_FAMILY_ESP32
, to resolve an error when referencing the deprecatedCONFIG_SOC_FAMILY_ESP32
Kconfig (removed in Zephyr 3.7.0 as part of Hardware Model V2). This new option is used in the Memfault Zephyr port to check if an ESP32 SOC is being used. -
Remove references to the deprecated
BOOTLOADER_ESP_IDF
Kconfig symbol in the Memfault Zephyr port (removed in Zephyr 3.7.0).
-
-
nRF-Connect SDK:
-
Add support for the following reboot reasons on nRF series SOCs. These reboot reasons are tracked as
kMfltRebootReason_DeepSleep
.NRF_POWER_RESETREAS_OFF_MASK
NRF_POWER_RESETREAS_NFC_MASK
NRF_POWER_RESETREAS_CTRLAP_MASK
-
-
Zephyr:
-
Use
MEMFAULT_ASSERT_HALT_IF_DEBUGGING_ENABLED
to control whether coredumps trigger a halt when a debugger is attached. -
Add a new Kconfig option,
CONFIG_MEMFAULT_RAM_BACKED_COREDUMP_REGION
, to set the RAM region used for storing RAM-backed coredumps. -
Fix a 🐛 when trying to communicate via HTTPS with Memfault on the nRF91x. On the nRF91x, socket operations are offloaded to the nRF modem lib, which does not currently support the socket option
TLS_CERT_NO_COPY
. In v1.9.4, this socket option was applied when TLS was enabled (!g_mflt_http_client_config.disable_tls
) and Zephyr version was >=3.0.0 (when support for this socket option was added). Therefore, devices on SDK versions >=1.9.4 and <1.11.2 trying to communicate with Memfault will run into a no protocol support error (ENOPROTOOPT
) in the nRF modem lib. Since this option is only required to use the DER format,CONFIG_MEMFAULT_TLS_CERTS_USE_DER
now depends on the Zephyr-implemented socket operations being used (!NET_SOCKET_OFFLOAD
). -
Fix the build when using Zephyr 3.7.0 and leveraging the HTTP client and/or ESP32 port. The Memfault HTTP client would fail to build due to the wrong
crypto.h
header getting picked up in the build. Additionally, due to the removal of default support for mbedTLS hash algorithms in Zephyr,CONFIG_MBEDTLS_SHA1
now must be enabled explicitly when using any of Memfault's CA certificates. When using PEM and leveraging Zephyr's in-tree mbedTLS and config file (CONFIG_MBEDTLS_BUILTIN=y && CONFIG_MBEDTLS_CFG_FILE="config-tls-generic.h"
),CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT=y
is required for PEM certificate support. To simplify certificate format selection, a new choice Kconfig calledCONFIG_MEMFAULT_TLS_CERTS_FORMAT
has been added. Use the configsCONFIG_MEMFAULT_TLS_CERTS_USE_PEM
andCONFIG_MEMFAULT_TLS_CERTS_USE_DER
to choose the certificate format.CONFIG_MEMFAULT_TLS_CERTS_USE_DER
is the default choice config. Finally, the KconfigCONFIG_SOC_FAMILY_ESP32
is now deprecated. References of this Kconfig now also check the new KconfigCONFIG_SOC_FAMILY_ESPRESSIF_ESP32
. See Zephyr's 3.7 Migration guide for more details.
-
-
Dialog
-
Add support to the existing DA145xx port for the DA14535 by adding the correct memory region for
memfault_platform_sanitize_address_range()
. -
Fix several 🐛s in
memfault_reboot_reason_get()
andmemfault_platform_reboot()
implementations in the DA146x port. Inmemfault_reboot_reason_get()
, the bit masks were incorrectly applied and a block was missing to reset the reboot reason register ifMEMFAULT_REBOOT_REASON_CLEAR
is set. Inmemfault_platform_reboot()
, the mechanism to reboot the system has been updated fromhw_cpm_reboot_system()
toSWRESET
.
-
-
General:
- Add additional stubs to
ports/templates/memfault_platform_port.c
to help when integrating on a new platform
- Add additional stubs to
-
ESP-IDF:
- Trigger a null dereference crash when the
BOOT
button is pressed on the ESP32 example app. This is useful for testing the Memfault crash handling functionality without using the serial console.
- Trigger a null dereference crash when the
-
Add support for namespacing Session Metrics to support duplicate key names across heartbeats and sessions (eg
heartbeat.cpu_temp
andsession.cpu_temp
). This requires a change to how Session Metrics keys are set:- Before:
MEMFAULT_METRIC_SET_SIGNED(cpu_temp, 25)
(only 1 metric keycpu_temp
supported across heartbeats/sessions) - After:
MEMFAULT_METRIC_SET_SIGNED(cpu_temp, 25)
for settingheartbeat.cpu_temp
MEMFAULT_METRIC_SESSION_SET_SIGNED(cpu_temp, session, 25)
for settingsession.cpu_temp
- Before:
-
General:
-
Fix a 🐛 in reboot tracking classification when calling
memfault_reboot_tracking_boot()
with abootup_info
parameter containing an unexpected type of reboot reason (or no reboot reason) after a previously recorded expected reason. This results in "Expected Reboots" recorded usingMEMFAULT_REBOOT_MARK_RESET_IMMINENT()
to be incorrectly flagged as an "Unexpected Reboot" and causes an incorrectoperational_crashfree_hours
metric getting reported and a lower Stability score. -
Cleanup comment to old packetizer API
-
Add
-fdebug-prefix-map
to FreeRTOS QEMU example
-
-
ESP-IDF:
-
Improved the CLI results when running the
post_chunks
test command (used to trigger an upload to Memfault) to be more informative, for example:esp32> post_chunks I (12593) mflt: Data posted successfully, 262285 bytes sent esp32> post_chunks I (204093) mflt: No new data found
-
-
Zephyr
-
Update samples to use the newly-released Zephyr v3.7.0 🥳
-
Add explanatory output to Memfault
test busfault|hardfault
shell commands when Trusted Firmware-M (TF-M) is in use -
The RTC-based implementation of
memfault_platform_time_get_current()
used a define namedRTC
, which conflicts with the STM32 HAL definition here. Rename the define toMFLT_RTC_NODE
to avoid the conflict.
-
-
nRF-Connect SDK:
- Fix a compilation error when building NCS v2.7.0 with the latest Memfault firmware SDK (v1.10.1, the previous SDK release).
-
General:
-
Removed a warning when compiling the SDK for Cortex-A targets (ARM v7a). Support for this target is no longer experimental.
-
Improve coredump capture on ARMv7-A/R (Cortex-A/R), capturing additional CPU registers
r8
+r9
in the coredump. -
Fix a compilation issue with older versions of
gcc-arm-none-eabi
that do not support thePRIu64
format specifier (or are missing C99 format specifiers). Thanks to @iotengtr for reporting this issue in #72 !
-
-
Zephyr:
- Include the Zephyr Device Tree output in the ELF file in a debug section,
which can be used for reference. Memfault is exploring other use cases for
this data in our backend. This feature is controlled with
CONFIG_MEMFAULT_DTS_IN_ELF
, enabled by default.
- Include the Zephyr Device Tree output in the ELF file in a debug section,
which can be used for reference. Memfault is exploring other use cases for
this data in our backend. This feature is controlled with
-
Zephyr:
-
Add support for Memfault Logging when
CONFIG_LOG_MODE_MINIMAL=y
, in addition to the previously supportedLOG_MODE_DEFERRED
(Zephyr default) andLOG_MODE_IMMEDIATE
. Zephyr minimal log mode disables all backends- logs are simply sent toprintk
. -
For ESP32 chips, place the reboot reason tracking into a dedicated section,
.rtc_noinit
, to ensure the reboot reason is preserved across reboots. This was previously only supported on Zephyr ESP32-S3/S2 devices (all ESP32 devices on ESP-IDF already support this). -
Fix a bug where the default
memfault_platform_get_device_info()
, which uses the hwinfo subsystem, when available, was incorrectly disabled whenCONFIG_MEMFAULT_REBOOT_REASON_GET_CUSTOM=y
.
-
-
General:
- Improve the
memfault_demo_cli_cmd_busfault()
function (accessed viatest_busfault
/mflt test busfault
demo CLI commands) to produce BusFaults on more devices. Previously, certain chips would either not produce a fault, or would produce a MemManage exception instead.
- Improve the
-
Zephyr:
-
Updated the Memfault fault handler to support deprecated exception info structure coming in Zephyr v3.7.0. This change is backward compatible with older Zephyr versions.
-
By default, include the
zephyr.meta
build metadata in the output ELF file as an unallocated section. This provides a list of module SHAs, useful when reconstructing the dependencies used to build a particular ELF file. This feature is controlled withCONFIG_MEMFAULT_BUILD_META_IN_ELF
. -
Add a new Kconfig option,
CONFIG_MEMFAULT_USE_MEMFAULT_BUILD_ID
, which will apply a Memfault Build ID instead of a GNU Build ID when enabled. It defaults to enabled whenCONFIG_BOOTLOADER_ESP_IDF
is enabled- this applies to ESP32 boards that are using the ESP-IDF bootloader, instead of an MCUBoot bootloader. MCUBoot bootable images are compatible with the standard GNU Build IDs. -
Add a new API,
memfault_zephyr_fota_download_callback()
, to the Zephyr FOTA implementation to allow users to write their own callback that is invoked when the download of a OTA payload is complete. The default download callback will mark the new image as pending, set a firmware update reboot reason, and reboot the system. Custom callbacks may, for example, be used to perform application-specific system shutdown procedures, or allow the FOTA update call to return to the calling context so a testing framework could mark the operation successful. Users can override the default callback with their own implementation using a new Kconfig optionCONFIG_MEMFAULT_ZEPHYR_FOTA_DOWNLOAD_CALLBACK_CUSTOM
.
-
-
ESP-IDF:
- Add a periodic HTTP upload task. This feature starts a task dedicated to
posting any available Memfault data via HTTPS. Enable with
CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD=y
.
- Add a periodic HTTP upload task. This feature starts a task dedicated to
posting any available Memfault data via HTTPS. Enable with
-
General:
- Add 2 new QEMU targets for the FreeRTOS QEMU example, for Cortex-M4F and Cortex-M33. The targets can be found here
-
ESP-IDF:
-
The default Device Info Software Version (Kconfig
CONFIG_MEMFAULT_DEVICE_INFO_SOFTWARE_VERSION
) has been updated to0.0.0
from1.0.0-dev
for the built-in Device Info implementation. Seemenuconfig
orports/esp_idf/memfault/Kconfig
for details. This should only affect users who are using the default value for that Kconfig. -
Fix a bug when
CONFIG_MEMFAULT_LWIP_METRICS=y
that may cause invalid metric values. LwIP stats by default are only 16-bits wide and this can cause underflow when calculating heartbeat values. This fix forcesLWIP_STATS_LARGE=1
to make LwIP use 32-bit counters. -
Add a feature to the esp32 example app to enable overriding the Memfault server URLs (ex: for a proxy).
-
Improve docs and comments in example app
-
-
General:
-
Updated the default exception handler name for Memory Management exceptions from
MemoryManagement_Handler
toMemManage_Handler
(set byMEMFAULT_EXC_HANDLER_MEMORY_MANAGEMENT
indefault_config.h
when not overridden by the user). This aligns with the more recent CMSIS naming convention for exception handlers. A backwards-compatible implementation is included to avoid breaking users relying on the previous default. -
Add
libcurl
-based samples for posting chunks to Memfault and checking for latest OTA release.
-
-
ESP-IDF:
-
Fix CLI command,
memfault_ota_check
, to return 0 to the console component when an update is available. -
Add the temperature metric
cpu_temp
which is measured using an internal temperature sensor that many ESP32 boards have built-in. This metric is collected by default with the KconfigCONFIG_MEMFAULT_METRICS_CPU_TEMP=y
. -
Enable recording vprintf data into the Memfault log buffer through a vprintf hook. Users can call
memfault_esp_port_vprintf_log_hook()
from their vprintf handler so they can use both their vprintf handler and record logs into Memfault's log buffer. To use this feature, setCONFIG_MEMFAULT_LOG_USE_VPRINTF_HOOK=n
.
-
-
Zephyr:
-
Fix a bug in
memfault_zephyr_port_post_data_return_size()
where a positive value could be returned in the event of a failure instead of a negative value. This would result inmflt post_chunks
returning a successful post message even though there was a failure such as a DNS lookup failure. -
Add the temperature metric
cpu_temp
which is measured using an internal temperature sensor that some Zephyr boards have. Similar to ESP-IDF, this metric is collected by default with the KconfigCONFIG_MEMFAULT_METRICS_CPU_TEMP=y
, but the board must have the device tree nodedie-temp0
for this option to be used. -
Add an example for collecting thread stack usage metrics when the thread handles are not accessible in the desired scope. Users can leverage the Zephyr routine
k_thread_foreach()
to register a callback that will be called with each thread'sk_thread
handle. In the callback, users can read the stack usage via the handle and set their metrics.
-
-
Zephyr:
- Change the error return value for
memfault_zephyr_port_http_upload_sdk_data()
to a negative value instead of 1. This change aligns with the error return value for the other Zephyr HTTP client APIs, and simplifies logic in the HTTP client.
- Change the error return value for
-
ESP-IDF:
- Fix a case where
esp_http_client_cleanup()
was not called in certain scenarios (for example, if the access point is connected, but there is no outside internet access), which resulted in a memory leak. Thanks to @mykmelez for providing the fix in #71 🎉!
- Fix a case where
-
ESP-IDF:
- Fix an issue with the Memfault ESP-IDF integration to support the newly released ESP-IDF v5.1.4.
-
Zephyr:
-
Add support for tracking ESP32 reboots in
.rtc_noinit
section. This improves tracking of the OTA Reboot Reason when the device reboots after an OTA update. -
Fix compilation warnings when
CONFIG_MEMFAULT_COREDUMP_FULL_THREAD_STACKS=y
is enabled. Thanks to @fouge for providing this fix in #70 🎉!
-
-
General:
- Extend
eclipse_patch.py
to support adding the Memfault SDK files to an STM32Cube IDE project.
- Extend
-
General:
- Correctly compile out the
non-volatile event storage feature
when
MEMFAULT_EVENT_STORAGE_NV_SUPPORT_ENABLED
is set to0
. This feature was previously not fully disabled, leaving some unused code in the final executable. This is a minor code size improvement (approximately 300 bytes) when the system is disabled (default).
- Correctly compile out the
non-volatile event storage feature
when
-
Zephyr:
-
Improve support for event timestamps using Zephyr RTC devices, by adding support for RTC nodes identified using
DT_ALIAS()
in addition toDT_NODELABEL()
. Thanks to @corytodd for providing the fix in #68! -
Add a Memfault HTTP OTA client backend for Zephyr MCUBoot platforms. This is enabled with the
CONFIG_MEMFAULT_ZEPHYR_FOTA_BACKEND_MCUBOOT
Kconfig flag. The OTA process is triggered by calling thememfault_zephyr_fota_start()
function, which is also exposed in the shell via themflt get_latest_release
command. -
Add basic support for Xtensa targets in the Memfault Zephyr port. This specifically targets the ESP32-S3 SOC.
-
Add a success message when the Zephyr HTTP client posts data to Memfault.
-
-
ESP-IDF:
-
Wrap calls to
esp_event_loop_create_default()
to prevent crashes if called multiple times. This feature is enabled by default and is disabled withCONFIG_MEMFAULT_WRAP_EVENT_LOOP_CREATE_DEFAULT=n
-
Add an example Session Metric to the ESP32 example app, which tracks statistics during the ESP32 OTA session (bytes sent + received, etc).
-
-
nRF Connect SDK:
-
Enable periodic upload,
CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD=y
, by default for nRF91x builds -
Default to
CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_DEDICATED_WORKQUEUE
when periodic upload is enabled -
Improve the stability of the nRF9160 sample app, by increasing the
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE
to2048
.
-
-
Zephyr:
- Add a built-in implementation of
g_mflt_http_client_config
for Zephyr devices using the Memfault HTTP client, which holds the Memfault Project Key set via the Kconfig symbolCONFIG_MEMFAULT_PROJECT_KEY
. Users updating from a previous version will have to set this Kconfig symbol when building, and any existing implementation ofg_mflt_http_client_config
should be removed.
- Add a built-in implementation of
-
General:
- A new platform function,
memfault_platform_metrics_connectivity_boot()
, can be enabled to be called from the Memfault SDKmetrics_boot()
function after the metrics subsystem is initialized. This platform function is used for setting any initial state information for Connectivity metrics, and has default implementations for ESP-IDF (WiFi) and nRF9160 (LTE) devices.
- A new platform function,
-
ESP-IDF:
- Add a new Kconfig setting,
CONFIG_MEMFAULT_COREDUMP_STORAGE_WRITE_OFFSET_SECTORS
, which can be used to set an offset into the coredump storage area where coredumps are written. The full partition will still be erased, but coredumps will be written starting at the sector offset selected with this setting. The skipped sector will remain at the erased value,0xff
for all bytes.
- Add a new Kconfig setting,
-
Zephyr:
-
Added a built-in weakly defined implementation of
memfault_platform_get_device_info()
, which provides:.device_serial
: A default device serial based on the SOC's unique ID registers, via thehwinfo
subsystem. This is the default device serial whenCONFIG_HWINFO=y
. IfCONFIG_HWINFO=n
, the fallback device serial isCONFIG_SOC "-testserial"
..software_type
: Configurable withCONFIG_MEMFAULT_BUILTIN_DEVICE_INFO_SOFTWARE_TYPE
, defaults to"app"
.software_version
: Configurable withCONFIG_MEMFAULT_BUILTIN_DEVICE_INFO_SOFTWARE_VERSION
. Defaults to an identifier based on theVERSION
file in the application, using the Zephyr Application Version feature, or"0.0.0"
if unavailable..hardware_version
: Configurable withCONFIG_MEMFAULT_BUILTIN_DEVICE_INFO_HARDWARE_VERSION
. Defaults to an identifier based onCONFIG_BOARD
andCONFIG_BOARD_REVISION
(if set).
-
Add a new Zephyr example app for the ST NUCLEO-WBA55CG board, under
examples/zephyr/nucleo_wba55cg
. This example demonstrates the Memfault SDK integration on the NUCLEO-WBA55CG board.
-
-
nRF-Connect SDK:
- Add Connected Time Vital
out-of-the-box for nRF9160 projects, tracking modem connected time. This is
controlled with the Kconfig
CONFIG_MEMFAULT_NRF_CONNECTIVITY_CONNECTED_TIME_NRF91X
, enabled by default.
- Add Connected Time Vital
out-of-the-box for nRF9160 projects, tracking modem connected time. This is
controlled with the Kconfig
- General:
- Scale values now fully supported. This metric metadata will scale down metric values by the specified factor. Metrics with no specified scale value will not be scaled
- Fix a 🐛 that would reset metric values after running a session start callback. This prevented setting metrics at the start of a session.
- Zephyr:
- Add a metric using a scale value to our Zephyr QEMU example. This metric measures CPU usage (in permille, 0.0-100.0%) of the main thread.
-
FreeRTOS:
- Add a compile time error when the
ports/freertos/config/memfault_metrics_heartbeat_freertos_config.def
file is not included from the usermemfault_metrics_heartbeat_config.def
file. Compilation would fail previously with hard-to-follow errors due to missing metrics definitions. This change makes the compilation error explicit.
- Add a compile time error when the
-
ESP-IDF:
-
Permit disabling the Memfault logging hook into
esp_log_set_vprintf()
(by default this is enabled on system boot). UseCONFIG_MEMFAULT_LOG_USE_VPRINTF_HOOK=n
to disable the Memfault hook. Note that this will disable capturing ESP-IDF logs in Memfault. -
Allow disabling the built-in Connectivity Core Metric collection, which is enabled by default to track WiFi uptime. Use
CONFIG_MEMFAULT_ESP_WIFI_CONNECTIVITY_TIME_METRICS=n
to disable the built-in implementation.
-
-
General:
-
EXPERIMENTAL: Add the option to set a scale factor when defining a Metric. The scale factor will in the future be used to divide the uploaded metric values. For example, if a Metric is defined with a scale factor of
10
, all values reported for that Metric will be divided by10
when received by Memfault. The resulting value is stored as a floating point number in Memfault. -
Minor tweak to the Eclipse patcher script to better handler folders with partially common path prefixes.
-
-
ESP-IDF:
- Fix missing call to
memfault_boot()
in the ESP32 example app that was causing the device to not boot correctly. This was a regression in v1.7.4.
- Fix missing call to
-
FreeRTOS:
- Add a built-in metric for tracking the FreeRTOS Timer Task stack bytes free,
timer_task_stack_free_bytes
. This metric is enabled by default and can be disabled by setting#define MEMFAULT_FREERTOS_COLLECT_TIMER_STACK_FREE_BYTES 0
inmemfault_platform_config.h
.
- Add a built-in metric for tracking the FreeRTOS Timer Task stack bytes free,
-
ESP-IDF:
- Modify a message when coredump storage is detected to be too small from an error to a warning
-
FreeRTOS:
- Fix an integer overflow issue affecting long heartbeat intervals (>> 1
hour), due to a limitation in the implementation of
pdMS_TO_TICKS()
in older FreeRTOS versions. Newer version of FreeRTOS (as ofV11.0.0
published December 2023) have fixed this issue. - Add a stack usage metric to the FreeRTOS example app
- Fix an integer overflow issue affecting long heartbeat intervals (>> 1
hour), due to a limitation in the implementation of
-
nRF-Connect SDK:
-
Update the Memfault SDK's nRF-Connect SDK example apps to nRF-Connect SDK v2.6.0
-
In the Memfault SDK nRF9160 example app, set the Kconfig flag
CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_1024=y
inprj.conf
instead of via a conditionalCMakeLists.txt
expression. This makes the setting more explicit for users that are referencing the sample app.
-
-
ESP-IDF:
- Enable disabling the Memfault component by setting the
MEMFAULT_DISABLE=1
environment variable in the build environment (ex:MEMFAULT_DISABLE=1 idf.py build
). This is useful in cases where the Memfault component can not be n-selected in the application's rootCMakeLists.txt
but needs to be conditionally excluded, for example when building a reduced factory firmware image.
- Enable disabling the Memfault component by setting the
-
Zephyr:
-
Add new Kconfig flags for the following Memfault Core Metrics:
MEMFAULT_METRICS_SYNC_SUCCESS
(default=y)MEMFAULT_METRICS_MEMFAULT_SYNC_SUCCESS
(default=y)MEMFAULT_METRICS_CONNECTIVITY_CONNECTED_TIME
(default=y)MEMFAULT_METRICS_BATTERY_ENABLE
(default=n)
Additionally, a Kconfig flag
MEMFAULT_BATTERY_METRICS_BOOT_ON_SYSTEM_INIT
will enable auto-initialization of battery metrics on system init (requiresmemfault_platform_get_stateofcharge()
to be implemented).See https://mflt.io/core-metrics for more information on Core Metrics.
-
-
ESP-IDF:
- Add preliminary support for the upcoming ESP-IDF v5.3.0 release.
-
General:
-
The Memfault Self Test component boot check now prints all components that are booted (previously only un-booted components would print):
MFLT:[INFO] ============================= MFLT:[INFO] Component Boot Test MFLT:[INFO] ============================= MFLT:[INFO] Component | Booted?| MFLT:[INFO] ----------------------------- MFLT:[INFO] Event Storage | yes| MFLT:[INFO] Logging | yes| MFLT:[INFO] Reboot Tracking | yes| MFLT:[INFO] Trace Event | yes| MFLT:[INFO] All components booted MFLT:[INFO] =============================
-
Restore the Memfault Demo CLI
heartbeat
command, which was unintentionally removed in v1.7.1. This command triggers a heartbeat on-demand, for testing heartbeat functionality.
-
-
Zephyr:
- A few minor changes to support the upcoming Zephyr 3.6 release, specifically for devices that use mbedTLS for TLS connections.
-
ESP-IDF:
- v1.7.0 of the SDK added a Kconfig flag to enabled Compact Logs,
CONFIG_MEMFAULT_COMPACT_LOG_ENABLE
. Updating from older versions of the SDK would require opting in to that option, even if Compact Logging was enabled via the Memfault config flag,MEMFAULT_COMPACT_LOG_ENABLE
. Instead, support enabling Compact Logs both via the Memfault config flag or the Kconfig flag, to require no changes when updating the SDK for existing users.
- v1.7.0 of the SDK added a Kconfig flag to enabled Compact Logs,
-
General:
- Fix a reboot reason test on MacOS by adding a stub implementation of a function to avoid an empty archive not allowed by the system clang install
- Add a new macro
MEMFAULT_REBOOT_MARK_RESET_IMMINENT_CUSTOM()
that is more concise for custom reboot reasons by taking the reboot reason name directly. Previously,MEMFAULT_REBOOT_MARK_RESET_IMMINENT()
was the only option, which requires passing a key withMEMFAULT_REBOOT_REASON_KEY()
. - Add a session start callback with
memfault_metrics_session_register_start_cb()
. This change enables, for example, tracking battery percent drop across sessions; battery state tracking variables can now be initialized at the start of a session. - Add a coredump storage test to the self test which will now test the
coredump storage implementations and check available storage capacity. This
is currently experimental and must be explicitly enabled with the Kconfig
CONFIG_MEMFAULT_SHELL_SELF_TEST_COREDUMP_STORAGE=y
on Zephyr,CONFIG_MEMFAULT_CLI_SELF_TEST_COREDUMP_STORAGE=y
on ESP-IDF, or by adding#define MEMFAULT_DEMO_CLI_SELF_TEST_COREDUMP_STORAGE 1
to yourmemfault_platform_config.h
for other platforms. - Convert the previous
heartbeat_dump
command tometrics_dump
that can either dump all current heartbeat metrics withmetrics_dump heartbeat
or all session metrics withmetrics_dump sessions
that haven't yet been exported. These commands help with testing metrics collection locally without needing to push chunks to Memfault. - Apply a handful of changes to fix items raised by a new static analyzer
- Fix a minor formatting issue that was causing a compilation error for CC ARM
- Update support links to refer to the preferred site https://mflt.io/contact-support instead of the Memfault support email. This link will redirect to a form where questions can be sent to the Memfault support team.
- Update the
README.md
s in example apps to point to the Demo CLI page on the Memfault docs website where comprehensive information is available on commands and their output
-
nRF-Connect SDK:
- Fix a problem caused by mismatched root certificates in modem storage. This change will ensure that all certificates are updated if they do not match expected contents. Prior to v1.7.1, the SDK would only update a certificate by checking each tag for certificate existence, not certificate content. In v1.3.0, the order of root certificates was changed and one was removed. On devices running pre-1.3.0 firmware, updating to later versions can hit a mismatch between the expected certificates and those in modem storage.
- Remove a root certificate deprecated in v1.3.0 if present in modem storage. Devices using an SDK version before v1.3.0 may contain a now deprecated root certificate.
-
General:
- 🎉Custom Reboot Reasons!🎉 The SDK now allows creating custom reboot reasons
in addition to those defined in
components/include/memfault/core/reboot_reason_types.h
. Users can create custom reboot reasons for both expected and unexpected reboots. For more information seecomponents/include/memfault/core/reboot_tracking.h
. Enable this feature with Kconfigs in Zephyr and ESP-IDF (CONFIG_MEMFAULT_REBOOT_REASON_CUSTOM_ENABLE=y
) or by adding#define MEMFAULT_REBOOT_REASON_CUSTOM_ENABLE 1
to yourmemfault_platform_config.h
. - Added an option to include a Project Key in a chunk message header. This
allows a chunk to specify which project the included data should be sent to.
The default behavior is to use the project specified by the Project Key
header in the POST upload. To enable, add
#define MEMFAULT_MESSAGE_HEADER_CONTAINS_PROJECT_KEY 1
and#define MEMFAULT_PROJECT_KEY "<project key string>"
to yourmemfault_platform_config.h
. Any chunks sent using this configuration will be sent to the project routed withMEMFAULT_PROJECT_KEY
rather than the project routed with the POST header's Project Key.
- 🎉Custom Reboot Reasons!🎉 The SDK now allows creating custom reboot reasons
in addition to those defined in
-
General:
- Improved suggested linker snippets defining coredump memory regions
- Added a self test to validate platform time functions,
memfault_platform_get_time_since_boot_ms()
andmemfault_platform_time_get_current()
. This test will catch errors like non-monotonically increasing counters and current time reported as near epoch time - Fixed backspace handling in the FreeRTOS QEMU example console
- Added
-fsanitize=leak
to the SDK unit tests (Linux only) - Fixed a missing
strnlen()
definition when enabling the self test with some libc implementations. This function is part of a POSIX standard that might be missing from some libc implementations - Added the previous release commit for 1.6.2 to
.git-blame-ignore-revs
to allow for bettergit blame
output since this commit contains only formatting changes.
-
Zephyr:
- Added an example CDR implementation to the example QEMU app
- Added a Kconfig, (
CONFIG_MEMFAULT_RECORD_REBOOT_ON_SYSTEM_INIT
) to allow deferring reboot reason collection to a later point in time. Setting this option ton
is intended to help when device info is only available after boot completes. - Added built-in metrics for Zephyr's IP subsystem,
(
CONFIG_MEMFAULT_METRICS_TCP_IP
) - Added Kconfig to select either PEM or DER formats for TLS certificates,
(
CONFIG_MEMFAULT_TLS_CERTS_USE_DER
)
-
ESP-IDF:
- Added a Kconfig to enable/disable compact logging
(
CONFIG_MEMFAULT_COMPACT_LOG_ENABLE
) - Improved build compatibility when building with PlatformIO
- Added support for networking over Ethernet interfaces
- Added a built-in
connectivity_connected_time
core metric for WiFi devices, (CONFIG_MEMFAULT_ESP_WIFI_CONNECTIVITY_TIME_METRICS
)
- Added a Kconfig to enable/disable compact logging
(
-
General:
- Apply
clang-format
to the entire codebase, to ensure consistent code formatting. The formatting rules are defined in.clang-format
. No other changes are included in this release. A.git-blame-ignore-revs
entry will be added in the next release, to enable ignoring this commit when runninggit blame
. Use this ignore file in your local repo withgit config blame.ignoreRevsFile=.git-blame-ignore-revs
.
- Apply
-
General:
-
Add a reboot reason self test, which validates the reboot reason data is correctly preserved through device reboot. This test first sets a custom reboot reason, then calls
memfault_platform_reboot()
to reboot the system. To verify the operation succeeded, the self test is called again to check the reboot reason was saved. The reboot reason self test can be performed by passing the appropriate flags when calling thememfault_self_test_run()
file (seecomponents/include/memfault/core/self_test.h
for details), and from the demo CLI asself_test reboot
/self_test reboot_verify
. -
Fix a
ti-armcl
compiler warning due to enumeration mismatch in initialization (#190-D
). -
Add a compile-time option to enable the self-test module. Enabling the self-test increases code space utilization, and is usually of use during set-up and SDK integration testing. The self-test can be enabled by setting
#define MEMFAULT_SELF_TEST_ENABLED 1
inmemfault_platform_config.h
, or viaCONFIG_MEMFAULT_CLI_SELF_TEST=y
for ESP-IDF andCONFIG_MEMFAULT_SHELL_SELF_TEST=y
for Zephyr.
-
-
ESP-IDF:
- Expose a new function
memfault_esp_port_ota_get_release_url()
for fetching the OTA release URL without performing a download. This is useful for cases where the URL is needed for other purposes, such as for fetching a downstream device OTA artifact. Seeports/esp_idf/memfault/include/memfault/esp_port/http_client.h
for details.
- Expose a new function
-
nRF-Connect SDK:
- Add support for the new
fota_download_any()
(see documentation here), which accepts a list of certificates to use when executing FOTA downloads. This API is expected to be included in the upcoming nRF-Connect SDK v2.6.0 release.
- Add support for the new
-
ESP-IDF:
-
In the ESP32 example app, disable the shell history cache for the FatFS shell command handler, which saves some ~20kB of heap memory.
-
Also in the ESP32 example app, add a new built-in metric
sync_successful
which is set to1
when a successful Memfault OTA check-in is performed. Primarily added for demonstration purposes for the metric. See more information about Memfault Core Metrics here.
-
-
General:
-
Enhanced the Self-Test component with the following new features:
- Check that other components are initialized correctly (boot test)
- Check that exporting data over the console is supported (primiarly checking that the output buffer is large enough)
- Print information about the coredump regions that would be collected during a crash, for diagnostic purposes
-
-
nRF-Connect SDK:
- Fix a use-after-free problem in the Memfault FOTA helper code
(
ports/zephyr/ncs/src/memfault_fota.c
), where the allocated Memfault OTA download URL was freed too early. This issue was introduced in Memfault SDK v1.5.0, where support for FOTA on nRF-Connect SDK v2.4+ was improved.
- Fix a use-after-free problem in the Memfault FOTA helper code
(
-
Zephyr:
-
Fix a concurrent access bug in the Memfault Zephyr Logging Backend. Only affected configurations with
CONFIG_LOG_MODE_IMMEDIATE=y
. In certain cases the loggingctx
could be corrupted, causing unpredictable behavior. Replace the synchronization approach with an atomic primitive and correct a potential concurrency issue in the log panic handler. -
Fix a build warning for certain Zephyr configurations (when using
CONFIG_NEWLIB_LIBC=y
) due to a missing declaration forstrnlen
. This warning was introduced with the Memfault Self-Test additions in Memfault SDK v1.5.2.
-
-
General:
- The Battery Metrics platform API has been consolidated into a single
function,
int memfault_platform_get_stateofcharge(sMfltPlatformBatterySoc *soc)
, where the platform data is loaded into thesoc
struct. This should simplify the platform implementation, and enables platforms to return a non-zero value to indicate state-of-charge is unknown. See the new API in the header filememfault/metrics/platform/battery.h
- The Battery Metrics platform API has been consolidated into a single
function,
-
General:
-
Add a self-test component which checks the device's integration state. This self test is available via the demo cli command
self_test
, or can be called directly viamemfault_self_test_run()
(seeself_test.h
for details). Currently, it validates device info and the build ID. -
Add a helper macro called
MEMFAULT_REBOOT_MARK_RESET_IMMINENT
in order to make marking an imminent reboot easier. It takes the reboot reason as an argument.
-
-
ESP-IDF:
- Add an opt-in assert on malloc failure, controlled with
CONFIG_MEMFAULT_ASSERT_ON_ALLOC_FAILURE
. This is useful for tracking heap memory issues. Depending on the design, a system may in general not have any expected malloc failures, and may not be set up to handle them. This feature will generate issues tagged asOut Of Memory
in the Memfault platform.
- Add an opt-in assert on malloc failure, controlled with
-
Zephyr:
-
Adjust the implementation of
memfault_zephyr_port_http_upload_sdk_data()
to check the socket before each incremental call to thesend()
socket operation and wait for the socket to become available. If the socket takes too long (a healthy 5 second timeout is given), the function will return with an error. Note this function was previously blocking, but may now abort mid-transfer. This check was primarily added to prevent a busy loop that hogs the CPU, preventing lower priority threads from running. This situation could occur with larger HTTP transfers during which the socket may be busy processing tx data when another send request occurs. -
Fix a build error in the Zephyr RTC port.
-
-
nRF-Connect SDK:
- Correct a build error that occurs when
CONFIG_DOWNLOAD_CLIENT=y
+CONFIG_MEMFAULT_FOTA=n
. This fixes the second issue reported in #66
- Correct a build error that occurs when
-
General:
- The SDK config flag
MEMFAULT_EVENT_STORAGE_NV_SUPPORT_ENABLED
now defaults to0
, disabled. This saves a minor amount of code space. Most implementations don't need the feature; for users that require it, the flag will now need to be set inmemfault_platform_config.h
as#define MEMFAULT_EVENT_STORAGE_NV_SUPPORT_ENABLED 1
.
- The SDK config flag
-
General:
-
Added support for Session Metrics. These are similar to Heartbeat Metrics, except they are set on an arbitrary session interval (not required to be aligned to Heartbeat interval). Session metrics are useful for tracking device operation sessions- for example, measuring properties for a BLE connected stove top during a single cooking session. Session metrics automatically include a "session duration" timer metric.
Session metrics must be defined using the new session-specific APIs, but are set using the same
MEMFAULT_METRIC_SET_*
APIs as Heartbeat metrics.See the
metrics.h
header file for usage details. -
New built in metrics for measuring the following properties:
-
crash-free hours: enabled by default, generates
operational_hours
andoperational_crashfree_hours
metrics, which are automatically processed by Memfault -
battery drop: enabled with
#define MEMFAULT_METRICS_BATTERY_ENABLE 1
inmemfault_platform_config.h
. See more information in the header file for how to use the metric. -
connectivity: enabled with
MEMFAULT_METRICS_SYNC_SUCCESS
/MEMFAULT_METRICS_MEMFAULT_SYNC_SUCCESS
/MEMFAULT_METRICS_CONNECTIVITY_CONNECTED_TIME
. See more information in the header file for how to use the metric.
These metrics are considered first-class metrics by Memfault, are exempt from quota limits, and are automatically processed by Memfault.
-
-
-
Zephyr:
-
By default, set the
sync_memfault_successful
/sync_memfault_failure
metrics for devices using Memfault's Zephyr HTTP chunk upload functionality. This feature is controlled with theCONFIG_MEMFAULT_SYNC_MEMFAULT_METRICS
Kconfig flag. -
Automatically set captured timestamps for events for devices that either implement the RTC subsystem, or use the Nordic
date_time
library. The appropriate option is enabled by default based on which features are available, and can be controlled with the Kconfig flags:CONFIG_MEMFAULT_SYSTEM_TIME_SOURCE_DATETIME
orCONFIG_MEMFAULT_SYSTEM_TIME_SOURCE_RTC
.
-
-
ESP-IDF:
- By default, set the
sync_memfault_successful
/sync_memfault_failure
metrics for devices using Memfault's ESP-IDF HTTP chunk upload functionality. This feature is controlled with theCONFIG_MEMFAULT_SYNC_MEMFAULT_METRICS
Kconfig flag.
- By default, set the
-
General:
-
Add the ability to extend the Memfault Demo Shell command table with custom commands. This is used in the
examples/freertos
demo project to add 2 new commands:freertos_tasks
: print FreeRTOS task information, viavTaskList()
freertos_vassert
: trigger avAssertCalled
FreeRTOS assert, viaconfigASSERT()
The Shell extension API is documented in
components/include/memfault/demo/shell_commands.h
, and must be enabled by setting#define MEMFAULT_DEMO_SHELL_COMMAND_EXTENSIONS 1
inmemfault_platform_config.h
.
-
-
Zephyr:
-
Remove a warning in Zephyr 3.5+ where the
zephyr/random/rand32.h
header was renamed tozephyr/random/random.h
. This was reported in #66- thanks to @nordicjm for reporting this! -
Add test commands for exercising Secure Faults in ARM TrustZone-enabled chips:
mflt test badptr
mflt test isr_badptr
Note that non-TrustZone chips may not trigger a fault when running those commands.
-
-
nRF-Connect SDK:
-
Add the
CONFIG_AT_SHELL
setting to theexamples/nrf-connect-sdk/nrf9160
sample app. This permits sending raw AT commands, useful for testing. -
Specific to nRF-Connect based apps using FOTA, add a warning if
CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE > 1024
, which can sporadically error out on nRF9160 devices (there is a limitation in the modem, seeCONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_2048=y
) and DevZone note here. -
Improve FOTA support for nRF-Connect SDK 2.4+, by improving the technique used to find the correct Memfault server root cert. Memfault uses a fast CDN to improve OTA payload delivery, which uses a different root cert than the Memfault device server. Please contact support immediately if you encounter any cert-related issues.
-
- The metrics convenience API added in v1.4.3 (
MEMFAULT_HEARTBEAT_SET_*
and others) have been renamed toMEMFAULT_METRIC_SET_*
, to better support the new Session Metric feature.
-
General:
-
Rename this file from [
CHANGES.md
] to [CHANGELOG.md
]. -
For FreeRTOS, add a warning when
configRECORD_STACK_HIGH_ADDRESS
is not enabled. Memfault uses this to show stack sizes in the coredump view for coredumps on FreeRTOS systems. The warning can be disabled by enabling theconfigRECORD_STACK_HIGH_ADDRESS
FreeRTOS config flag, or by setting#define MEMFAULT_FREERTOS_WARN_STACK_HIGH_ADDRESS_UNAVAILABLE 0
. -
Make
memfault_packetizer_get_chunk()
returnfalse
if the buffer was too small to load a full chunk. Previously the function would returntrue
but with0
bytes loaded into the output buffer and*buf_len
set to0
. -
Update all example Metrics implementations to use the new API from v1.4.3 (eg
MEMFAULT_METRIC_SET_UNSIGNED
instead ofmemfault_metrics_heartbeat_set_unsigned
). -
Fix compilation for systems not integrating the Metrics component but using the Demo CLI (this regressed in v1.4.3).
-
-
General:
-
Add a new streamlined Metrics setter API:
MEMFAULT_METRIC_SET_SIGNED(key_name, signed_value)
MEMFAULT_METRIC_SET_UNSIGNED(key_name, unsigned_value)
MEMFAULT_METRIC_SET_STRING(key_name, value)
MEMFAULT_METRIC_TIMER_START(key_name)
MEMFAULT_METRIC_TIMER_STOP(key_name)
MEMFAULT_METRIC_ADD(key_name, amount)
These APIs can be used in place of the original APIs:
memfault_metrics_heartbeat_set_signed(MEMFAULT_METRICS_KEY(key_name), signed_value)
memfault_metrics_heartbeat_set_unsigned(MEMFAULT_METRICS_KEY(key_name), unsigned_value)
memfault_metrics_heartbeat_set_string(MEMFAULT_METRICS_KEY(key_name), value)
memfault_metrics_heartbeat_timer_start(MEMFAULT_METRICS_KEY(key_name))
memfault_metrics_heartbeat_timer_stop(MEMFAULT_METRICS_KEY(key_name))
memfault_metrics_heartbeat_add(MEMFAULT_METRICS_KEY(key_name), amount)
Saving some typing!
-
Add the ability to compute FreeRTOS task stack high watermarks when storing coredumps. This is useful only if the entire RAM (
.data
+.bss
) cannot be saved in the coredump. The feature is opt-in with the config flag#define MEMFAULT_COREDUMP_COMPUTE_THREAD_STACK_USAGE 1
. -
Add a
heartbeat
command to the core demo cli. This behaves the same as the commands of the same name already present in the Zephyr + ESP-IDF port. -
Add a
test_cassert
command to the core demo cli. This command executes a C stdlib<assert.h>``assert(0)
call. For platforms that do not implement aassert()
handler, a config flagMEMFAULT_DEMO_DISABLE_CASSERT
can be defined to0
to disable the command.
-
-
ESP-IDF:
- Add a new out-of-box metric,
wifi_ap_oui
, which will record the associated AP's Organizationally Unique Identifier (OUI) in the Memfault heartbeat.
- Add a new out-of-box metric,
-
Zephyr:
- Organize the Memfault Coredump Kconfig settings under a
Memfault Coredump Settings
submenu, for easier navigation when using graphical Kconfig frontends like menuconfig.
- Organize the Memfault Coredump Kconfig settings under a
-
General:
-
Disable a warning emitted by the ARM C Compiler v5 (
#188-D: enumerated type mixed with another type
) when initializing a structure incomponents/core/src/memfault_log.c
:314. -
Improve the quality of Assert backtraces when using the ARM C Compiler v5. Certain frames in the assert call stack were missing link register information, due to compiler optimizations based on the
noreturn
and unreachable compiler hints. These hints have been removed forarmcc
, which should permit full stack unwinding for Assert coredumps generated from builds on that toolchain. -
Perform an update of the timer when calling the
memfault_metrics_heartbeat_timer_read()
debug function. Fixes #65. Thanks to @LuskeyNoah for providing this fix!
-
-
ESP-IDF:
- Fix a missing piece enabling the "zero-config" integration (originally added
in
1.4.0
)- thememfault_platform_port.h
file was still incorrectly required. This is now fixed.
- Fix a missing piece enabling the "zero-config" integration (originally added
in
-
General:
- Improve the trace quality for asserts when using the IAR compiler and high
optimization settings (
-Oh
) - Add demo CLI command to print the current values of heartbeat metrics. Try this out in your demo CLI implementation or with the built-in CLI with Zephyr!
- Improve the trace quality for asserts when using the IAR compiler and high
optimization settings (
-
ESP-IDF:
-
Add the following built-in heap allocation metrics by default. These can be disabled with the
CONFIG_MEMFAULT_ESP_HEAP_METRICS
Kconfig flag.heap_free_bytes
heap_largest_free_block_bytes
heap_allocated_blocks_count
heap_min_free_bytes
-
-
Zephyr:
- Enable capturing Memfault-style compact logs
on Zephyr systems. Note that this does not enable decoding
Zephyr "dictionary logs",
but requires using the Memfault logging APIs directly (i.e.
MEMFAULT_LOG_INFO("...")
instead ofLOG_INF("...")
).
- Enable capturing Memfault-style compact logs
on Zephyr systems. Note that this does not enable decoding
Zephyr "dictionary logs",
but requires using the Memfault logging APIs directly (i.e.
-
General:
-
Add a
coredump_size
CLI command to the Zephyr, ESP-IDF, and demo CLI implementations. This command will print the computed size of the coredump and the available storage space. Can be used to tune coredump size. -
Enable providing the Memfault HTTP Client with a custom
memfault_platform_get_device_info()
callback, for when the device is uploading data for a downstream device, with different device info. -
When compact logging is enabled, route all
MEMFAULT_LOG_x()
statements through the compact serializer (MEMFAULT_COMPACT_LOG_SAVE
). Previously, logs had to explicitly use theMEMFAULT_COMPACT_LOG_SAVE
API to store in the compact form. -
Capture C stdlib
assert.h
asserts, by implementing the correct assert hooks for Newlib/Picolibc and IAR libc's. This can be disabled with the Memfault platform configMEMFAULT_ASSERT_CSTDLIB_HOOK_ENABLED
. This should improve the Trace quality for systems that are using the C stdlibassert(x)
functions.
-
-
ESP-IDF:
- Implement support for a "zero-config" integration on ESP-IDF. This change makes the template + platform config files optional. See the ESP32 Integration Guide section on configuration files for details.
-
ESP-IDF:
-
Fix a build issue when overriding the default device-info implementation,
CONFIG_MEMFAULT_DEFAULT_GET_DEVICE_INFO=n
. This was a regression in 1.3.3. -
Add a new Kconfig flag,
MEMFAULT_COREDUMP_STORAGE_MAX_SIZE
, which can be used to set the Memfault SDK's built-in ESP-IDF coredump storage implementation to artificially limit the maximum coredump storage size. This is useful for situations where the defaultmemfault_platform_coredump_get_regions()
function is still desirable, but the coredump maximum size needs to be limited (eg for bandwidth reasons). -
Switch to using
ESP_DRAM_LOGE
when logging an error from Memfault's FreeRTOS task tracking when the number of tasks created on the system exceedsMEMFAULT_PLATFORM_MAX_TRACKED_TASKS
(default of 16).
-
-
General:
- Remove the setting of the Memfault Firmware SDK version into a string metric on system boot. This value is now automatically extracted by the Memfault backend from the symbol file, and does not need to be set by devices.
-
ESP-IDF:
-
Fix build errors when building the ESP32 example app project on ESP-IDF versions earlier than v5. This was a regression in 1.3.4.
-
Conditionally remove a redundant call to
esp_timer_init()
during thememfault_boot()
sequence, which was causing a runtime error message. This call was originally required whenmemfault_boot()
was called as part of ESP-IDF system init, which was disabled by default in 0.31.4 and deprecated in 0.40.0. The redundant call was harmless but generated a nuisance error message.
-
-
Fix another build error in the public unit tests caused by the
-fanalyzer
flag. The-fanalyzer
static analyzer was generating a false positive on GCC 11. Updating the GCC version to 12 removes the false positive.
-
ESP-IDF:
-
Add a missing dependency to the
memfault
component,esp_https_ota
. It's only linked into the target project if thememfault_esp_port_ota_update()
API is used. This was previously an implicit dependency from thecommon
component dependencies, when buildingmemfault
into an ESP-IDF component-style project. This change fixes building for non-component-style ESP-IDF projects, where the default component dependencies might not be included. -
Multiple changes to the
examples/esp32
sample project:- Add a new
coredump_size
shell command, which prints out the maximum coredump size and the available coredump storage capacity. - Add new
settings_[get|set]
shell commands, and enable setting the LED brightness and blink interval to NVS. This is intended as a minor quality-of-life change for internal Memfault users of the example app.
- Add a new
-
-
Fix a build error in the public unit tests, caused by the recent addition of the
-fanalyzer
flag to the unit test compilation options.
-
Zephyr:
-
Add a new Kconfig flag,
CONFIG_MEMFAULT_FAULT_HANDLER_RETURN
, which will call the normalz_fatal_error
handler at the end of Memfault fault processing instead of rebooting the system. This is useful when user code needs to run withink_sys_fatal_error_handler()
just prior to system shutdown. Thanks to @JordanYates for the patch! Fixes #59. -
Add a timeout to the initial
send()
socket operation inmemfault_zephyr_port_http_upload_sdk_data()
, to abort the transfer if the socket is blocking for too long. That function will execute repeatedsend()
calls to drain all the buffered Memfault data; this update only changes the initial call to check for a timeout, but otherwise will keep trying until the process completes, or a watchdog triggers. This is to balance the existing behavior, where a badly performing socket will still eventually push data through, but improves the case where the socket fails on the initial send (more common failure mode). -
Remove a nuisance build warning generated when configured with
CONFIG_LOG_PRINTK=y && CONFIG_LOG_MODE_DEFERRED=y
. This impacts the usability of exporting base64-encoded chunks on the shell for testing (mflt export
command), but is otherwise harmless.
-
-
ESP-IDF:
-
Multiple changes to the
examples/esp32
sample project:- Disable WiFi SoftAP by setting
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
, since it's unused in the sample app. This saves about 40kB flash. - Permit setting the Memfault Project Key at runtime, with a new cli command
project_key
. The key is saved in Non-Volatile Storage on the ESP32 board.
- Disable WiFi SoftAP by setting
-
-
General:
- Enable using compact logs with the IAR build tools, by adding the needed
__no_alloc
attribute to the compact log symbols, to have the IAR linker set theNO_LOAD
attribute correctly on the compact log output section.
- Enable using compact logs with the IAR build tools, by adding the needed
-
ESP-IDF:
- The ESP-IDF port now implements a default
memfault_get_device_info()
function, which uses the device MAC address for the Memfault Device Serial. When updating the Memfault SDK in an existing project, this implementation will cause a linker error due to duplicate definition. To disable the built-in definition, setCONFIG_MEMFAULT_DEFAULT_GET_DEVICE_INFO=n
.
- The ESP-IDF port now implements a default
-
Zephyr:
- use
<cmsis_core.h>
instead of<nmi.h>
. Thanks @kmeinhar for this change! (see #64)
- use
-
nRF Connect SDK:
- Add missing Kconfig flags
CONFIG_FLASH_MAP=y
+CONFIG_STREAM_FLASH=y
for theexamples/nrf-connect-sdk/nrf5/
example app, for compatibility with nRF Connect SDK v2.4.1+. This was required due to an upstream Zephyr change.
- Add missing Kconfig flags
-
General:
- Add support for Memfault Compact Logs for C++ source files (previously only
supported in C source files). Compact logging can be enabled by setting
MEMFAULT_LOG_COMPACT_ENABLE=1
inmemfault_platform_config.h
. See the docs for more details. - Fix a missing include of
<intrinsics.h>
required by the IAR compiler
- Add support for Memfault Compact Logs for C++ source files (previously only
supported in C source files). Compact logging can be enabled by setting
- Zephyr:
- Add a new Kconfig,
CONFIG_MEMFAULT_COREDUMP_COMPUTE_THREAD_STACK_USAGE
, to control whether thread stack usage is computed and collected on device during a coredump.
- Add a new Kconfig,
- General:
- Remove an unused root certificate and adjust the order of certs to minimize additional TLS handshakes; DigiCert G2 is the most likely root cert so it is now the first one attempted in every place certificates are used. This update is trickled down from DigiCert's pivot in March 2023 to their G2 root cert as their default certificate.
- Zephyr:
- Add support for the new location of the
nmi.h
header which moved recently.
- Add support for the new location of the
- Add MQTT transport to esp32 example app
- Fix a unit test failure introduced in 1.2.3. No on-target code was impacted.
- General:
- Include the current MCU SDK version in the http client user agent header
- Zephyr:
- Update include paths for CMSIS headers for upcoming Zephyr support. Thanks @gmarull for the patch!
- Modus Toolbox:
- Allow a user application to override
memfault_metrics_heartbeat_collect_data
.
- Allow a user application to override
- ESP-IDF:
- Correct the heartbeat metrics key definition include configuration to generate a consistent key index across the application. This regressed in version 1.0.1 of the SDK.
- ESP-IDF:
- Add a
heartbeat
cli command to the ESP-IDF port that does the same thing as in Memfault's default demo console + Zephyr's console.
- Add a
- Zephyr:
- Add a new Kconfig option to the Zephyr port,
CONFIG_MEMFAULT_PLATFORM_EXTRA_CONFIG_FILE=y
, which causesmemfault_platform_config_extra.h
to be included in platform configurations. This can be utilized by a third party consumer of Zephyr to more easily extend the platform configurations set by Zephyr and avoid potentially losing a user's platform configurations set inmemfault_platform_config.h
, which happened in the nRF Connect SDK recently.
- Add a new Kconfig option to the Zephyr port,
- ESP-IDF:
- Eliminate several build warnings for our example app
- FreeRTOS:
- Fix a build error in our QEMU example when building on macOS
- Modus Toolbox:
- Update port to handle user override of SDK configs, metrics, trace_reasons, etc
- Update port to fix errors when disabling built-in WiFi metrics
- nRF Connect SDK:
- Enable mcuboot & NCS 1.4 with our example apps
- Silicon Labs:
- Add a demo CLI component for the emblib port. Check out our Simplicity Studio example app for usage
- Fix a build warning in emblib port flash storage (MSC) module
- Zephyr:
-
Set Memfault SDK version in a string metric on device boot, for easier tracking of SDK versions in the Memfault UI
-
Support using a different identifier for the GNU build id symbol (previously was fixed to
__start_gnu_build_id_start
). Use theMEMFAULT_GNU_BUILD_ID_SYMBOL
define inmemfault_platform_config.h
to override the default. For Zephyr, the Kconfig optionCONFIG_MEMFAULT_GNU_BUILD_ID_SOURCE_BUILTIN
can be used to override the builtin section specifier + linker fragment for the GNU build ID. Thanks to @JordanYates for posting this change in #60 🎉 -
Improvements to the ARMv7-R exception handling when the supervisor processor mode is active
-
Zephyr:
- Add an optional mode to create and open the HTTP socket in separate function calls, if the user needs to set additional socket options before connecting. See ports/zephyr/include/memfault/ports/zephyr/http.h for details. Fixes #52- thanks to @anicare-tero for posting this 🎉
-
Improve compatibility in reboot reason tracking and watchdog implementation on Silicon Labs Series 2 MCUs
-
Zephyr:
- Fix a build error when
CONFIG_MEMFAULT_LOGGING=n
, see #56. Thanks to @JordanYates for reporting this issue! - Fix a potential bug in the Memfault Log Backend when
CONFIG_LOG_MODE_IMMEDIATE=y
when flushing of fault logs during a crash
- Fix a build error when
- Reduce the amount of error logs emitted by the MbedTLS port HTTP client while polling for session established. This regressed in SDK version 1.1.0.
-
New built-in metrics 🎉 !
- FreeRTOS Idle Task runtime percentage metric:
idle_task_run_time_percent
. This is automatically enabled for FreeRTOS builds with the correct tracing options enabled, see ports/include/memfault/ports/freertos/metrics.h for details on how to enable or disable this metric. - MbedTLS metrics for maximum and current memory used:
mbedtls_mem_max_bytes
andmbedtls_mem_used_bytes
. These are automatically enabled for ESP-IDF projects, see ports/mbedtls/memfault_mbedtls_metrics.c for usage details - Renamed the built-in LwIP metrics added in SDK version 1.0.1 from
Tcp_Drop_Count
/Tcp_Rx_Count
/Tcp_Tx_Count
,Udp_Drop_Count
/Udp_Rx_Count
/Udp_Tx_Count
to be all lowercasetcp_drop_count
/tcp_rx_count
/tcp_tx_count
,udp_drop_count
/udp_rx_count
/udp_tx_count
- Add the following automatically enabled WiFi performance metrics to the
ESP-IDF port:
wifi_connected_time_ms
wifi_disconnect_count
wifi_sta_min_rssi
- FreeRTOS Idle Task runtime percentage metric:
-
Fix a bug in the mbedtls port causing an infinite loop under certain error conditions on TLS handshake
-
Zephyr:
- Improve log flushing in the Memfault log backend during fault when deferred
logging is enabled. This ensures the latest log statements are included in
the coredump log data, when the
CONFIG_MEMFAULT_LOGGING_ENABLE=y
- Improve log flushing in the Memfault log backend during fault when deferred
logging is enabled. This ensures the latest log statements are included in
the coredump log data, when the
-
ESP-IDF:
ESP_ERROR_CHECK()
assert coredumps will now correctly show as assert in the Memfault coredump analysis view, instead of "Hard Fault"
-
Zephyr:
- Improve the quality of Zephyr stack usage detection when capturing less than
the full stack contents for each thread. This feature was originally
released in SDK
0.43.0
.
- Improve the quality of Zephyr stack usage detection when capturing less than
the full stack contents for each thread. This feature was originally
released in SDK
-
ESP-IDF:
- Add Memfault Metrics tracking LwIP runtime statistics (packet counts). A new
Kconfig flag
CONFIG_MEMFAULT_LWIP_METRICS
controls this feature, which is enabled by default. The LwIP metrics helper is available for non-ESP-IDF projects using LwIP, seeports/lwip/memfault_lwip_metrics.c
for details
- Add Memfault Metrics tracking LwIP runtime statistics (packet counts). A new
Kconfig flag
🎉🎉🎉
The Memfault Firmware SDK is now version 1.0.0
as of this release! Note that
this is just a procedural change, there are no breaking backwards-incompatible
changes in this release. We forgot to update our major version back in 2019, but
better late than never 😅! Hopefully the remaining 281,474,976,710,656 versions
are enough 🤞.
🎉🎉🎉
-
Zephyr:
- Add a new built-in metric
FileSystem_BytesFree
for tracking VFS bytes free. This is enabled automatically whenCONFIG_FILE_SYSTEM=y
. Use the Kconfig optionMEMFAULT_FS_BYTES_FREE_VFS_PATH
to set the VFS mount point to monitor utilization (default value is/lfs1
). The Kconfig optionMEMFAULT_FS_BYTES_FREE_METRIC
can be used to disable the metric. - Update a few spots in the Zephyr demo CLI to use
shell_print
instead ofMEMFAULT_LOG
for command usage errors
- Add a new built-in metric
-
Zephyr:
-
Add more granular Kconfig settings to control what's collected in
memfault_zephyr_coredump_get_regions()
. Default settings are identical to before this change.CONFIG_MEMFAULT_COREDUMP_COLLECT_STACK_REGIONS
CONFIG_MEMFAULT_COREDUMP_COLLECT_KERNEL_REGION
CONFIG_MEMFAULT_COREDUMP_COLLECT_TASKS_REGIONS
-
Fix a build error when an application is configured without
CONFIG_HEAP_MEM_POOL_SIZE=y
(i.e. nokmalloc
in use).
-
-
Fix a build error when building the nRF9160 example on nRF-Connect SDK v2.3.0.
-
ESP-IDF:
- Add support for upcoming v5.1 release of the ESP-IDF SDK
- Add support in the ESP32 example app for the ESP32-C6 chip
- Fix a bug 🐛 where metrics accumulated with
memfault_metrics_heartbeat_add()
would no longer be included in the serialized heartbeat data. This regression occurred in0.42.0
.
-
Zephyr:
- The
z_NmiHandlerSet
function is renamed for the upcoming Zephyr 3.4. Support the new name. Fixes #49. Thanks @mbolivar-nordic for filing this issue!
- The
- Add coredump support for Cortex-R chips (ARMv7-R)
-
Add a QEMU-based FreeRTOS example project, find it under examples/freertos
-
Switch
printf
function attribute to use__printf__
, to avoid collision with user code that redefines theprintf
token -
Zephyr:
- Compute thread stack high watermark values on-target when capturing a coredump. This enables showing high watermark information in the Memfault coredump analysis view without capturing the full stack for a thread
-
Zephyr:
- Remove
LEGACY_CONFIG_PATH
Kconfig selection, now that thezephyr.h
header is no longer used as of Memfault SDK0.42.0
. This option no longer exists after Zephyr v3.3.0. Fixes #48
- Remove
-
Minor changes to the ESP8266 port to improve out-of-the-box compilation
-
Add new functionality to output buffered log data via
memfault_log_export_logs()
. See thelog.h
header for detailed usage.
-
Zephyr:
- Add option to capture full thread stacks for classifying stack overflows and
determining stack high watermarks. This feature is enabled by setting
CONFIG_MEMFAULT_COREDUMP_FULL_THREAD_STACKS=y
- Remove usage of the
zephyr.h
header in preparation for Zephyr v3.4.0. Thanks to @jfischer-no for the patch!
- Add option to capture full thread stacks for classifying stack overflows and
determining stack high watermarks. This feature is enabled by setting
-
memfault_gdb.py
:- Add support for exporting data from GCC 12 compiled symbol files
- Add arguments to override device serial ID, software type, software version, and hardware revision
- Metrics:
- Integer type metrics (signed/unsigned) will reset to NULL when not set during a heartbeat interval. This NULL value will be discarded by Memfault when received. The previous behavior was to reset to 0 which makes discarding values difficult as 0 is a valid value for these types. For more info please see the Metrics docs.
- Zephyr / nRF-Connect SDK:
- Improve compatibility with Zephyr pre-3.0 deferred logging, when using the Memfault backend
- Add an option to the examples/nrf-connect-sdk/nrf5 to enable capturing all of RAM in a coredump.
-
Zephyr / nRF-Connect SDK:
- Fix a bug 🐛 in the Memfault Logging backend, that causes coredump saving to fail when building with Zephyr versions before 3.0 (nRF-Connect SDK < 2.0). This regression was introduced in Memfault Firmware SDK 0.33.3.
-
ESP-IDF:
- Updated the ESP32 example app for the ESP32-C3 on ESP-IDF v5.0.1 to use size optimizations, to more closely mirror real world environments and codesize.
- Fix a compilation error in the ESP32 example app when targeting ESP-IDF >=4.4,<4.4.3 . This regression was introduced in Memfault Firmware SDK 0.39.1.
- ESP-IDF:
- Added coredump support for the ESP32-C3 (RISC-V) chip. Thank you to @jlubawy for your work on this in #42 🎉!
- ESP-IDF:
- The Kconfig
CONFIG_MEMFAULT_AUTOMATIC_INIT
has been deprecated and is no longer supported. Users of this Kconfig should refactor their application to callmemfault_boot
during initialization. Use of this Kconfig now results in a build error. For more information please see https://docs.memfault.com/docs/mcu/esp32-guide#initializing-memfault
- The Kconfig
- Experimental
- CMSIS-Pack support
- Out Of Memory reboot reason added
- ESP-IDF:
- The default implementation of
memfault_platform_coredump_get_regions
is changed to collect the current active stack, .bss, .data, and .heap regions. Additionally if you are using ESP-IDF >= 4.4.0, the SDK will prioritize collecting FreeRTOS regions containing task TCB and stack data. - Assert coredumps are now labeled with the Assert reason
- The default implementation of
- Breaking changes to the
memfault_freertos_get_task_regions()
function, which can be used to capture FreeRTOS tasks when coredumps are sized smaller than all available RAM. The function will now, by default, capture a truncated copy of each FreeRTOS TCB, instead of the complete structure. This makes better use of coredump storage space; the TCB structures can be very large (>1kB), but Memfault only needs the first few fields for coredump decoding. The configuration flagMEMFAULT_PLATFORM_FREERTOS_TCB_SIZE
(seedefault_config.h
) can be set to0
inmemfault_platform_config.h
to return to the previous behavior.
- Enable coredumps on the ESP32-S2 and ESP32-S3 chips.
- Zephyr:
- Support building with
CONFIG_POSIX_API=y
in the Zephyr port HTTP client
- Support building with
- ESP-IDF:
- Reduce the spamminess of the esp32 example app logging
- Update
scripts/memfault_gdb.py
:- When explicitly listing a region to insert into the coredump via
memfault coredump --region x y
, now support parseable GDB expressions for the range arguments instead of requiring integer values. Thanks to @alvarop for this patch #43 ! - Use the
info all-registers
command when dumping registers, instead of the deprecatedinfo registers all
command, which works better on certain arch/monitor setups. Thanks to @alvarop for this patch #44 !
- When explicitly listing a region to insert into the coredump via
- FreeRTOS
- Add support for collecting truncated TCBs. This is particularly useful with
limited coredump space. Enable by defining
MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE
in `memfault_platform_config.h".
- Add support for collecting truncated TCBs. This is particularly useful with
limited coredump space. Enable by defining
- ESP-IDF
- Add support for esp32s2/s3 platforms to the esp32 example application
- Fixup some documentation typos/errors
- Add support for Python 3.10
-
Built-in Metrics
- Add
MemfaultSdkMetric_UnexpectedRebootDidOccur
metric. This metric uses the platform's reboot register and any reasons by the SDK functionmemfault_reboot_tracking_mark_reset_imminent
to classify a reboot. When reboot tracking determines a reboot is unexpected, this metric is set to 1. Otherwise this metric is 0.
- Add
-
- Add log capture during coredump to port
-
Demo CLI
- Add
mflt test loadaddr
command. This command is used to test specific faults due to protected regions
- Add
- Built-in Metrics
- The built-in metric,
MemfaultSdkMetric_UnexpectedRebootDidOccur
, classifies all reboot reasons greater than or equal tokMfltRebootReason_UnknownError
or equal tokMfltRebootReason_Unknown
as "unexpected reboots". It is recommended to ensure your platform's implementation ofmemfault_reboot_reason_get
classifies the reboot register values as accurately and precisely as possible to avoid incorrect metric values.
- The built-in metric,
- ESP-IDF:
- Fix a bug 🐛 in the ESP32 example app, where wifi join fails when using versions of ESP-IDF prior to 5.0
-
ESP-IDF:
- Add support for just-released ESP-IDF v5 🎉! Thanks to @jlubawy and the patch supplied in #39 for this, very much appreciated!
- Add an auto-OTA (and auto-WiFi-join) feature to the ESP32 example app- enabled by default but can be disabled with Kconfig
-
The Heap Stats tracing component has been revamped to make more efficient usage of the bookkeeping structure. Usage should be the same as before, but now should provide more data without significantly expanding the memory utilization.
- Experimental Custom Data Recording API
- Allows sending custom data collected over the course of a recording period
- Zephyr:
- Modify heap stats to only collect info during allocations/deallocations from threads
- ESP-IDF:
- ESP32 reboot tracking into RTC noinit
- nRF5 SDK:
- NRF5 coredump regions -Wunused-macros, fixes warning for unused macros
- Experiment: pytest as fw test frontend
- README: Add additional details on port integration
- ModusToolbox™️ Software
- Updates SDK for compatibility with MTB 3.0
- nRF-Connect:
- Updates for Zephyr upmerge 2022.11.03 (see #35 + #36)
- Fix watchdog test (
mflt test hang
) inexamples/nrf-connect-sdk/nrf5/
- Zephyr:
- Set
CONFIG_QEMU_ICOUNT=n
inexamples/zephyr/qemu/
, which fixes the emulated target execution speed - Add heap free and stack usage Metrics to
examples/zephyr/qemu/
- Set
- Update the
memfault_demo_cli_cmd_assert()
test command to take a single arg, which is used inMEMFAULT_ASSERT_RECORD()
. This enables testing that assert variant from the CLI.
- Misc ESP32 port &
example app improvements
- Added diagnostic print line containing Build Id at boot up
- Improved messaging displayed when using
memfault_ota_check
test command - Example app now prints device info on bootup
- Fix an issue where incremental build (
idf.py build && idf.py build
) would report a nuisance failure. - Flatten + simplify the directory structure of the QEMU based example project
- A new
ports/mbedtls
is available, which implements a basic Mbed TLS client for performing Memfault data upload. - Zephyr: Collect sysheap stats using the
Memfault Heap Tracking component. This is
configured with the
CONFIG_MEMFAULT_HEAP_STATS
Kconfig option (enabled by default), and will track allocations done withk_malloc()
. - Fix an enum-mismatch warning in
memfault_metrics.c
when using the ARMCC v5 compiler.
- If you are using the ESP32 HTTP Client, the Memfault Project Key is now
configured directly via the
ESP32 Project Configuration System.
You need to do the following:
- Remove the
g_mflt_http_client_config
in your platform port - Add
CONFIG_MEMFAULT_PROJECT_KEY="YOUR_PROJECT_KEY"
to your projectssdkconfig.defaults
- Remove the
- nRF-Connect: Update the nRF9160 example application,
examples/nrf-connect-sdk/nrf9160
, to build and run correctly with nRF-Connect SDK v2.1.0 - Zephyr: Add an example Zephyr application targeting the QEMU board
- ESP-IDF:
- Add a configuration option for setting the ESP-IDF HTTP client timeout value
- Fix compilation for the ESP32-S3. Note: coredumps are currently only supported on the ESP32, not the ESP32-S2, -S3, or -C3. This change only fixes compiling for the -S3 platform
- Add support for ESP-IDF v4.2.3
- Support building the unit tests with GCC 12
- Miscellaneous fixes to unit test infrastructure to better support building in Mac OSX
- Zephyr port updates:
- Handle thread abort in the task stack capture hook. Previous to this change, aborted tasks would remain on the captured task list, and restarting the task would create a duplicate entry.
- Zephyr port updates:
- Add a call to
LOG_PANIC()
before running the Memfault fault handler, to flush any deferred logs before the reboot
- Add a call to
- Zephyr port updates:
- fix a few minor nuisance build warnings on niche Zephyr configurations
- enable
LOG_OUTPUT
whenMEMFAULT_LOGGING_ENABLE
is enabled- this fixes a build error if all other log backends are disabled. thanks to @balaji-nordic for this fix! closes #33
- Add a debug cli test command to the nRF-Connect SDK port for printing the OTA url
- Fix a 🐛 in the heap stats component (#32), thanks @christophgreen for reporting it!
- Zephyr port updates:
- add support for the newly namespaced Zephyr include path in upcoming Zephyr
v3.2 (
#include <zephyr.h>
→#include <zephyr/zephyr.h>
). The includes were moved prior to v3.1 of Zephyr, but v3.2 changes the backwards compatibility support to opt-in. The Memfault SDK is now updated to support both. - fix Zephyr Memfault log capture to have the correct prefix in the decoded
output when using LOG2 - previously all log lines regardless of level would
have an
E
prefix (regression introduced in Memfault SDK version 0.32.0) - fix Zephyr Memfault log capture when in
CONFIG_LOG_MODE_IMMEDIATE
and using LOG2 to capture the full log line instead of each logged character as a separate line.
- add support for the newly namespaced Zephyr include path in upcoming Zephyr
v3.2 (
- Zephyr port folder for
v2.x
migrated tocommon
, now that Zephyr v1.14 support has been removed (done in v0.32.0 of the Memfault SDK) - Update README's for the example projects to match the new demo shell command
structure (
crash 1
→test_hardfault
, etc). - Tidy up nrf9160 example app Kconfig setup
- Fix parallel unit test invocation
- Extend memfault demo shell to support terminals that only emit CR for line endings
- nRF5 SDK Updates:
- Added a software watchdog reference port for nRF5 SDK which makes use of the RTC Peripheral. See ports/nrf5_sdk/software_watchdog.c for more details.
- Updated nRF5 example app to make use of hardware and new software watchdog port.
- Zephyr Port Updates:
- Added Kconfig option to fallback to using
printk
by default when no logging is enabled. This can be disabled by settingCONFIG_MEMFAULT_PLATFORM_LOG_FALLBACK_TO_PRINTK=n
.
- Added Kconfig option to fallback to using
- nRF Connect SDK Updates:
- Fixed a 🐛 which could result in download errors when using Memfault nRF Connect SDK FOTA client and enabled client in example application by default.
- Added new example application for trying Memfault with nRF53 & nRF52 based development kits. See examples/nrf-connect-sdk/nrf5 for more details.
- Zephyr port: added a fix for upcoming Zephyr 3.2 compatibility, thanks @nordicjm for the fix!
- Added default config header for PSoC 6 port ports/cypress/psoc6/psoc6_default_config.h so user doesn't have to create it
- ModusToolbox™️ Software
port updates
- Added heartbeat metrics for heap and Wi-Fi performance tracking when using the default port for CAT1A (PSoC™️ 6). See ports/cypress/psoc6/memfault_platform_core.c for more details
- Fixed reboot reason reported when PSoC 6 is fully reset to report "Power On Reset" instead of "Unknown"
- Zephyr port updates
- Memfault logs (eg
MEMFAULT_LOG_DEBUG()
etc) are now routed to the Zephyr logging infrastructure. The typical set of Kconfig options for Memfault logs are available (CONFIG_MEMFAULT_LOG_LEVEL_WRN
etc). See details in "Breaking Changes" below for enabling logs in your project. - Added a new Kconfig option,
MEMFAULT_ZEPHYR_FATAL_HANDLER
, which can be used to disable the Zephyr fault handler print facilities. - Streamline support for nRF-Connect SDK based applications that don't need
the Memfault root certificates (eg nRF53 or nRF52 devices), via a new
Kconfig option
MEMFAULT_ROOT_CERT_STORAGE
, to avoid a nuisance build error
- Memfault logs (eg
-
Users will no longer see internal Memfault log output by default, but will have to enable it explicitly to see the output:
# enable LOG CONFIG_LOG=y # not required- enabling the Memfault logging component enables including the # log buffer in coredumps CONFIG_MEMFAULT_LOGGING_ENABLE=y # if on pre-v3.1.0 zephyr, you can choose either the default LOG v1 # implementation, or select a LOG2 mode to enable LOG2. on zephyr 3.1.0+, LOG # v1 is removed and LOG v2 is now the only log implementation # CONFIG_LOG2_MODE_DEFERRED=y # make sure to select a log backend to see the output CONFIG_LOG_BACKEND_UART=y
The log statements affected by this change are likely only the internal Memfault SDK logs (
MEMFAULT_LOG_DEBUG()
etc), unless those macros are used in the user application. -
Removed support for Zephyr LTS release 1.14 as it was superseded by LTS V2 almost a year ago now. A project using this release of Zephyr must target a memfault-firmware-sdk release less than 0.32.0.
-
More logically grouped Kconfig settings in Zephyr example app's prj.conf
-
Fixed a few typos in particle port documentation
-
Simplified compilation steps for the nRF91 sample test app when compiling with older releases of the nRF Connect SDK and refreshed the example to target the v2.0.2 release by default
-
Updated default demo CLI commands to better align with our suggested integration test commands. The default set now looks like this:
mflt> help clear_core: Clear an existing coredump drain_chunks: Flushes queued Memfault data. To upload data see https://mflt.io/posting-chunks-with-gdb export: Export base64-encoded chunks. To upload data see https://mflt.io/chunk-data-export get_core: Get coredump info get_device_info: Get device info test_assert: Trigger memfault assert test_busfault: Trigger a busfault test_hardfault: Trigger a hardfault test_memmanage: Trigger a memory management fault test_usagefault: Trigger a usage fault test_log: Writes test logs to log buffer test_log_capture: Trigger capture of current log buffer contents test_reboot: Force system reset and track it with a trace event test_trace: Capture an example trace event help: Lists all commands
-
Zephyr port: enable proper backtraces for Zephyr
__ASSERT()
macro on aarch32/cortex_m. Prior to this fix, crashes from__ASSERT()
triggering would show an incorrect PC/LR for the active thread. -
Support for pre-release nRF Connect SDK v2.0.99 and Zephyr > v3.1:
- Upcoming nRF Connect SDK and Zephyr releases removed logging v1. Add build support for these changes, and keep backwards compatibility for previous nRF Connect SDK/Zephyr releases
- Correct an issue in the Memfault logging v2 backend, when the system was
invoked from an ISR context. This could happen due to a recent change, in
Memfault SDK v0.31.1, where the Zephyr fatal informational logs were output
from
memfault_platform_reboot()
by default. It did not impact the collected backtrace, but it would show a nuisance__ASSERT()
in the console output, ifCONFIG_ASSERT=y
.
- Fix a compilation issue in the Dialog example app from the removal of
memfault_demo_cli_cmd_print_chunk()
in Memfault SDK release v0.31.4.
-
ESP32 port: add new Kconfig option,
CONFIG_MEMFAULT_AUTOMATIC_INIT
, that can be explicitly set ton
to skip automatically initializing the Memfault SDK on boot. This can be useful if Memfault SDK initialization needs to be deferred to application start. -
Zephyr port: add Kconfig options,
CONFIG_MEMFAULT_INIT_PRIORITY
/CONFIG_MEMFAULT_INIT_LEVEL_POST_KERNEL
for controlling the Memfault SDK initialization level and priority. This can be useful when needing Memfault to initialize earlier in the system startup sequence, for example for diagnosing crashes in an early driver initialization. -
Partial support, still in progress, for NRF Connect SDK + Zephyr v3.1:
- Remove reference to the now-removed Kconfig symbol,
NET_SOCKETS_OFFLOAD_TLS
to enable building without warnings. NOTE: if mbedtls is enabled (CONFIG_MBEDTLS=y
), but is not being used for HTTP transfers (eg, mbedtls is used for security functions, but the device does not use HTTP for transferring data), it may be necessary to explicitly setCONFIG_MEMFAULT_HTTP_USES_MBEDTLS=n
.
- Remove reference to the now-removed Kconfig symbol,
-
Zephyr port: remove an unused header file,
ports/zephyr/common/memfault_zephyr_http.h
-
Remove
memfault_demo_cli_cmd_print_chunk()
demo function.memfault_data_export_dump_chunks()
can be used instead, which is intended to be used with the "Chunks Debug" UI in the Memfault web application- see here for more details
- Support Zephyr v3.1+ by conditionally compiling out Logger v1 code, thanks to @tejlmand for the patch!
- Fixed a 🐛 in the Zephyr port HTTP implementation, where a socket file descriptor was leaked. This caused every HTTP operation after the first to fail on Zephyr platforms. Thanks to @rerickson1 for the fix!
- Added an update to improve the quality of stack traces when using
MEMFAULT_ASSERT
with the TI ARM Clang Compiler
- Enable the Zephyr fault handler (including console fault prints) after
Memfault handler runs. Can be disabled by implementing
memfault_platform_reboot()
. See details in ports/zephyr/include/memfault/ports/zephyr/coredump.h
- Fixed compiler error in nRF91 sample test app when compiling with the nRF Connect SDK v2.0.0 release
- Added reference port for CAT1A (PSoC™️ 6) based MCUs using the ModusToolbox™️ Software stack. For more details see ports/cypress/psoc6 directory.
- Added a convenience utility function for posting chunks using the Memfault
http client. See
memfault_http_client_post_chunk
for more details!
- Fixed compiler error in nRF91 sample test app when compiling with the nRF Connect SDK 1.8 release
- ESP-IDF: add Memfault Compact Log example integration to the
examples/esp32
project
- ESP-IDF: Fix backtraces when using ESP-IDF v4.4+
- nRF-Connect SDK: enable the Kconfig flag
MEMFAULT_NRF_CONNECT_SDK
by default when targeting the nrf52 + nrf53 series SOCs (previously only enabled by default for nrf91 series)
Added clarifications around licensing in ports and examples folders. See README for more details.
- minor updates to
scripts/eclipse_patch.py
to support NXP's MCUXpresso IDE
- Particle's Device OS port improvements:
- A user initiated reboot will now be recorded as a User Shutdown instead of a Low Power reset
- A custom hardware_version can now be specified using the
hardware_version
argument when initializing the Memfault library - Default hardware version now uses the
PLATFORM_NAME
macro instead ofPRODUCT_SERIES
macro
- Zephyr port improvements
- Exposed lower level APIs to Memfault's HTTP post implementation to allow
easier custom handling. See
ports/zephyr/include/memfault/ports/zephyr/http.h
for more details
- Exposed lower level APIs to Memfault's HTTP post implementation to allow
easier custom handling. See
- Misc README documentation improvements
- Fix a build regression on nRF Connect SDK v1.2 caused by the new Kconfig flag
CONFIG_MEMFAULT_HTTP_USES_MBEDTLS
- Fix stack selection when in ISR context in some Zephyr versions
- Fix a build error when building Zephyr with
CONFIG_NORDIC_SECURITY_BACKEND
enabled. New Kconfig flagCONFIG_MEMFAULT_HTTP_USES_MBEDTLS
can be used to manually control this configuration if necessary (default should be set correctly in most cases)
- Fix CI unit test build error from older version of gcc
- Added a Task Watchdog optional module. This can be used to monitor and trigger a fault in the case of a task or thread that becomes stuck. See information in components/include/memfault/core/task_watchdog.h for how to configure and use the module
- Fix compilation when building for a Zephyr target that does not have the
CONFIG_ARM_MPU
flag enabled - Fix compilation errors to enable compatibility with Zephyr v3.0.0
- Updated Memfault Diagnostic GATT Service (MDS) based on feedback. This service can be used to transparently forward data collected by the SDK to a Bluetooth Low Energy gateway and proxied to the cloud. See ports/include/memfault/ports/ble/mds.h
- Updated Mbed OS invoke commands to be more resilient against python package conflicts
- If your project is based on Zephyr < 2.6, you now need to explicitly set
CONFIG_OPENOCD_SUPPORT=y
in yourprj.conf
- Added a port to Particle's Device OS. More details can be found in
ports/particle/README.md
. - Added several more
reboot reason options:
kMfltRebootReason_KernelPanic
for explicitly tracking fatal resets from within a OS or RTOSkMfltRebootReason_FirmwareUpdateError
for explicitly tracking resets due to firmware update failures or rollbacks
- Added a convenience utility function for base64 encoding data in place. See
memfault_base64_encode_inplace
for more details! - Fixed compiler error in ESP-IDF port when compiling for ESP32-S2 targets
- Added configuration option,
MEMFAULT_COREDUMP_INCLUDE_BUILD_ID
, which can be used to disable storing the Build Id in a coredump. - Fixed stale link in Mbed example app
README
. - Added utility script that can be used to "arduino-ify" the code in this repo.
- Fixed linter errors in python scripts after addition of flake8-bugbear linter in CI.
- Fixed compiler error in nRF91 sample test app when compiling with the nRF Connect SDK 1.2 release
- Updated nRF91 sample test app to be compatible with nRF Connect SDK 1.9 release
- Updated python scripts to be compatible with new flake8 linter options
- Updated where
lcov
is sourced from when running unit tests in CI
- Add an optional override flag to control the name used for Zephyr data
regions- see
ports/zephyr/common/memfault_zephyr_ram_regions.c
. Only needed for unusual Zephyr + Memfault configurations prior to Zephyr v2.7 (for example, nRF Connect SDK v1.7.1 with Memfault SDK v0.27.3+) - Fix the STM32F7xx reboot reason port to correctly account for the internally wired Pin Reset
- Fix a function prototype mismatch in the STM32L4 flash port (thanks to @schultetwin for reporting this in #22!)
- Add support for setting string metrics, see
memfault_metrics_heartbeat_set_string()
incomponents/include/memfault/metrics/metrics.h
for the new API. See the Memfault Docs for general information on using the metrics API. - Updated
memfault_metrics_heartbeat_debug_print()
to also print current timer values, instead of showing0
. Seecomponents/include/memfault/metrics/metrics.h
for details
- Update the STM32 QP/C example (
examples/qp
) to compile and run correctly now - Add instructions for exercising Memfault OTA in the ESP32 example, see the
"Testing OTA" section in
examples/esp32/README.md
- Update the Memfault HTTP client to URL-encode query params when checking for
OTA updates (in the case of Device properties containing reserved characters,
eg
+
). Update the ESP port to check for reserved characters in query params and emit an error - Fix an outdated comment in
cmake/Memfault.cmake
, as reported in issue #21 (thank you @C47D !)
- Update Python tests to use a mocked-out gdb instance
- Fix a build error for the Nordic Connect SDK v1.7.99 development version
- Correct an error in header file include order in the Mynewt port
- Update the esp32 and zephyr examples to use
1.0.0-dev
instead of1.0.0+<6 digits of build id>
for the version specifier. Build id is no longer required for symbol file reconciliation and the+
character is a reserved character for URI schemes; this impacted OTA release requests. See this document for Memfault's recommended versioning strategy - Add a reboot reason port for the STM32F7xx family.
- Re-run python
black
andisort
formatters on python code
- The Mynewt integration now supports the Memfault demo shell via
mflt_shell_init()
, see the Mynewt port README.md for details. Huge thanks to @t3zeng for providing this implementation! - Add support for ESP-IDF v4.3.1. This update should fix the bootlooping issue seen when using the port with v4.3.1+ of ESP-IDF.
- Add support for
LOG2
deferred mode on zephyr. This should fix bootloops when enablingLOG2
. - Fix flipped args passed from
MEMFAULT_ASSERT_RECORD()
toMEMFAULT_ASSERT_EXTRA_AND_REASON()
(regression in v0.23.0). This affected the_extra
additional context value passed via this macro. - Fix a typo in
ports/esp_idf/memfault/common/memfault_platform_http_client.c
which caused the OTA example to always return "OTA Update Available" when the current version is already the latest.
- Updated list of sample apps in
examples/README.md
- Extended mynewt RTOS port to capture coredumps via a
os_coredump_cb
implementation whenMEMFAULT_COREDUMP_CB=1
- Fixed a few compiler warnings emitted when compiling with clang
- Improved documentation for coredump config with nRF5 SDK
- Added support for using compact logs with the Memfault log subsystem.
- Added port for mynewt RTOS to Memfault SDK. (Huge thanks to @t3zeng for the help here!) See sdk/embedded/ports/mynewt for more details.
- Added support for Zephyr 2.7 release.
- Fixed a missing symbol linker error for
memfault_fault_handler
that could arise when compiling with-flto
. - Fixed a compiler error in
memfault_fault_handling_arm.c
that arose when using certain versions of the Clang compiler. - Cleaned up python scripts after enabling additional PEP8 naming convention linters.
- Updated
modem_key_mgmt_exists
API usage to be compatible with changes upcoming in nRF Connect SDK 1.8.
-
Added preview of the Memfault Diagnostic GATT Service (MDS). This service can be used to transparently forward data collected by the SDK to a Bluetooth Low Energy gateway and proxied to the cloud. See ports/include/memfault/ports/ble/mds.h for more details!
- Added reference port of MDS for the DA1469x SDK to ports/dialog/da1469x/memfault_diagnostic_service.c
-
Implemented utility python script which can be used for quickly adding a
memfault-firmware-sdk
port to an eclipse project. For more details, runpython scripts/eclipse_patch.py --help
-
Added example project demonstrating integration of Memfault on Cypress' CY8CKIT-064S0S2-4343W running Amazon-FreeRTOS publishing data using an AWS IoT MQTT broker. For more details about how to run the Memfault example, see examples/cypress/CY8CKIT-064S0S2-4343W/README.md.
-
Fixed a compiler warning emitted when using TI's GCC Compiler as reported by @albertskog in issue #18
- Apply some suggestions emitted by
flake8-pytest-style
linter to scripts/tests/test_memfault_gdb.py.
- Added a workaround to
event_storage.h
to prevent compilation errors when using the unity test framework to generate mocks. - Updated
makefiles/MemfaultWorker.mk
to usesort
to guarantee a deterministic file list order irrespestive of make version. A consistent order is useful for reproducible builds. - Make use of
__has_include()
in Zephy port to remove the requirement of always needing to creatememfault_platform_config.h
,memfault_metrics_heartbeat_config.def
, &memfault_trace_reason_user_config.def
for a build to compile. To force a compile failure instead when any of these files do not exist, a user can setCONFIG_MEMFAULT_USER_CONFIG_SILENT_FAIL=n
- The current version of the Memfault Firmware SDK can now be accessed
programmatically from the
memfault/version.h
. - Improved HTTP util parser when dealing with malformed status codes
- Updated nRF91 sample test app to be compatible with nRF Connect SDK 1.6
- Added a new utility API,
memfault_packetizer_set_active_sources
, to the data_packetizer module, which let's one control the exact data sources that will get packetized. See description in the header for more details - Port Improvements:
- NXP i.MX RT102x
- Applied suggestions from @elliot-wdtl for the Zephyr ports
(#15):
- Updated software watchdog port to make use of
MEMFAULT_SOFTWARE_WATCHDOG
macro
- Updated software watchdog port to make use of
- Applied suggestions from @ioannisg & @mbolivar-nordic in
(#14) to change
the KConfig options used to select
CONFIG_MEMFAULT_HTTP_ENABLE
&CONFIG_MEMFAULT_ROOT_CERT_STORAGE_NRF9160_MODEM
&CONFIG_MEMFAULT_NRF_CONNECT_SDK
when using nRF91 targets.
- Added
export
command to the demo cli to better mirror our suggested integration test commands
- If you are were using a custom nRF91 based board config (i.e neither
BOARD_NRF9160DK_NRF9160NS
orBOARD_THINGY91_NRF9160NS
), the following KConfig options will now be enabled by default. The following can be added to yourprj.conf
to restore the original behavior:CONFIG_MEMFAULT_HTTP_ENABLE=n
CONFIG_MEMFAULT_NRF_CONNECT_SDK=n
CONFIG_MEMFAULT_ROOT_CERT_STORAGE_TLS_CREDENTIAL_STORAGE=y
- Added "compact log" support to trace events. When enabled, the format string
will be removed at compile time from calls to
MEMFAULT_TRACE_EVENT_WITH_LOG
and an integer along with arguments will be serialized instead. The actual string will recovered and formatted when it arrives in the Memfault cloud. This leads to a massive reduction in space & bandwidth needed to send trace events. For more details about how to set up, check out this guide! - Fixed a
-Wshadow
compiler error that would arise inmemfault_coredump_regions_armv7.c
whenMEMFAULT_COLLECT_MPU_STATE
was enabled - Updated debug print utility in
memfault_coredump_storage_debug.c
to guard against potentially printing an uninitialized string. - Removed unnecessary extra argument from
MEMFAULT_SOFTWARE_WATCHDOG
-
If you were already using
MEMFAULT_SOFTWARE_WATCHDOG
, you will need to update your call site invocations to remove the argument being passed. i.e- MEMFAULT_SOFTWARE_WATCHDOG(0); + MEMFAULT_SOFTWARE_WATCHDOG();
- Support for Dialog DA1469x chip family (Huge thanks to @iandmorris for the
help here!)
- Example eclipse project and more details about how to add the port to any DA1469x based project can be found here.
- Added a simple utility to track heap allocations. This can be used to more
easily debug what allocations led to out of memory situations with the
addition of only several hundred bytes to a coredump capture. For more
details, see
memfault/core/heap_stats.h
- For FreeRTOS users, automatic tracking of heap allocations can be enabled with the Memfault port. To enable, see the "Heap Tracking" section in the README at ports/freertos/.
- Added new convenience utilities for asserting when a watchdog event is
detected,
MEMFAULT_SOFTWARE_WATCHDOG
. This will result in the issue in the Memfault UI being classified for as a "Software Watchdog" instead of an "Assert" for easier classification. - Fixed a 🐛 in Zephyr port where cpu runtime metrics were never getting reset after a heartbeat was collected leading to always increasing runtime values getting reported.
- Improved support for running tests against different versions of
clang and gcc and enabled more address sanitizers such as
-fsanitize=undefined
- Misc documentation edits
- Reduced code space utilized by metric subsystem by transitioning from a string representation of metric names to an enum representation.
- Updated
memfault_gdb.py
helper script to use latest Memfault API for uploading symbol files. - Removed "DST Root CA X3" from the required Memfault root certificate list as there is no infrastructure that relies on it anymore.
- Updated PEM representation of all root certificates to include newlines after 64-character intervals to improve portability with various TLS stacks.
- Updated
fw_build_id.py
script. The same script can now also be installed viapypi
:pip install mflt_build_id
- Various improvements to example app documentation
- Zephyr / nRF Connect SDK port:
- Made periodic upload a named choice,
MEMFAULT_HTTP_PERIODIC_UPLOAD_CONTEXT
, so the default can be overridden from other Kconfig files. - Added prompt text for
MEMFAULT_HTTP_DEDICATED_WORKQUEUE_STACK_SIZE
- Made periodic upload a named choice,
- Zephyr / nRF Connect SDK port:
CONFIG_MEMFAULT_NRF_CONNECT_SDK
is now only enabled by default whenCONFIG_MEMFAULT=y
CONFIG_DEBUG_THREAD_INFO=y
is now selected by default (in prep for deprecation ofCONFIG_OPENOCD_SUPPORT
)- Added new option (
CONFIG_MEMFAULT_USER_CONFIG_ENABLE=y
) which can be used to remove requirement of providing any user specific configuration. - Added two choices for periodic posting of memfault data:
CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_SYSTEM_WORKQUEUE
. This is the default and matches previous release behavior of posting data to Memfault from the system work queueCONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_DEDICATED_WORKQUEUE
This is a new option which can be used to post data from a dedicated worker queue. This can be useful if the network stack may block for extended periods of time which would stall other system work queue jobs from getting processed.
- The Zephyr & nRF Connect SDK ports will now only enable the
MEMFAULT_SHELL
by default when the Zephyr shell is enabled.CONFIG_SHELL=y
must now be enabled explicitly in yourprj.conf
for the Memfault Shell to be enabled.
- Updated
sMemfaultBuildIdStorage
structure to track the build id length used for event serialization and updatedfw_build_id.py
script to extract information.
- Zephyr / nRF Connect SDK port:
- Replaced
MEMFAULT_DEFAULT_REBOOT_REASON_IMPL
Kconfig option withMEMFAULT_REBOOT_REASON_GET_CUSTOM
and updated default configuration for the nRF Connect SDK. This fixes an issue resulting in the generic memfault_reboot_reason_get getting linked rather than the nRF Connect SDK port.
- Replaced
- Updated memfault_fault_handling_arm.c to work around a compiler bug when using 6.x of the GNU ARM Toolchain
- Port Improvements:
- SAML10/SAML11
- Updated esp-idf port to streamline integrations making use of the amazon-freertos
- Zephyr
- Added several Kconfig options for better control over information
collected in a coredump:
CONFIG_MEMFAULT_COREDUMP_COLLECT_DATA_REGIONS
to enable/disable collection of.data
regionCONFIG_MEMFAULT_COREDUMP_COLLECT_BSS_REGIONS
to enable/disable collection of.bss
regionCONFIG_MEMFAULT_COREDUMP_STORAGE_CUSTOM=y
can be used to opt out of the default RAM backed coredump implementation and provide a custom one in the port.
- Added several Kconfig options for better control over information
collected in a coredump:
- Reduced instruction cycles required to update a heartbeat metric
- Events will now store an abbreviated build id when serialized
-
Added support for collecting additional register information when a Hardfault takes place when using the Zephyr port. This information will be decoded and displayed in the Memfault UI in the "Exceptions" tab.
-
Updated
buffered_coredump_storage.h
to usememmov
instead ofmemcpy
sincedst
andsrc
buffers may overlap when all of.bss
is saved in a coredump capture. -
Added a new Kconfig option to the Zephyr port,
CONFIG_MEMFAULT_METRICS_EXTRA_DEFS_FILE=y
, which causesmemfault_metrics_heartbeat_extra.def
to be included in the metric definitions. This can be utilized by a third party consumer of Zephyr to more easily extend the default heartbeat metrics collected when using memfault.
- Updated
memfault_gdb.py
helper script to use latest Memfault API for uploading symbol files.
-
If you are using nRF Connect SDK / Zephyr port, the SDK will now automatically be picked up as a Zephyr Module! You will need to make two changes:
-
Remove the
ZEPHYR_EXTRA_MODULES
addition from your projects CMakeLists.txt, i.e--- a/your_application/CMakeLists.txt +++ b/your_application/CMakeLists.txt @@ -3,7 +3,6 @@ - list(APPEND ZEPHYR_EXTRA_MODULES $ENV{ZEPHYR_BASE}/../modules/memfault-firmware-sdk/ports/nrf-connect-sdk)
-
Add
CONFIG_MEMFAULT_NRF_CONNECT_SDK=y
to your projectsprj.conf
-
- Support for Dialog DA145xx chip family (Huge thanks to @iandmorris for the
help here!)
- GCC & Keil based demo application for the DA14531 & DA14585/DA14586 can be found here.
- Ports for applications using the DA145xx SDK can be found here.
- ESP32 port improvements
- Added example of periodically posting data to memfault via a background task.
- Added a new Kconfig option,
MEMFAULT_COREDUMP_USE_OTA_SLOT=y
which can be used to save a coredump in an unused OTA slot rather than the default coredump partition. This can be useful in situations where Memfault is being integrated after a product has shipped and updating the partition table is no longer possible.
- Added
MEMFAULT_EVENT_STORAGE_NV_SUPPORT_ENABLED=0
which can be used to disable dynamic configuration of non-volatile storage. Setting this flag when the non-volatile event storage API is not in use will save several hundred bytes of codespace. - Hardened memfault_http_parse_response() utility to parse HTTP responses with headers that exceed a length of 128 bytes
- Fixed a 🐛 in
memfault_log_save_preformatted()
leading to invalid logs being reported when attempting to save log lines > 128 bytes. (thanks @alvarop for the report!) - Added a convenience API,
memfault_create_unique_version_string()
, which can be used for easily appending a build id on the software version reported.
- Updates to demo cli:
MEMFAULT_DEMO_SHELL_RX_BUFFER_SIZE
can be used to shrink the maximum amount of bytes that can be buffered on a single line.- Made
memfault_demo_shell_commands.h
public and moved it tomemfault/demo/shell_commands.h
to facilitate easier overriding of the default set of commands used in a build.
- ESP32 Example App Updates:
- Added
export
command to demonstrate how data can be dumped via the console - Added Memfault Build ID to example app as a reference
- Added
- Fixed a 🐛 in
memfault_platform_sanitize_address_range()
template example. - Refactored nRF5 example app to mirror integration steps listed in the latest integration guide
- Added a new configuration option,
MEMFAULT_PLATFORM_FAULT_HANDLER_CUSTOM
, which can be used to explicitly disable the stubmemfault_platform_fault_handler()
implementation - Improve the quality of backtrace recovery for asserts when using Arm Compiler
5 by removing use of noreturn function attribute for
memfault_fault_handling_assert()
declaration.
- Added support for collecting ARMv7-M MPU regions as part of coredump
collection. To enable, set
MEMFAULT_COLLECT_MPU_STATE=1
in yourmemfault_platform_config.h
. Once enabled, the MPU will be automatically analyzed for configuration errors and results will be presented in the "MPU" tab in the Memfault UI for a coredump. - Added a new API,
memfault_log_trigger_collection
, which can be used to "freeze" the current contents of the log buffer when unexpected behavior takes place on the device for upload to Memfault. The logs can then be uploaded to Memfault just like any other data and appear in the UI for a device. For more details about the Memfault log subsystem see https://mflt.io/logging
- Fixed compilation error when compiling the panics component against Cortex-M0+ with ARM Compiler 5
- Added several default heartbeat metrics to the Zephyr port around timer task stack usage and execution time.
- Refreshed esp32 example app README and updated instructions for the v3.3.5 esp-idf
- Added
test_log
&trigger_logs
CLI commands to nRF5 & Zephyr example applications to exercise new log collection functionality.
- Fixed a 🐛 in Zephyr port leading to a compilation error with nRF Connect SDK
when
CONFIG_DOWNLOAD_CLIENT=y
&CONFIG_MEMFAULT_NRF_SHELL=y
- Dialog DA1468x
QSPI coredump storage port
updates:
- default storage partition (
NVMS_LOG_PART
) can be overriddenMEMFAULT_PLATFORM_COREDUMP_STORAGE_PARTITION
- Max space used within partition can be limited using
MEMFAULT_PLATFORM_COREDUMP_STORAGE_MAX_SIZE_BYTES
- default storage partition (
- Updated zephyr example application and docs to be compatible with v2.5 release.
- Added
memfault_log_save
stub to unit tests to facilitate easier testing of logging dependencies - Improved correctness of strategy used to capture
msp
&psp
register in Cortex-M fault handler. - Added new convenience utility,
memfault_circular_buffer_read_with_callback()
, to circular buffer api.
- Added new convenience APIs,
memfault_event_storage_bytes_used()
&memfault_event_storage_bytes_free()
, to event storage module. - Added a new configuration option,
MEMFAULT_ASSERT_HALT_IF_DEBUGGING_ENABLED
. By default, it is off, but when enabled will causememfault_platform_halt_if_debugging()
to be called prior to triggering the full coredump capture. - Fixed a type conversion compiler warning emitted by IAR and ARMCC in
resetreas_reboot_tracking.c
. - Port Updates:
- Removed "Heartbeat triggered!" print when
memfault_metrics_heartbeat_debug_trigger()
is called
- If you were using
ports/dialog/da1468x/reset_stat_reboot_tracking.c
, thememfault_platform_reboot_tracking_boot()
implementation from yourmemfault_platform_port.c
file can be removed and the one in the port can be picked up.
- Added a new convenience API,
memfault_device_info_dump()
which can be used to pretty print the device information populated in thememfault_platform_get_device_info()
dependency function. - Added
memfault_platform_sanitize_address_range()
. This functrions is intended for use in yourmemfault_platform_coredump_get_regions()
implementation when capturing regions that are not defined at compile time. - Fixed a 🐛 with
memfault_coredump_storage_debug_test_*
which would generate a false positive test failure when the coredump storage area was not divisible by 16. - C++ header guards are now included in all headers in the ports/ directory for easier integration in mixed C/C++ environments
- Port Updates:
- Dialog DA1468x: Added patch which can be used to add GNU Build ID
- Added support for FreeRTOS 8 to the FreeRTOS port.
- STM32H7 family / STM32CubeH7:
- STM32WBxx family / STM32CubeWB:
- Improved configurability of RAM backed coredump storage port with new configuration options for to control where RAM is allocated, what memory regions are collected, and stack size to collect.
- Added additional comments to
ports/templates
directory to facilitate porting.
- Demo CLI Shell commands are now defined as weak symbols so they can be overridden with a custom set.
- If you were using the
ports/emlib/msc_coredump_storage.c
port in your system, you must addMEMFAULT_PLATFORM_COREDUMP_STORAGE_USE_FLASH=1
to yourmemfault_platform_config.h
- If you were using
ports/panics/src/memfault_platform_ram_backed_coredump.c
:memfault_platform_sanitize_address_range()
must be implemented.- The default coredump storage RAM size was changed from 700 to 1024 bytes so
more information can be captured. The original size can be restored by
setting
MEMFAULT_PLATFORM_COREDUMP_STORAGE_RAM_SIZE 700
in yourmemfault_platform_config.h
- Renamed
platforms
folder toexamples
to better capture that the folder contains "example" integrations of the Memfault SDK into hello world style apps from various SDKs - Port Updates:
- Zephyr: added a software watchdog port which can be used for capturing coredumps ahead of a hardware watchdog reset.
- EFR32: rich reboot reason info derived from EMU_RSTCAUSE register
- Updated nRF9160 Demo Application to be compatible with nRF Connect SDK 1.5
- Added support for capturing coredumps with GDB from GNU GCC 4.9 to
memfault_gdb.py
- Added support for automatically capturing logs with Zephyr when logging in
synchronous mode
CONFIG_LOG_IMMEDIATE=y
- Unified nomenclature for references to the "Project Key" used to push data to Memfault
If you were linking any files from the platforms
folder into your project, the
path needs to be updated to examples
:
- ${MEMFAULT_FIRMWARE_SDK}/platforms/
+ ${MEMFAULT_FIRMWARE_SDK}/examples/
- Reference platform API implementations for DA1468x:
- Fixed a 🐛 that led to a unit test failure in
test_coredump_storage_debug
in some environments whereconst
arrays were getting dynamically built on the stack at runtime. - Worked around a limitation in GNU GCC 4.9's extended ASM to fix a compiler bug
that would arise when compiling
memfault_fault_handling_arm.c
for Cortex-M0 targets. - Added a new
ports/templates
folder that can be copy/pasted into a project and used as a starting point for a Memfault port!
-
Improved documentation in README and components directories.
-
Added coredump capture support to panics component for the AARCH64 architecture.
-
Reference platform API implementations for the following MCUs/SDKs:
- STM32WBxx family / STM32CubeWB:
- nRF5 SDK
-
fw_build_id.py
script improvements-
script is now compatible with Python2 environments.
-
Added new
--dump <chars>
option to simplify extraction of build id in automation, i.e:python scripts/fw_build_id.py <ELF> --dump 7 3a3e81f
-
- Started work to enable automatic capture of logs in a coredump for the Zephyr & nRF Connect SDK.
- If you were linking
memfault_nrf5_coredump.c
in your project:- the file has been split into
nrf5_coredump_regions.c
(which defines the regions to collect in a coredump) &nrf5_coredump_storage.c
(which implements the port for saving coredumps to internal flash). Both of these files must be added to your build system. - Linker script names for region to save coredump to and regions to collect
need to be updated:
- Update
__CoreStart
&__MemfaultCoreStorageEnd
to__MemfaultCoreStorageStart
&__MemfaultCoreStorageEnd
in linker script. - Update
__MfltCoredumpRamStart
&__MfltCoredumpRamEnd
to__MemfaultCoredumpRamStart
&__MemfaultCoredumpRamEnd
- Update
- the file has been split into
- The SDK now includes a central configuration header at
components/include/memfault/config.h
. Platform overrides can be defined inmemfault_platform_config.h
- Reference platform API implementations for the nRF5 SDK
- All headers for Memfault "components" can now be found under
components/include/memfault/
. This simplifies adding components to build systems as only a single path is now needed!
-
You must create the file
memfault_platform_config.h
and add it to your include path. This file can be used in place of compiler defines to tune the SDK configurations settings. -
If you are not using a Memfault build system helper
- Remove all include paths at
${MEMFAULT_FIRMWARE_SDK}/components/${COMPONENT}/include
- Add include path
${MEMFAULT_FIRMWARE_SDK}/components/include
to your build system
- Remove all include paths at
-
If you were linking any of the nRF5 example app files in your project, the directory has changed:
- ${MEMFAULT_FIRMWARE_SDK}/nrf5/libraries/memfault/platform_reference_impl/memfault_platform_reboot_tracking.c + ${MEMFAULT_FIRMWARE_SDK}/ports/nrf5_sdk/resetreas_reboot_tracking.c - ${MEMFAULT_FIRMWARE_SDK}/nrf5/libraries/memfault/platform_reference_impl/memfault_platform_coredump.c + ${MEMFAULT_FIRMWARE_SDK}/ports/nrf5_sdk/memfault_nrf5_coredump.c
- ESP8266 Updates
- Added new Kconfig option which can be set via
make menuconfig
and be used to disable the Memfault integration,CONFIG_MEMFAULT=n
. - Fixed a 🐛 leading to a compilation error when
both
CONFIG_USING_ESP_CONSOLE=n
andCONFIG_MEMFAULT_CLI_ENABLED=n
- Added new Kconfig option which can be set via
- Added default implementations for
MEMFAULT_GET_LR()
,MEMFAULT_GET_PC()
, andMEMFAULT_BREAKPOINT()
tocompiler_gcc.h
to facilitate compilations of the SDK against other architectures.
- Reference platform API implementations for the following MCUs/SDKs:
- nRF Connect SDK
- Added support for nRF Connect SDK v1.3.x
- Added support for FOTA with Memfault. See
memfault_fota_start()
for more details
- Zephyr
- Added implementations for
memfault_platform_metrics_timer_boot()
&memfault_platform_get_time_since_boot_ms()
memfault dependencies to Zephyr port. A custom implementation can still be provided by settingMEMFAULT_METRICS_TIMER_CUSTOM=y
- Metrics support is now enabled by default when
CONFIG_MEMFAULT=y
and can be disabled by settingCONFIG_MEMFAULT_METRICS=n
- Added support for periodically uploading Memfault data in the background.
This is off by default and can be enabled with the
CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD=y
option
- Added implementations for
- nRF Connect SDK
- Fixed a 🐛 that could lead to an invalid coredump being sent to Memfault when
memfault_packetizer_abort()
was called after a coredump was partially sent.
- Added support for nRF Connect SDK v1.2.x and updated the integration guide accordingly.
- Added full support for the ESP8266 (Tensilica Xtensa LX106) MCU architecture! A step-by-step integration guide can be found here and the port to the ESP8266 RTOS SDK can be found here.
-
Added a convenience header for picking up includes for all Memfault components. If you are using the build system helpers, this path will be picked up automatically.
#include "memfault/components.h" // call to any Memfault API in the components folder
-
Fixed a 🐛 leading to Root CAs not get loaded correctly when using the nRF Connect SDK port and the
MEMFAULT_ROOT_CERT_STORAGE_TLS_CREDENTIAL_STORAGE=y
Kconfig option. -
Applied suggestions from @rerickson1 for the Zephyr and nRF Connect SDK ports:
CONFIG_MEMFAULT_METRICS=y
can now be used to compile the metrics component into the Zephyr and nRF Connect SDK ports.CONFIG_MEMFAULT=y
must now be specified to enable the Memfault integration.
- Refactored the nRF Connect SDK port to build directly on top of the zephyr port reducing code duplication and facilitate the rollout of additional features to both SDKs at the same time moving forward.
- If you are using a Memfault
build system helper and not using
the trace or metrics functionality, you will now need to create a
memfault_trace_reason_user_config.def
ormemfault_metrics_heartbeat_config.def
file, respectively, and add it to your include path. - When using the Zephyr port, the memfault integration must be enabled
explicitly by adding
CONFIG_MEMFAULT=y
to yourprj.conf
- Reference platform API implementations for the following MCUs/SDKs:
- STM32F4 family / STM32CubeF4:
- STM32L4 family / STM32CubeL4
- nRF Connect SDK
- rich reboot reason info derived from PMU RESETREAS register
- refactored HTTP port to support multiple backing storage strategies for
root certificates. See
MEMFAULT_ROOT_CERT_STORAGE_*
Kconfig options for more details - Added support for Memfault OTA downloads. See memfault_nrfconnect_port_ota_update() for more details
- Updated
memfault_freertos_ram_regions.c
port to collect all TCBs and then stacks. This way, the state of all tasks can be recovered even if the coredump storage regin is filled while writing all the task stacks. - Reference platform API implementations for the following MCUs/SDKs:
- STM32F4 family / STM32CubeF4
- STM32L4 family / STM32CubeL4
- NXP's S32K1xx family / S32K1 SDL
- Silicon Lab's EFM/EFR family / v3.0 Gecko SDK
- Added several more
reboot reason options:
kMfltRebootReason_PinReset
for explicitly tracking external pin resets.kMfltRebootReason_SoftwareWatchdog
&kMfltRebootReason_HardwareWatchdog
for easier disambiguation between watchdog resets where a coredump was captured versus ones where no software handler ran and hardware reset the device.kMfltRebootReason_ClockFailure
for explicit tracking of resets due to loss of a clock signal or PLL lock.kMfltRebootReason_Lockup
for explicit tracking of faults from within the Hardfault or NMI exceptions on ARM Cortex-M MCUs.
- Added a utility which can be used to verify a platform coredump storage implementation is working as corrected. For more details about how to use, see memfault_coredump_storage_debug.c.
- Added infrastructure to coredump collection in
panics
component to support ESP8266 (Tensilica Xtensa LX106) MCU architecture.
-
nRF Connect Updates:
- Updated port to support nRF Connect SDK v1.4.0
- Added port of HTTP client to post data to Memfault
- Added support for capturing state of all Zephyr tasks during a crash. This way the state of all threads can be seen in the Memfault UI when a crash is uploaded.
- Updated memfault_demo_app to use the nRF9160-DK
- Added notes to the step-by-step integration guide for the nRF9160.
- Added Memfault OTA support to esp-idf port. Updates can now be performed by
calling
memfault_esp_port_ota_update()
. More details can be found inports/esp_idf/memfault/include/memfault/esp_port/http_client.h
- The esp-idf port debug CLI can now easily be disabled by using the
MEMFAULT_CLI_ENABLED=n
Kconfig option. - Added FreeRTOS utility to facilitate collecting minimal set of RAM in a
coredump necessary to recover backtraces for all tasks. More details can be
found in
ports/freertos/include/memfault/ports/freertos_coredump.h
- Previously, if the Memfault event storage buffer was out of space, a "storage out of space" error would be printed every time. Now, an error message is printed when the issue first happened and an info message is printed when space is free again.
- Added a reference software watchdog port for the STM32H7 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 inports/include/memfault/ports/watchdog.h
.
-
A log can now be captured alongside a trace event by using a new API:
MEMFAULT_TRACE_EVENT_WITH_LOG(reason, ...)
. This can be useful to capture arbitrary diagnostic data with an error event or to capture critical error logs that you would like to be alerted on when they happen. For example:// @file memfault_trace_reason_user_config.def MEMFAULT_TRACE_REASON_DEFINE(Critical_Log)
// @file your_platform_log_implementation.h #include "memfault/core/trace_event.h" #define YOUR_PLATFORM_LOG_CRITICAL(fmt, ....) \ MEMFAULT_TRACE_EVENT_WITH_LOG(Critical_Log, fmt, __VA_ARGS__)
// @file your_platform_temperature_driver.c void record_temperature(void) { // ... // erase flash to free up space int rv = spi_flash_erase(...); if (rv != 0) { YOUR_PLATFORM_LOG_CRITICAL("Flash Erase Failure: rv=%d, spi_err=0x%x", spi_bus_get_status()); } }
-
The error tracing facilities are now initialized automatically for the esp-idf
-
Fixed a 🐛 where an erroneous size was reported from
memfault_coredump_storage_check_size()
ifMEMFAULT_COREDUMP_COLLECT_LOG_REGIONS=1
andmemfault_log_boot()
had not yet been called
- ESP32 port improvements:
- The Memfault
metrics
component is now included by default in the ESP32 port MEMFAULT_LOG_DEBUG
messages now print by default- Added a
heartbeat_dump
CLI command for easy viewing of current heartbeat metrics - Custom handling of collecting Memfault data can now easily be implemented in
the ESP32 port using the new
memfault_esp_port_data_available()
&memfault_esp_port_get_chunk()
APIS. This can be useful in scenarios where there are external MCUs forwarding Memfault chunks to the ESP32.
- The Memfault
- The platform port for the memfault log dependency can now be implemented by
macros (rather than the
memfault_platform_log
dependency). Seecomponents/include/memfault/core/debug_log.h
for more details.
- If you were using the ESP32 port:
- Call to
memfault_metrics_boot()
can now be removed - Custom implementations for
memfault_platform_metrics_timer_boot()
&memfault_platform_get_time_since_boot_ms()
can be removed as they are now provided as part of the port.
- Call to
- Coredumps will now be truncated (instead of failing to save completely) when
the memory regions requested take up more space than the platform storage
allocated for saving. A warning will also be displayed in the Memfault UI when
this happens. Regions are always read in the order returned from
memfault_platform_coredump_get_regions()
so it is recommended to order this list from the most to least important regions to capture. - Updated FreeRTOS port to use static allocation APIs by default when the
configSUPPORT_STATIC_ALLOCATION=1
configuration is used.
- Added several more
reboot reason options:
kMfltRebootReason_SoftwareReset
&kMfltRebootReason_DeepSleep
. - Extended ESP32 port to include integrations for reboot reason tracking and log collection.
- Apply missing check to unit test reported on Github
- Added a new convenience API,
memfault_coredump_storage_check_size()
, to check that coredump storage is appropriately sized. - Fixed a 🐛 with heartbeat timers that would lead to an incorrect duration being reported if the timer was started and stopped within the same millisecond.
- Fixed an issue when using TI's compiler that could lead to the incorrect register state being captured during a fault.
- If you were not using the
error tracing functionality, you will need to
create the configuration file "memfault_trace_reason_user_config.def" and add
it to your include path. This removes the requirement to manually define
MEMFAULT_TRACE_REASON_USER_DEFS_FILE
as part of the compiler flags.
- Add support for sending multiple events in a single chunk. This can be useful
for optimizing throughput or packing more data into a single transmission
unit. The behavior is disabled by default but can be enabled with the
MEMFAULT_EVENT_STORAGE_READ_BATCHING_ENABLED
compiler flag. More details can be found in memfault_event_storage.c - Added convenience API,
memfault_build_id_get_string
, for populating a buffer with a portion of the Memfault Build ID as a string. - Added default implementations of several Memfault SDK dependency functions when using FreeRTOS to ports/freertos.
- A status or error code (i.e bluetooth disconnect reason, errno value, etc) can
now be logged alongside a trace event by using a new API:
MEMFAULT_TRACE_EVENT_WITH_STATUS(reason, status_code)
.
- Added support for TI's ARM-CGT Compiler
- Removed dependency on NMI Exception Handler for
MEMFAULT_ASSERT
s. Instead of pending an NMI exception, the assert path will now "trap" into the fault handler by executing audf
instruction. This unifies the fault handling paths within the SDK and leaves the NMI Handler free for other uses within the user's environment. - Added several more
reboot reason options:
kMfltRebootReason_PowerOnReset
,kMfltRebootReason_BrownOutReset
, &kMfltRebootReason_Nmi
.
- Added utility to facilitate collection of the memory regions used by the
logging module as part of a
coredump. With this change, when the SDK is compiled with
MEMFAULT_COREDUMP_COLLECT_LOG_REGIONS=1
, the logging region will automatically be collected as part of a coredump. Step-by-step details can also be found in the logging integration guide. - Added
MEMFAULT_METRICS_KEY_DEFINE_WITH_RANGE()
which can be used for defining the minimum and maximum expected range for a heartbeat metric. This information is used by the Memfault cloud to better normalize the data when it is presented in the UI.
- If you are not using our CMake or Make
build system helpers and are using
the
panics
component, you will need to manually add the following file to your build system:$(MEMFAULT_SDK_ROOT)/components/panics/src/memfault_coredump_sdk_regions.c
- Added a port for projects using the nRF Connect SDK along with a step-by-step integration guide.
- Disabled optimizations for
memfault_data_export_chunk()
to guarantee the GDB chunk test utility can always be used to post chunks using the data export API.
- Added memfault/core/data_export.h API to facilitate production and evaluation use cases where Memfault data is extracted over a log interface (i.e shell, uart console, log file, etc). See the header linked above or the integration guide for more details.
- Fixed a 🐛 that would cause the demo shell to get stuck if backspace characters were entered while no other characters had been entered.
- Updated the GDB chunk test utility to automatically detect when the data export API is integrated and post-chunks to the cloud directly from GDB when the function is invoked.
- If you are not using our CMake or Make
build system helpers and want to make
use of the new data export API, you will need to manually add the following
files to your build system:
- Add:
$(MEMFAULT_SDK_ROOT)/components/core/src/memfault_data_export.c
- Add:
$(MEMFAULT_SDK_ROOT)/components/util/src/memfault_base64.c
- Add:
- Updated code to support compilations with
-Wunused-parameter
, GNU GCC's-Wformat-signedness
, and Clang's-Wno-missing-prototypes
&-Wno-missing-variable-declarations
. - Updated unit test setup to compile with newly supported warnings treated as errors
- Misc utility additions including support for encoding floats and int64_t's in the cbor utility
- Add additional utilities to the http component to facilitate easier release management integration in environments with no pre-existing http stack.
- Add new cli command,
mflt get_latest_release
, to the Zephyr demo application (tested on the STM32L4) to demonstrate querying the Memfault cloud for new firmware updates.
- Refactored
demo
component to make it easier to integrate an individual CLI commands into a project since some of the commands can be helpful for validating integrations. More details can be found in the README at components/demo/README.md.
-
If you are using the "demo" component and are not making use our CMake or Make build system helpers, you will need to make the following changes:
- Update:
$(MEMFAULT_SDK_ROOT)/components/demo/src/{memfault_demo_cli.c => panics/memfault_demo_panics.c}
- Update:
$(MEMFAULT_SDK_ROOT)/components/demo/src/{ => panics}/memfault_demo_cli_aux.c
- Add:
$(MEMFAULT_SDK_ROOT)/components/demo/src/memfault_demo_core.c
- Add:
$(MEMFAULT_SDK_ROOT)/components/demo/src/http/memfault_demo_http.c
- Update:
-
If you are using the
http
component, the following macro names changed:-#define MEMFAULT_HTTP_GET_API_PORT() -#define MEMFAULT_HTTP_GET_API_HOST() +#define MEMFAULT_HTTP_GET_CHUNKS_API_PORT() +#define MEMFAULT_HTTP_GET_CHUNKS_API_HOST()
- Moved
reboot_tracking.h
tocore
component since it has no dependencies on anything from thepanics
component. This allows the reboot tracking to be more easily integrated in a standalone fashion. - Published a new guide detailing how to manage firmware updates using Memfault.
- Disabled optimizations for
memfault_fault_handling_assert()
. This improves the recovery of local variables of frames in the backtrace when certain optimization levels are used. - Updated
memfault_sdk_assert.c
to address a GCC warning (-Wpointer-to-int-cast
) emitted when compiling the file for 64 bit architectures. - Misc README improvements.
-
If you are already using reboot tracking in your system, you will need to update the following includes in your code:
-#include "memfault/panics/reboot_tracking.h" -#include "memfault/panics/reboot_reason_types.h" +#include "memfault/core/reboot_tracking.h" +#include "memfault/panics/reboot_reason_types.h"
-
If you are not using our CMake or Make build system helpers, you will need to update the path for the following files:
$(MEMFAULT_SDK_ROOT)/components/{panics => core}/src/memfault_ram_reboot_info_tracking.c
$(MEMFAULT_SDK_ROOT)/components/{panics => core}/src/memfault_reboot_tracking_serializer.c
-
eMfltResetReason
was renamed toeMemfaultRebootReason
.
- Added native SDK support for tracking and generating a unique firmware build
id with any compiler! Quick integration steps can be found in
memfault/core/build_info.h.
It is very common, especially during development, to not change the firmware
version between editing and compiling the code. This will lead to issues when
recovering backtraces or symbol information because the debug information in
the symbol file may be out of sync with the actual binary. Tracking a build id
enables the Memfault cloud to identify and surface when this happens! You can
also make use of two new APIs:
memfault_build_info_dump()
can be called on boot to display the build that is running. This can be a useful way to sanity check that your debugger successfully flashed a new image.memfault_build_info_read()
can be used to read the build id for your own use cases. For example you could append a portion of it to a debug version to make it unique.
- The CMake build system helper is now compatible with any 3.x version of CMake (previously required 3.6 or newer).
- The unique firmware build id is stored automatically as part of coredump collection.
- If you are not using our CMake or Make
build system helpers, you will need
to add the following files to your build:
$(MEMFAULT_SDK_ROOT)/components/core/src/memfault_build_id.c
$(MEMFAULT_SDK_ROOT)/components/core/src/memfault_core_utils.c
- We also encourage you to add a unique build id to your build (several line code change).
- Added support for (optionally) storing events collected by the SDK to non-volatile storage mediums. This can be useful for devices which experience prolonged periods of no connectivity. To leverage the feature, an end user must implement the nonvolatile_event_storage platform API.
- Added an assert used internally by the SDK which makes it easier to debug API
misuse during bringup. The assert is enabled by default but can easily be
disabled or overridden. For more details see
memfault/core/sdk_assert.h
. - Added a default implementation of
memfault_platform_halt_if_debugging()
for Cortex-M targets. The function is defined as weak so a user can still define the function to override the default behavior.
- Updated
memfault install_chunk_handler
to work with older versions of the GNU Arm Toolchain.
- If you are not using our CMake or Make
build system helpers, you will need
to add
$(MEMFAULT_SDK_ROOT)/components/core/src/memfault_sdk_assert.c
to your project.
- Moved
trace_event.h
tocore
component since it has no dependencies on anything from thepanics
component. This allows the trace event feature to be more easily integrated in a standalone fashion.
-
If you are already using
MEMFAULT_TRACE_EVENT()
in your project, you will need to update the include as follows:-#include "memfault/panics/trace_event.h" +#include "memfault/core/trace_event.h"
-
If you are not using our CMake or Make build system helpers, you will need to update the source path for
components/panics/src/memfault_trace_event.c
tocomponents/core/src/memfault_trace_event.c
- Added a new GDB command which can be used to post packetized Memfault data directly from GDB to the Memfault cloud. This can be helpful as a way to quickly test data collection functionality while working on an integration of the SDK.
- The
captured_date
for an event can now be set by implementingmemfault_platform_time_get_current()
. If the API is not implemented, thecaptured_date
will continue to be set based on the time the event was received by the memfault cloud.
- Added a reference implementation of
reboot reason tracking to the
NRF52 demo app
and a new
reboot
CLI command to easily exercise it. - A
reset_reason
can now optionally be provided as part ofsResetBootupInfo
. This can be useful for scenarios where the reboot reason is known on bootup but could not be set prior to the device crashing. - A reboot reason event will now always be generated when
memfault_reboot_tracking_boot()
is called even if no information about the reboot has been provided. In this scenario, the reset reason will bekMfltRebootReason_Unknown
- Updated a few Kconfig options in the Zephyr demo app to improve the ability to
compute stack high water marks (
CONFIG_INIT_STACKS=y
) and determine if stacks has overflowed (CONFIG_MPU_STACK_GUARD=y
).
device_serial
is no longer encoded by default as part of events. Instead, thedevice_serial
in an event is populated from the the unique device identifier used when posting the data to the chunks REST endpoint. This leads to ~20% reduction in the size of a typical event. Encodingdevice_serial
as part of the event itself can still be enabled by adding-DMEMFAULT_EVENT_INCLUDE_DEVICE_SERIAL=1
as a compilation flag but should not be necessary for a typical integration.
- Added
memfault_log_read()
API to make it possible to use the module to cache logs in RAM and then flush them out to slower mediums, such as a UART console or Flash, from a background task.
- A pointer to the stack frame upon exception entry is now included in
sCoredumpCrashInfo
when memfault_platform_coredump_get_regions is invoked. This can (optionally) be used to configure regions collected based on the state or run platform specific cleanup based on the state. - Added Root Certificates needed for release downloads to
MEMFAULT_ROOT_CERTS_PEM
.
- All sources that generate events now use the same utility function,
memfault_serializer_helper_encode_metadata()
to encode common event data.
- Introduced a lightweight logging module. When used, the logs leading up to a crash will now be decoded and displayed from the Memfault Issue Details Web UI. For instructions about how to use the module in your project, check out log.h.
- The metrics component will now automatically collect the elapsed time and the number of unexpected reboots during a heartbeat interval. The Memfault cloud now uses this information to automatically compute and display the overall uptime of your fleet.
- Added a new document walking through the design of Memfault event serialization.
- Cleaned up
test_memfault_root_cert.cpp
and moved thebase64
implementation within the unit test to theutil
component so it is easier to share the code elsewhere in the future. - Added
const
to a few circular_buffer.h API signatures. - Misc code comment improvements.
- The function signature for
memfault_metrics_boot()
changed as part of this update. If you are already using themetrics
component, you will need to update the call accordingly. See the notes in metrics.h for more details. - If you are not using our CMake or Make
build system helpers, you will need
to add
$(MEMFAULT_SDK_ROOT)/components/core/src/memfault_log.c
to your project. (Note that untilmemfault_log_boot()
is called, all calls made to the logging module will be a no-op).
- Improve the
memfault_platform_coredump_storage_clear()
NRF52 reference implementation for situations where the SoftDevice is enabled and there is a lot of Bluetooth activity. (In this scenario, NRF52 flash operations may need retries or take a while to complete). - Fixed compiler error that could arise with the metrics component when using Arm Compiler 5 due to multiply defined weak symbols.
- Add support for ESP32 (Tensilica Xtensa LX6 MCU) to the panics component.
- A step-by-step integration guide can be found here.
- A drop-in port for an existing v3.x or v4.x based ESP-IDF project can be found at ports/esp_idf.
- An example application exercising the memfault-firmware-sdk can be found here.
- If a software watchdog has been
implemented on a Cortex-M device,
MemfaultWatchdog_Handler
can now be registered as the Exception Handler to automatically collect a coredump. - For heartbeat metrics, instead of serializing the name of each metric, we now recover it from the debug information in the symbol file in the Memfault cloud. For a typical heartbeat this reduces the serialization size by more than 50% and results in a smaller footprint than other structured serialization alternatives such as Protobuf.
- Remove usage of
__has_include
macro for IAR compiler since not all versions fully support it.
- Add support for calling
MEMFAULT_TRACE_EVENT()
from interrupts. Note: If you are not using our CMake or Make build system helpers, this change requires that you add$(MEMFAULT_SDK_ROOT)/components/core/src/arch_arm_cortex_m.c
to your project. - Misc documentation improvements.
- Add support for compressing coredumps as they are sent using Run Length Encoding (RLE). More details can be found in memfault/core/data_source_rle.h.
- Update metrics component to support compilation with the IAR ARM C/C++ Compiler.
- Update Mbed OS 5 port to use
memfault_demo_shell
insteadmbed-client-cli
, sincembed-client-cli
is not part of the main Mbed OS 5 distribution. - Update nrf52 example application to only collect the active parts of the stack to reduce the overall size of the example coredump.
- Add a new API ("Trace Event") for tracking errors. This allows for tracing issues that are unexpected but are non-fatal (don't result in a device reboot). A step-by-step guide detailing how to use the feature can be found at: https://mflt.io/error-tracing
- Update GDB coredump collection script to work with the ESP32 (Tensilica Xtensa LX6 Architecture)
- Remove
__task
from IAR Cortex-M function handler declarations since it's not explicitly required and can lead to a compiler issue if the function prototype does not also use it. - Misc documentation and comment tweaks to make nomenclature more consistent
- Update panics component to support compilation with IAR ARM C/C++
Compiler. More details about integrating IAR can be found at
https://mflt.io/iar-tutorial. As part of the change
MEMFAULT_GET_LR()
now takes an argument which is the location to store the LR to (void *lr = MEMFAULT_GET_LR()
->void *lr;
MEMFAULT_GET_LR(lr)
)
- Update the chunk protocol to encode CRC in last chunk of message instead of first. This allows the CRC to be computed incrementally and the underlying message to be read once (instead of twice). It also makes it easier to use the data packetizer in environments where reads from data sources need to be performed asynchronously. More details can be found at https://mflt.io/data-to-cloud
- Fixed a couple documentation links
- Guarantee that all accesses to the platform coredump storage region route
through
memfault_coredump_read
while the system is running. - Scrub unused portion of out buffer provided to packetizer with a known pattern for easier debugging
- Add convenience API,
memfault_packetizer_get_chunk()
, to data_packetizer module. - Add a new eMfltCoredumpRegionType,
MemoryWordAccessOnly
which can be used to force the region to be read 32 bits at a time. This can be useful for accessing certain peripheral register ranges which are not byte addressable. - Automatically collect Exception / ISR state for Cortex-M based targets. NOTE
that the default config requires an additional ~150 bytes of coredump storage.
The feature can be disabled completely by adding
-DMEMFAULT_COLLECT_INTERRUPT_STATE=0
to your compiler flags. More configuration options can be found in memfault_coredump_regions_armv7.c. - Improve documentation about integrating the SDK within a project in README
- Update Release note summary to use markdown headings for easier referencing.
- Update try script used to collect coredumps via GDB to also collect Exception/ISR register information.
- Add ARMv6-M fault handling port to panics component for MCUs such as the ARM Cortex-M0 and Cortex-M0+.
- Update panics component to support compilation with Arm Compiler 5.
- Updated Cortex-M fault handler in panics component to also collect
psp
andmsp
registers when the system crashes. This allows for the running thread backtrace to be more reliably recovered when a crash occurs from an ISR. - Added optional
MEMFAULT_EXC_HANDLER_...
preprocessor defines to enable custom naming of exception handlers in the panics component. - Add port for Cortex-M based targets using Quantum Leaps' QP™/C & QP™/C++ real-time embedded framework. See ports/qp/README.md for more details.
- Add demo application running Quantum Leaps' QP™/C running on the STM32F407 discovery board. See examples/qp/README.md for more details.
- Added demo application and port for Arm Mbed OS 5 running on the STM32F429I-DISC1 evaluation board. See examples/mbed/README.md for more details.
- Changed
print_core
toprint_chunk
in demo applications to better align with the Memfault nomenclature for data transfer.
- Expose root certificates used by Memfault CI in DER format for easier integration with TLS libraries which do not parse PEM formatted certificates.
- Add utilities to the http component for constructing Memfault cloud chunk endpoint POST requests to facilitate easier integration in environments with no pre-existing http stack.
- Add port for Cortex-M based targets in the Zephyr RTOS. Ports are available for the 1.14 Long Term Support Release as well as the 2.0 Release. See ports/zephyr/README.md for more details
- Add Zephyr demo application (tested on the STM32L4). See zephyr demo app directory for more details
- Release of metrics component. This API can easily be used to monitor device health over time (i.e connectivity, battery life, MCU resource utilization, hardware degradation, etc) and configure Alerts with the Memfault backend when things go astray. To get started, see this document
-
Updated
memfault_platform_coredump_get_regions()
to take an additional argument,crash_info
which conveys information about the crash taking place (trace reason & stack pointer at time of crash). This allows platform ports to dynamically change the regions collected based on the crash if so desired. This will require an update that looks like the following to your port:-const sMfltCoredumpRegion *memfault_platform_coredump_get_regions(size_t *num_regions) { +const sMfltCoredumpRegion *memfault_platform_coredump_get_regions( + const sCoredumpCrashInfo *crash_info, size_t *num_regions) {
-
Added a new API,
memfault_coredump_storage_compute_size_required()
which can be called on boot to sanity check that platform coredump storage is large enough to hold a coredump. For example:sMfltCoredumpStorageInfo storage_info = { 0 }; memfault_platform_coredump_storage_get_info(&storage_info); const size_t size_needed = memfault_coredump_storage_compute_size_required(); if (size_needed > storage_info.size) { MEMFAULT_LOG_ERROR("Coredump storage too small. Got %d B, need %d B", storage_info.size, size_needed); } MEMFAULT_ASSERT(size_needed <= storage_info.size);
-
Added a convenience RAM backed reference port for coredump platform APIs. This can be used for persisting a coredump in RAM across a reset.
- Enhanced Reboot Tracking module within the panics component. Reboots that
don't result in coredumps can now be easily tracked (i.e brown outs, system
watchdogs, user initiated resets, resets due to firmware updates, etc). See
memfault/core/reboot_tracking.h
for more details and https://mflt.io/2QlOlgH for a step-by-step setup tutorial. - Added Event Storage module within the core component. This is a small RAM backed data store that queues up traces to be published to the Memfault cloud. To minimize the space needed and transport overhead, all events collected within the SDK are stored using the Concise Binary Object Representation (CBOR)
- Added helper makefile (
makefiles/MemfaultWorker.mk
). A user of the SDK can include this makefile when using a make as their build system to easily collect the sources and include paths needed to build Memfault SDK components - Make unit tests public & add CI to external SDK
- Added firmware side support for the Memfault cloud chunk endpoint. This is
a sessionless endpoint that allows chunks of arbitrary size to be sent and
reassembled in the Memfault cloud. This transport can be used to publish any
data collected by the Memfault SDK. The data is read out on the SDK side by
calling the
memfault_packetizer_get_next()
API indata_packetizer.h
. More details here - Updated demo apps to use the new chunk endpoint
- Added a new weak function,
memfault_coredump_read()
so platform ports can easily add locking on reads to coredump storage if necessary for transmission. - Updates to this version of the sdk will require the util component get compiled when using the panics API
- Added example port and demo for the STM32H743I-NUCLEO144 evaluation board
running ChibiOS. See
examples/stm32/stm32h743i/README.md
for more details. - general README documentation improvements
- Fixed compilation error that could arise in
memfault_fault_handling_arm.c
when using old versions of GCC
- Updated panics SDK to support complex hardware toplogies such as systems
with multiple MCUs or systems running multiple binaries on a single MCU. More
details here. Users of the SDK will need to update
the implementation for
memfault_platform_get_device_info()
- Updated all ports to be in sync with SDK updates
- Updated panics core code to always collect fault registers for ARMv6-M & ARMv7-M architectures. The Memfault cloud will auto-analyze these and present an analysis.
- Updated https://try.memfault.com gdb script to collect Cortex-M MPU region information for auto-analysis
- general README documentation improvements
- improved error reporting strategy and documentation in
memfault/core/errors.h
- added example port and demo of panics SDK for the Nordic nRF52840
(PCA10056) development kit. See
examples/nrf5/README.md
for more details. - Made SDK headers suitable for includion in C++ files
First Public Release of Memfault Firmware SDK 0.0.2 - June 26, 2019
- published initial Memfault SDK, see
README.md
in root for summary - published panics API which is a C SDK that can be integrated into any
Cortex-M device to save a "core" (crash state) on faults and system asserts.
See
components/panics/README.md
for more details - Added example port and demo of panics SDK for the BCM943364WCD1 evaluation
board running the WICED Wifi stack. More details in
examples/wiced/README.md
- add python invoke based CLI wrapper for demo ports