Skip to content

Commit 6f3f1c2

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 0.31.4 (Build 478452)
1 parent ae5b690 commit 6f3f1c2

File tree

21 files changed

+131
-481
lines changed

21 files changed

+131
-481
lines changed

CHANGES.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
### Changes between Memfault SDK 0.31.4 and SDK 0.31.3 - July 19, 2022
2+
3+
#### :chart_with_upwards_trend: Improvements
4+
5+
- ESP32 port: add new Kconfig option, `CONFIG_MEMFAULT_AUTOMATIC_INIT`, that can
6+
be explicitly set to `n` to skip automatically initializing the Memfault SDK
7+
on boot. This can be useful if Memfault SDK initialization needs to be
8+
deferred to application start.
9+
10+
- Zephyr port: add Kconfig options,
11+
`CONFIG_MEMFAULT_INIT_PRIORITY`/`CONFIG_MEMFAULT_INIT_LEVEL_POST_KERNEL` for
12+
controlling the Memfault SDK initialization level and priority. This can be
13+
useful when needing Memfault to initialize earlier in the system startup
14+
sequence, for example for diagnosing crashes in an early driver
15+
initialization.
16+
17+
- Partial support, still in progress, for NRF Connect SDK + Zephyr v3.1:
18+
- Remove reference to the now-removed Kconfig symbol,
19+
`NET_SOCKETS_OFFLOAD_TLS` to enable building without warnings. **NOTE:** if
20+
mbedtls is enabled (`CONFIG_MBEDTLS=y`), but is _not_ being used for HTTP
21+
transfers (eg, mbedtls is used for security functions, but the device does
22+
not use HTTP for transferring data), it may be necessary to explicitly set
23+
`CONFIG_MEMFAULT_HTTP_USES_MBEDTLS=n`.
24+
25+
#### :house: Internal
26+
27+
- Zephyr port: remove an unused header file,
28+
`ports/zephyr/common/memfault_zephyr_http.h`
29+
30+
- Remove `memfault_demo_cli_cmd_print_chunk()` demo function.
31+
`memfault_data_export_dump_chunks()` can be used instead, which is intended to
32+
be used with the "Chunks Debug" UI in the Memfault web application- see
33+
[here](https://mflt.io/chunk-data-export) for more details
34+
135
### Changes between Memfault SDK 0.31.3 and SDK 0.31.2 - July 8, 2022
236

337
#### :chart_with_upwards_trend: Improvements

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
BUILD ID: 474047
2-
GIT COMMIT: 74c12c38c
1+
BUILD ID: 478452
2+
GIT COMMIT: 56592ceef

components/demo/src/memfault_demo_cli_print_chunk.c

Lines changed: 0 additions & 149 deletions
This file was deleted.

components/include/memfault/demo/cli.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ int memfault_demo_cli_cmd_get_core(int argc, char *argv[]);
4646
//! It takes no arguments.
4747
int memfault_demo_cli_cmd_post_core(int argc, char *argv[]);
4848

49-
//! Command to print out the next Memfault data to send and print as a curl command.
50-
//! It takes zero or one string argument, which can be:
51-
//! - curl : (default) prints a shell command to post the next data chunk to Memfault's API (using echo, xxd and curl)
52-
//! - hex : hexdumps the data
53-
int memfault_demo_cli_cmd_print_chunk(int argc, char *argv[]);
54-
5549
//! Command to clear a coredump.
5650
//! It takes no arguments.
5751
int memfault_demo_cli_cmd_clear_core(int argc, char *argv[]);

components/include/memfault/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ typedef struct {
1919
uint8_t patch;
2020
} sMfltSdkVersion;
2121

22-
#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 31, .patch = 3 }
22+
#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 31, .patch = 4 }
2323

2424
#ifdef __cplusplus
2525
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ static void prv_initialize_task_watchdog(void) {
214214

215215
// This task started by cpu_start.c::start_cpu0_default().
216216
void app_main() {
217+
#if !CONFIG_MEMFAULT_AUTOMATIC_INIT
218+
memfault_boot();
219+
#endif
217220
extern void memfault_platform_device_info_boot(void);
218221
memfault_platform_device_info_boot();
219222
g_unaligned_buffer = &s_my_buf[1];

examples/wiced/apps/memfault_demo_app/memfault_demo_app.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ static const command_t commands[] = {
4949
{"get_core", memfault_demo_cli_cmd_get_core, 0, NULL, NULL, NULL, "Get coredump info"},
5050
{"clear_core", memfault_demo_cli_cmd_clear_core, 0, NULL, NULL, NULL, "Clear an existing coredump"},
5151
{"post_core", memfault_demo_cli_cmd_post_core, 0, NULL, NULL, NULL, "Post coredump to Memfault"},
52-
{"print_chunk", memfault_demo_cli_cmd_print_chunk, 0, NULL, NULL, "[curl|hex]", "Get next Memfault data chunk to send and print as a curl command"},
5352
{"crash", memfault_demo_cli_cmd_crash, 1, NULL, NULL, "<type>"ESCAPE_SPACE_PROMPT, "Trigger a crash"},
5453

5554
{"get_core_region", prv_get_core_region, 0, NULL, NULL, NULL, "Get coredump SPI region info"},

examples/wiced/libraries/memfault/demo/demo.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ NAME := MemfaultDemo
22

33
$(NAME)_SOURCES := \
44
src/http/memfault_demo_http.c \
5-
src/memfault_demo_cli_print_chunk.c \
65
src/memfault_demo_core.c \
76
src/panics/memfault_demo_cli_aux.c \
87
src/panics/memfault_demo_panics.c

ports/esp_idf/memfault/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,12 @@ menu "Memfault"
2626
defined in a partitions*.csv file. If the device has already
2727
been shipped and the partition table cannot be modified, an
2828
OTA slot can be used instead.
29+
30+
config MEMFAULT_AUTOMATIC_INIT
31+
bool "Automatically initialize the SDK when the system is booted"
32+
default y
33+
help
34+
By default, Memfault will automatically initialize the SDK
35+
when the system is booted. This can be disabled if the user
36+
wants to initialize the SDK manually.
2937
endmenu

ports/esp_idf/memfault/common/memfault_platform_core.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ static int prv_memfault_log_wrapper(const char *fmt, va_list args) {
147147
return vprintf(fmt, args);
148148
}
149149

150-
// register an initialization routine that will be run from do_global_ctors()
151-
static void __attribute__((constructor)) prv_memfault_boot(void) {
150+
void memfault_boot(void) {
152151
s_memfault_lock = xSemaphoreCreateRecursiveMutex();
153152

154153
// set up log collection so recent logs can be viewed in coredump
@@ -172,3 +171,10 @@ static void __attribute__((constructor)) prv_memfault_boot(void) {
172171
memfault_register_cli();
173172
#endif
174173
}
174+
175+
#if CONFIG_MEMFAULT_AUTOMATIC_INIT
176+
// register an initialization routine that will be run from do_global_ctors()
177+
static void __attribute__((constructor)) prv_memfault_boot(void) {
178+
memfault_boot();
179+
}
180+
#endif

0 commit comments

Comments
 (0)