Skip to content

Commit dae1917

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 1.7.2 (Build 6714)
1 parent d7ca406 commit dae1917

File tree

13 files changed

+107
-29
lines changed

13 files changed

+107
-29
lines changed

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# Memfault Firmware SDK Changelog
22

3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to
7+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8+
9+
## [1.7.2] - 2024-03-09
10+
11+
### :chart_with_upwards_trend: Improvements
12+
13+
- General:
14+
15+
- The Memfault Self Test component boot check now prints all components that
16+
are booted (previously only un-booted components would print):
17+
18+
```plaintext
19+
MFLT:[INFO] =============================
20+
MFLT:[INFO] Component Boot Test
21+
MFLT:[INFO] =============================
22+
MFLT:[INFO] Component | Booted?|
23+
MFLT:[INFO] -----------------------------
24+
MFLT:[INFO] Event Storage | yes|
25+
MFLT:[INFO] Logging | yes|
26+
MFLT:[INFO] Reboot Tracking | yes|
27+
MFLT:[INFO] Trace Event | yes|
28+
MFLT:[INFO] All components booted
29+
MFLT:[INFO] =============================
30+
```
31+
32+
- Restore the Memfault Demo CLI `heartbeat` command, which was unintentionally
33+
removed in v1.7.1. This command triggers a heartbeat on-demand, for testing
34+
heartbeat functionality.
35+
36+
- Zephyr:
37+
38+
- A few minor changes to support the upcoming Zephyr 3.6 release, specifically
39+
for devices that use mbedTLS for TLS connections.
40+
41+
- ESP-IDF:
42+
43+
- v1.7.0 of the SDK added a Kconfig flag to enabled Compact Logs,
44+
`CONFIG_MEMFAULT_COMPACT_LOG_ENABLE`. Updating from older versions of the
45+
SDK would require opting in to that option, even if Compact Logging was
46+
enabled via the Memfault config flag, `MEMFAULT_COMPACT_LOG_ENABLE`.
47+
Instead, support enabling Compact Logs both via the Memfault config flag or
48+
the Kconfig flag, to require no changes when updating the SDK for existing
49+
users.
50+
351
## [1.7.1] - 2024-02-28
452
553
### :chart_with_upwards_trend: Improvements

VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
BUILD ID: 6524
2-
GIT COMMIT: 14c45caf49
3-
VERSION: 1.7.1
1+
BUILD ID: 6714
2+
GIT COMMIT: 1d29e68571
3+
VERSION: 1.7.2

components/core/src/memfault_self_test.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ uint32_t memfault_self_test_component_boot_test(void) {
207207
MEMFAULT_LOG_INFO("-----------------------------");
208208
for (size_t i = 0; i < MEMFAULT_ARRAY_SIZE(s_boot_components); i++) {
209209
bool booted = s_boot_components[i].booted();
210-
if (!booted) {
210+
if (booted) {
211+
MEMFAULT_LOG_INFO("%-16s|%8s|", s_boot_components[i].component_name, "yes");
212+
} else {
211213
MEMFAULT_LOG_ERROR("%-16s|%8s|", s_boot_components[i].component_name, "no");
212214
result |= (1 << i);
213215
}

components/demo/src/memfault_demo_shell_commands.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ static const sMemfaultShellCommand s_memfault_shell_commands[] = {
101101
{ "get_core", memfault_demo_cli_cmd_get_core, "Get coredump info" },
102102
{ "get_device_info", memfault_demo_cli_cmd_get_device_info, "Get device info" },
103103
{ "coredump_size", memfault_demo_cli_cmd_coredump_size, "Print the coredump storage capacity" },
104+
{ "heartbeat", memfault_demo_cli_cmd_heartbeat, "Trigger a heartbeat" },
104105
{ "metrics_dump", memfault_demo_cli_cmd_metrics_dump,
105106
"Dump current heartbeat or session metrics" },
106107
//

components/include/memfault/version.h

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

22-
#define MEMFAULT_SDK_VERSION { .major = 1, .minor = 7, .patch = 1 }
23-
#define MEMFAULT_SDK_VERSION_STR "1.7.1"
22+
#define MEMFAULT_SDK_VERSION { .major = 1, .minor = 7, .patch = 2 }
23+
#define MEMFAULT_SDK_VERSION_STR "1.7.2"
2424

2525
#ifdef __cplusplus
2626
}

examples/esp32/apps/memfault_demo_app/sdkconfig.defaults

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ CONFIG_MEMFAULT_ASSERT_ON_ALLOC_FAILURE=y
4646
CONFIG_MEMFAULT_REBOOT_REASON_CUSTOM_ENABLE=y
4747

4848
# Enable compact logging
49-
CONFIG_MEMFAULT_ENABLE_COMPACT_LOGGING=y
49+
CONFIG_MEMFAULT_COMPACT_LOG_ENABLE=y

examples/freertos/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ CFLAGS += \
114114
-Og \
115115
-MD \
116116

117+
# Enable the self test by default
118+
MEMFAULT_DEMO_CLI_SELF_TEST ?= 1
119+
CFLAGS += -DMEMFAULT_DEMO_CLI_SELF_TEST=$(MEMFAULT_DEMO_CLI_SELF_TEST)
120+
117121
LINKER_SCRIPT = $(BOARD_DIR)/linker.ld
118122

119123
LDFLAGS += \

examples/zephyr/qemu/qemu-app/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ CONFIG_ASSERT=y
4444
# Enable Memfault Compact Logs
4545
CONFIG_MEMFAULT_COMPACT_LOG=y
4646

47+
# Enable Memfault self test
48+
CONFIG_MEMFAULT_SHELL_SELF_TEST=y
49+
CONFIG_MEMFAULT_SHELL_SELF_TEST_COREDUMP_STORAGE=y
50+
4751
# Enable emulated RTC driver. Disabled by default because the RTC need to be
4852
# explicitly updated at runtime to wall clock time, otherwise it will print
4953
# errors.

examples/zephyr/qemu/qemu-app/west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ manifest:
1313
projects:
1414
- name: zephyr
1515
remote: zephyrproject-rtos
16-
revision: v3.5.0
16+
revision: v3.6.0
1717
import:
1818
# Limit the Zephyr modules to the required set
1919
name-allowlist:

ports/esp_idf/memfault/CMakeLists.txt

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,21 @@ if(CONFIG_MEMFAULT_MBEDTLS_METRICS)
269269
target_link_libraries(${this_component} INTERFACE "-Wl,--wrap=mbedtls_calloc -Wl,--wrap=mbedtls_free")
270270
endif()
271271

272-
# Include a linker script fragment to support compact logs, when enabled
273-
if(CONFIG_MEMFAULT_COMPACT_LOG_ENABLE)
274-
get_filename_component(compact_log_linker_script ${MEMFAULT_ESP_IDF_PORT_COMMON}/memfault_compact_log.ld ABSOLUTE)
275-
target_link_libraries(
276-
${this_component}
277-
INTERFACE
278-
-T ${compact_log_linker_script}
279-
)
280-
endif()
272+
# Include a linker script fragment to support compact logs unconditionally. It's
273+
# Include a linker script fragment to support compact logs unconditionally. It's
274+
# only populated if compact logs are enabled, and otherwise is ignored. We keep
275+
# it unconditionally included for backwards compatibility, so users updating the
276+
# SDK don't need to change any build configuration.
277+
get_filename_component(compact_log_linker_script ${MEMFAULT_ESP_IDF_PORT_COMMON}/memfault_compact_log.ld ABSOLUTE)
278+
target_link_libraries(
279+
${this_component}
280+
INTERFACE
281+
# Note: there is intentionally no space between -T and the linker script
282+
# file name. This is required for PlatformIO compatibility- the PlatformIO
283+
# build system inserts arguments into the linker command line, so we need to
284+
# make sure it can't separate the -T and the linker script file name.
285+
-T${compact_log_linker_script}
286+
)
281287

282288
# Link required libraries and add compiler flags to enable FreeRTOS region collection
283289
# in >= 4.4.3. Note: CMake does not short-circuit logic statements, nested ifs required

0 commit comments

Comments
 (0)