Skip to content

Commit c374e92

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 1.3.3 (Build 3838)
1 parent 9f1addb commit c374e92

33 files changed

+454
-131
lines changed

CHANGES.md

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,68 @@
11
# Memfault Firmware SDK Changelog
22

3+
## 1.3.3 - Oct 10, 2023
4+
5+
### :chart_with_upwards_trend: Improvements
6+
7+
- Zephyr:
8+
9+
- Add a new Kconfig flag, `CONFIG_MEMFAULT_FAULT_HANDLER_RETURN`, which will
10+
call the normal `z_fatal_error` handler at the end of Memfault fault
11+
processing instead of rebooting the system. This is useful when user code
12+
needs to run within `k_sys_fatal_error_handler()` just prior to system
13+
shutdown. Thanks to @JordanYates for the patch! Fixes
14+
[#59](https://github.com/memfault/memfault-firmware-sdk/issues/59).
15+
16+
- Add a timeout to the initial `send()` socket operation in
17+
`memfault_zephyr_port_http_upload_sdk_data()`, to abort the transfer if the
18+
socket is blocking for too long. That function will execute repeated
19+
`send()` calls to drain all the buffered Memfault data; this update only
20+
changes the initial call to check for a timeout, but otherwise will keep
21+
trying until the process completes, or a watchdog triggers. This is to
22+
balance the existing behavior, where a badly performing socket will still
23+
eventually push data through, but improves the case where the socket fails
24+
on the initial send (more common failure mode).
25+
26+
- Remove a nuisance build warning generated when configured with
27+
`CONFIG_LOG_PRINTK=y && CONFIG_LOG_MODE_DEFERRED=y`. This impacts the
28+
usability of exporting base64-encoded chunks on the shell for testing
29+
(`mflt export` command), but is otherwise harmless.
30+
31+
- ESP-IDF:
32+
33+
- Multiple changes to the
34+
[`examples/esp32`](examples/esp32/apps/memfault_demo_app) sample project:
35+
36+
- Disable WiFi SoftAP by setting `CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n`, since
37+
it's unused in the sample app. This saves about 40kB flash.
38+
- Permit setting the Memfault Project Key at runtime, with a new cli command
39+
`project_key`. The key is saved in Non-Volatile Storage on the ESP32
40+
board.
41+
42+
- General:
43+
44+
- Enable using compact logs with the IAR build tools, by adding the needed
45+
`__no_alloc` attribute to the compact log symbols, to have the IAR linker
46+
set the `NO_LOAD` attribute correctly on the compact log output section.
47+
48+
#### :boom: Breaking Changes
49+
50+
- ESP-IDF:
51+
52+
- The [ESP-IDF port](ports/esp_idf/) now implements a default
53+
`memfault_get_device_info()` function, which uses the device MAC address for
54+
the Memfault Device Serial. When updating the Memfault SDK in an existing
55+
project, this implementation will cause a **linker error** due to duplicate
56+
definition. To disable the built-in definition, set
57+
`CONFIG_MEMFAULT_DEFAULT_GET_DEVICE_INFO=n`.
58+
359
## 1.3.2 - Sept 26, 2023
460

561
### :chart_with_upwards_trend: Improvements
662

763
- Zephyr:
864

9-
- use `<cmsis_core.h>` instead of `<nmi.h>`. Thanks @kmeihar for this change!
65+
- use `<cmsis_core.h>` instead of `<nmi.h>`. Thanks @kmeinhar for this change!
1066
(see [#64](https://github.com/memfault/memfault-firmware-sdk/pull/64))
1167

1268
- nRF Connect SDK:
@@ -21,8 +77,8 @@
2177
- Add support for Memfault Compact Logs for C++ source files (previously only
2278
supported in C source files). Compact logging can be enabled by setting
2379
`MEMFAULT_LOG_COMPACT_ENABLE=1` in `memfault_platform_config.h`. See
24-
[the docs](https://docs.memfault.com/docs/mcu/debugging/compact-logs) for
25-
more details.
80+
[the docs](https://docs.memfault.com/docs/mcu/compact-logs/) for more
81+
details.
2682
- Fix a missing include of `<intrinsics.h>` required by the IAR compiler
2783

2884
## 1.3.1 - Sept 21, 2023

VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
BUILD ID: 3642
2-
GIT COMMIT: 5eb9f7b6a
3-
VERSION: 1.3.2
1+
BUILD ID: 3838
2+
GIT COMMIT: 86077d06f
3+
VERSION: 1.3.3

components/core/src/memfault_compact_log_serializer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ extern uint32_t __start_log_fmt;
2424
//! Note: We don't read this in the firmware but it is used during the decode
2525
//! process to sanity check the section is being laid out as we would expect.
2626
MEMFAULT_PUT_IN_SECTION(".log_fmt_hdr")
27+
MEMFAULT_NO_ALLOC
2728
const sMemfaultLogFmtElfSectionHeader g_memfault_log_fmt_elf_section_hdr = {
2829
.magic = 0x66474f4c, /* LOGf */
2930
.version = 1,

components/include/memfault/core/compact_log_helpers.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ extern "C" {
195195
//! The metadata we track in the ELF for each compact log in the code.
196196
//! This is used to recover the original information
197197
#define MEMFAULT_LOG_FMT_ELF_SECTION_ENTRY(format, ...) \
198-
MEMFAULT_LOG_FMT_ELF_SECTION static const char _memfault_log_fmt_ptr[] = \
198+
MEMFAULT_LOG_FMT_ELF_SECTION \
199+
MEMFAULT_NO_ALLOC \
200+
static const char _memfault_log_fmt_ptr[] = \
199201
MEMFAULT_EXPAND_AND_QUOTE(MEMFAULT_ARG_COUNT_UP_TO_32(__VA_ARGS__))";" \
200202
__FILE__ ";" MEMFAULT_EXPAND_AND_QUOTE(__LINE__) ";" format
201203

components/include/memfault/core/compiler_armcc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ extern "C" {
2727
#define MEMFAULT_WEAK __attribute__((weak))
2828
#define MEMFAULT_PRINTF_LIKE_FUNC(a, b)
2929
#define MEMFAULT_CLZ(a) __clz(a)
30+
//! Non-loaded symbols are specified by linker section, not compiler attribute
31+
#define MEMFAULT_NO_ALLOC
3032

3133

3234
#define MEMFAULT_GET_LR(_a) _a = ((void *)__return_address())

components/include/memfault/core/compiler_gcc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ extern "C" {
4444
//! If x is 0, the result is undefined.
4545
#define MEMFAULT_CLZ(a) ((a == 0) ? 32UL : (uint32_t)__builtin_clz(a))
4646

47+
//! Non-loaded symbols are specified by linker section, not compiler attribute
48+
#define MEMFAULT_NO_ALLOC
49+
4750
#if defined(__arm__)
4851
# define MEMFAULT_GET_LR(_a) _a = __builtin_return_address(0)
4952
# define MEMFAULT_GET_PC(_a) __asm volatile ("mov %0, pc" : "=r" (_a))

components/include/memfault/core/compiler_iar.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ extern "C" {
2929
#define MEMFAULT_WEAK __weak
3030
#define MEMFAULT_PRINTF_LIKE_FUNC(a, b)
3131
#define MEMFAULT_CLZ(a) __iar_builtin_CLZ(a)
32+
#define MEMFAULT_NO_ALLOC __no_alloc
3233

3334

3435
#define MEMFAULT_GET_LR(_a) __asm volatile ("mov %0, lr" : "=r" (_a))

components/include/memfault/core/compiler_ti_arm.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ extern "C" {
3434

3535
#define MEMFAULT_CLZ(a) ((a == 0) ? 32UL : (uint32_t)__clz(a))
3636

37+
//! Non-loaded symbols are specified by linker section, not compiler attribute
38+
#define MEMFAULT_NO_ALLOC
39+
3740
// Compiler incorrectly thinks return value is missing for pure asm function
3841
// disable the check for them
3942
#pragma diag_push

components/include/memfault/default_config.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,12 @@ extern "C" {
396396
#define MEMFAULT_PLATFORM_FAULT_HANDLER_CUSTOM 0
397397
#endif
398398

399+
// If enabled, memfault_fault_handler will return back to OS
400+
// exception handling code instead of rebooting the device.
401+
#ifndef MEMFAULT_FAULT_HANDLER_RETURN
402+
#define MEMFAULT_FAULT_HANDLER_RETURN 0
403+
#endif
404+
399405
//
400406
// Http Configuration Options
401407
//

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 = 3, .patch = 2 }
23-
#define MEMFAULT_SDK_VERSION_STR "1.3.2"
22+
#define MEMFAULT_SDK_VERSION { .major = 1, .minor = 3, .patch = 3 }
23+
#define MEMFAULT_SDK_VERSION_STR "1.3.3"
2424

2525
#ifdef __cplusplus
2626
}

0 commit comments

Comments
 (0)