Skip to content

Commit a7b3a91

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 1.29.0 (Build 15235)
1 parent 60e9ab9 commit a7b3a91

39 files changed

+1035
-119
lines changed

CHANGELOG.md

Lines changed: 163 additions & 49 deletions
Large diffs are not rendered by default.

VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
BUILD ID: 14860
2-
GIT COMMIT: 4678716f67
3-
VERSION: 1.28.0
1+
BUILD ID: 15235
2+
GIT COMMIT: e7a5241921
3+
VERSION: 1.29.0

components/include/memfault/metrics/metrics.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,16 +325,26 @@ void memfault_metrics_session_register_end_cb(eMfltMetricsSessionIndex session_k
325325
//! powered off.
326326
int memfault_metrics_session_start(eMfltMetricsSessionIndex session_key);
327327

328-
//! Used to stop a metric "session".
328+
//! Used to end a metric "session"- the session timer is stopped, the end
329+
//! callback is executed, and metric data is serialized. Session data is cleared
330+
//! after serialization.
329331
//!
330332
//! Same as @memfault_metrics_session_start except for stopping a session.
331333
int memfault_metrics_session_end(eMfltMetricsSessionIndex session_key);
332334

335+
//! Reset a session. Used to deactivate a session instead of ending it. Session
336+
//! timer is stopped and session metric data is cleared.
337+
//!
338+
//! Safe to call on an inactive session.
339+
void memfault_metrics_session_reset(eMfltMetricsSessionIndex session_key);
340+
333341
//! Alternate API that includes the 'MEMFAULT_METRICS_SESSION_KEY()' expansion
334342
#define MEMFAULT_METRICS_SESSION_START(key) \
335343
memfault_metrics_session_start(MEMFAULT_METRICS_SESSION_KEY(key))
336344
#define MEMFAULT_METRICS_SESSION_END(key) \
337345
memfault_metrics_session_end(MEMFAULT_METRICS_SESSION_KEY(key))
346+
#define MEMFAULT_METRICS_SESSION_RESET(key) \
347+
memfault_metrics_session_reset(MEMFAULT_METRICS_SESSION_KEY(key))
338348

339349
//! Collect built-in metrics as part of default ports in memfault-firmware-sdk.
340350
//!

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 = 28, .patch = 0 }
24-
#define MEMFAULT_SDK_VERSION_STR "1.28.0"
23+
{ .major = 1, .minor = 29, .patch = 0 }
24+
#define MEMFAULT_SDK_VERSION_STR "1.29.0"
2525

2626
#ifdef __cplusplus
2727
}

components/metrics/src/memfault_metrics.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,19 @@ int memfault_metrics_session_end(eMfltMetricsSessionIndex session_key) {
13081308
return prv_metrics_session_end(session_key, true);
13091309
}
13101310

1311+
void memfault_metrics_session_reset(eMfltMetricsSessionIndex session_key) {
1312+
memfault_lock();
1313+
{
1314+
// Reset all metrics for the session, including the session timer
1315+
MemfaultMetricId key = s_memfault_metrics_session_timer_keys[session_key];
1316+
(void)prv_find_timer_metric_and_update(key, kMemfaultTimerOp_Stop);
1317+
prv_reset_metrics(false, session_key);
1318+
1319+
memfault_reboot_tracking_metrics_session(false, session_key);
1320+
}
1321+
memfault_unlock();
1322+
}
1323+
13111324
void memfault_metrics_session_register_start_cb(eMfltMetricsSessionIndex session_key,
13121325
MemfaultMetricsSessionStartCb session_start_cb) {
13131326
memfault_lock();

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ bool wifi_join(const char *ssid, const char *pass) {
166166
return false;
167167
}
168168

169-
static int wifi_disconnect() {
169+
static int wifi_disconnect(int argc, char **argv) {
170+
(void)argc, (void)argv;
170171
return esp_wifi_disconnect();
171172
}
172173

examples/nrf-connect-sdk/nrf5/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ commands:
2626
❯ west flash
2727
```
2828

29+
> Optionally, for the `nrf54l` series only, to store coredumps in RAM instead of
30+
> RRAM, comment out the line in the `memfault_demo_app/boards/nrf54l15dk_nrf54l15_cpuapp.conf` file:
31+
>
32+
> ```bash
33+
> # CONFIG_MEMFAULT_COREDUMP_STORAGE_RRAM=y
34+
> ```
35+
2936
Open a serial terminal to access the console:
3037
3138
```bash

examples/nrf-connect-sdk/nrf5/memfault_demo_app/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
1010
project(fs_shell)
1111

1212
FILE(GLOB app_sources src/*.c)
13-
target_sources(app PRIVATE ${app_sources})
13+
target_sources(app PRIVATE
14+
src/main.c
15+
src/shell_commands.c
16+
)
1417

1518
zephyr_include_directories(config)
1619

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Use MRAM internal storage implementation instead of flash-based
2+
CONFIG_MEMFAULT_NCS_INTERNAL_FLASH_BACKED_COREDUMP=n
3+
CONFIG_MEMFAULT_COREDUMP_STORAGE_MRAM=y
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
Adjust the fixed partitions in MRAM1 to add a 'memfault_coredump' partition
3+
for storing coredumps when using MRAM-backed coredump storage.
4+
*/
5+
6+
&mram1x {
7+
partitions {
8+
storage_partition: partition@1a4000 {
9+
reg = <0x1a4000 DT_SIZE_K(20)>;
10+
};
11+
memfault_coredump_partition: partition@1a9000 {
12+
reg = <0x1a9000 DT_SIZE_K(20)>;
13+
};
14+
};
15+
};

0 commit comments

Comments
 (0)