Skip to content

Commit 67244e0

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 1.30.3 (Build 15552)
1 parent 4b55585 commit 67244e0

19 files changed

+290
-28
lines changed

CHANGELOG.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,58 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [1.30.3] - 2025-10-23
10+
11+
This is a patch release, fixing build errors and one bug.
12+
13+
### 🛠️ Changed
14+
15+
- Zephyr:
16+
17+
- Update the RRAM coredump storage backend implementation to support the
18+
Nordic nRF54LM20 (and other Nordic nRF54L series chips) when not using
19+
partition manager to assign flash regions (i.e. using device tree fixed
20+
partitions). See
21+
[`ports/zephyr/common/memfault_rram_backed_coredump.c`](ports/zephyr/common/memfault_rram_backed_coredump.c)
22+
for details, and how to enable the coredump storage backend.
23+
24+
- Fix a compilation error when `CONFIG_MEMFAULT_METRICS_THREADS_DEFAULTS=n`.
25+
26+
- Remove an error log statement from
27+
[`memfault_platform_thread_metrics.c`](ports/zephyr/common/memfault_platform_thread_metrics.c).
28+
Previously this would log as
29+
`<err> mflt: No thread name registered for 0x2000eae8`, for example, but was
30+
not useful in many cases, and is not an error in any case.
31+
32+
### 🐛 Fixed
33+
34+
- ESP-IDF:
35+
36+
- Fix a compilation issue when building the [ESP32 sample app](examples/esp32)
37+
for an ESP32-C6 with `MEMFAULT_DISABLE=` set (i.e.
38+
`MEMFAULT_DISABLE=1 idf.py set-target esp32c6 build`). This only impacts the
39+
sample application.
40+
41+
- Zephyr:
42+
43+
- Disable invoking `LOG_PANIC()` during fault handling by default. When
44+
deferred logging is used (`CONFIG_LOG_MODE_DEFERRED=y`), triggering a panic
45+
flush from fault context may result in some log backends
46+
(`CONFIG_SHELL_LOG_BACKEND` for example) to double-fault, which results in
47+
failed coredump captures. This specifically can happen when running a
48+
non-secure application with TF-M, and passing back from a secure fault
49+
handler using `CONFIG_TFM_ALLOW_NON_SECURE_FAULT_HANDLING=y`. Users who are
50+
comfortable enabling this can re-enable `LOG_PANIC()` with
51+
`CONFIG_MEMFAULT_FAULT_HANDLER_LOG_PANIC=y`.
52+
53+
- Remove an unnecessary `depends on PARTITION_MANAGER_ENABLED` in the
54+
`MEMFAULT_COREDUMP_STORAGE_RRAM` Kconfig setting. This feature only requires
55+
a partition labeled `memfault_coredump_partition`, but does not require
56+
partition manager specifically (which is a Nordic nRF-Connect SDK feature,
57+
not a Zephyr feature). Thanks to
58+
[@JordanYates](https://github.com/JordanYates) for reporting this issue in
59+
[#96](https://github.com/memfault/memfault-firmware-sdk/issues/96)!
60+
961
## [1.30.2] - 2025-10-10
1062

1163
This is a patch release, including only a change to boolean Kconfig prompts so
@@ -40,7 +92,7 @@ This is a minor release. Highlights:
4092

4193
### 📈 Added
4294

43-
- Zephyr
95+
- Zephyr:
4496

4597
- Add Kconfig option
4698
`CONFIG_MEMFAULT_COREDUMP_ACTIVE_TASK_STACK_SIZE_TO_COLLECT` to control how
@@ -56,7 +108,7 @@ This is a minor release. Highlights:
56108

57109
### 🛠️ Changed
58110

59-
- Zephyr
111+
- Zephyr:
60112

61113
- Replace use of deprecated API `bt_hci_cmd_create()` with
62114
`bt_hci_cmd_alloc()` for Zephyr 4.2+.

VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
BUILD ID: 15462
2-
GIT COMMIT: b238b31908
3-
VERSION: 1.30.2
1+
BUILD ID: 15552
2+
GIT COMMIT: b8b409dcbf
3+
VERSION: 1.30.3

components/include/memfault/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ typedef struct {
2020
} sMfltSdkVersion;
2121

2222
#define MEMFAULT_SDK_VERSION \
23-
{ .major = 1, .minor = 30, .patch = 2 }
24-
#define MEMFAULT_SDK_VERSION_STR "1.30.2"
23+
{ .major = 1, .minor = 30, .patch = 3 }
24+
#define MEMFAULT_SDK_VERSION_STR "1.30.3"
2525

2626
#ifdef __cplusplus
2727
}

examples/esp32/apps/memfault_demo_app/main/led.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ static void led_config(void) {
102102
}
103103
#endif // ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
104104

105-
static void prv_heartbeat_led_callback(MEMFAULT_UNUSED TimerHandle_t handle) {
105+
static void prv_heartbeat_led_callback(TimerHandle_t handle) {
106+
(void)handle;
107+
106108
static bool s_led_state = true;
107109

108110
/* If the addressable LED is enabled */

examples/esp32/apps/memfault_demo_app/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ void esp_heap_trace_alloc_hook(void *ptr, size_t size, uint32_t caps) {
361361
}
362362
#endif
363363

364-
#if !defined(CONFIG_MEMFAULT_LOG_USE_VPRINTF_HOOK)
364+
#if defined(CONFIG_MEMFAULT) && !defined(CONFIG_MEMFAULT_LOG_USE_VPRINTF_HOOK)
365365
// Demonstrate a custom vprintf hook that prefixes all log messages with
366366
// "[IDF]", before invoking the Memfault log hook, and then printing to stdout.
367367
static int prv_vprintf_hook(const char *fmt, va_list args) {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Use RRAM internal storage implementation instead of flash-based
2+
CONFIG_MEMFAULT_NCS_INTERNAL_FLASH_BACKED_COREDUMP=n
3+
CONFIG_MEMFAULT_COREDUMP_STORAGE_RRAM=y
4+
5+
# Place the noinit objects into a custom section.
6+
CONFIG_MEMFAULT_REBOOT_TRACKING_REGION="memfault_noinit.memfault_reboot_info"
7+
CONFIG_MEMFAULT_RAM_BACKED_COREDUMP_REGION="memfault_noinit.memfault_coredump"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
Example device tree overlay for the nrf54lm20dk, showing how to set a
3+
fixed-partition region for RRAM-backed coredump storage. Pass it with
4+
'-DDTC_OVERLAY_FILE=boards/nrf54lm20pdk_nrf54lm20a_cpuapp.overlay.example'
5+
when building.
6+
*/
7+
8+
&cpuapp_rram {
9+
partitions {
10+
storage_partition: partition@1d1000 {
11+
label = "storage";
12+
reg = < 0x1d1000 0x4000 >;
13+
};
14+
memfault_coredump_partition: partition@1d5000 {
15+
label = "memfault_coredump_partition";
16+
reg = <0x1d5000 0x5000>;
17+
};
18+
};
19+
};
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
EMPTY_0:
2+
address: 0xd800
3+
end_address: 0xe000
4+
placement:
5+
after:
6+
- mcuboot
7+
region: flash_primary
8+
size: 0x800
9+
memfault_coredump_partition:
10+
address: 0x1fc000
11+
end_address: 0x1fd000
12+
placement:
13+
after:
14+
- mcuboot_secondary
15+
region: flash_primary
16+
size: 0x1000
17+
app:
18+
address: 0xe800
19+
end_address: 0x105000
20+
region: flash_primary
21+
size: 0xf6800
22+
bootconf:
23+
address: 0xffd080
24+
end_address: 0xffd084
25+
region: bootconf
26+
size: 0x4
27+
mcuboot:
28+
address: 0x0
29+
end_address: 0xd800
30+
placement:
31+
align:
32+
end: 0x1000
33+
before:
34+
- mcuboot_primary
35+
region: flash_primary
36+
size: 0xd800
37+
mcuboot_pad:
38+
address: 0xe000
39+
end_address: 0xe800
40+
placement:
41+
before:
42+
- mcuboot_primary_app
43+
region: flash_primary
44+
size: 0x800
45+
mcuboot_primary:
46+
address: 0xe000
47+
end_address: 0x105000
48+
orig_span: &id001
49+
- app
50+
- mcuboot_pad
51+
region: flash_primary
52+
sharers: 0x1
53+
size: 0xf7000
54+
span: *id001
55+
mcuboot_primary_app:
56+
address: 0xe800
57+
end_address: 0x105000
58+
orig_span: &id002
59+
- app
60+
region: flash_primary
61+
size: 0xf6800
62+
span: *id002
63+
mcuboot_secondary:
64+
address: 0x105000
65+
end_address: 0x1fc000
66+
placement:
67+
after:
68+
- mcuboot_primary
69+
align:
70+
start: 0x1000
71+
align_next: 0x1000
72+
region: flash_primary
73+
share_size:
74+
- mcuboot_primary
75+
size: 0xf7000
76+
sram_primary:
77+
address: 0x20000000
78+
end_address: 0x2007fc00
79+
region: sram_primary
80+
size: 0x7fc00

ports/zephyr/Kconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ config MEMFAULT_RAM_BACKED_COREDUMP
8383
config MEMFAULT_COREDUMP_STORAGE_RRAM
8484
bool "RRAM backed coredump storage"
8585
depends on NRFX_RRAMC
86-
depends on PARTITION_MANAGER_ENABLED
8786
help
8887
Use an internal RRAM-backed coredump storage implementation. Requires
8988
a partition labeled `memfault_coredump_partition`.
@@ -872,6 +871,15 @@ config MEMFAULT_FAULT_HANDLER_RETURN
872871
instead of rebooting the system. Useful if the system needs to hook into
873872
`k_sys_fatal_error_handler` at the end of system fault handling.
874873

874+
config MEMFAULT_FAULT_HANDLER_LOG_PANIC
875+
bool "Trigger LOG_PANIC() on fault handling"
876+
default n
877+
help
878+
When enabled, the Memfault fault handler will call `LOG_PANIC()` to
879+
flush logs during fault handling. Note that this can cause unexpected
880+
behavior in some log backends that are not safe to call from fault
881+
context.
882+
875883
choice MEMFAULT_SYSTEM_TIME_SOURCE
876884
prompt "Memfault system time source"
877885
default MEMFAULT_SYSTEM_TIME_SOURCE_DATETIME if DATE_TIME

ports/zephyr/common/memfault_mram_backed_coredump.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22
//!
33
//! Copyright (c) Memfault, Inc.
44
//! See LICENSE for details
5+
//!
6+
//! MRAM backed coredump storage implementation. To make use of this, be sure to
7+
//! add a fixed partition named "memfault_coredump_partition" to your device
8+
//! tree or use partition manager to define one.
9+
//!
10+
//! For example, if using partition manager, you might add an entry like this to
11+
//! the application's pm_static.yml file:
12+
//!
13+
//! memfault_coredump_partition:
14+
//! address: 0x155000
15+
//! end_address: 0x165000
16+
//! placement:
17+
//! align:
18+
//! start: 0x1000
19+
//! before:
20+
//! - end
21+
//! region: flash_primary
22+
//! size: 0x10000
23+
//!
24+
//! If using device tree specified partitions, you might add something like this
25+
//! to your board's dts file/overlay:
26+
//!
27+
//! &mram1x {
28+
//! partitions {
29+
//! memfault_coredump_partition: partition@1a9000 {
30+
//! reg = <0x1a9000 DT_SIZE_K(20)>;
31+
//! };
32+
//! };
33+
//! };
534

635
#include <memfault/components.h>
736
#include <zephyr/drivers/flash.h>

0 commit comments

Comments
 (0)