Skip to content

Commit 06da39b

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 0.27.2 (Build 338784)
1 parent dde2145 commit 06da39b

File tree

18 files changed

+354
-16
lines changed

18 files changed

+354
-16
lines changed

CHANGES.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
### Changes between Memfault SDK 0.27.2 and SDK 0.27.1 - Nov 5, 2021
2+
3+
#### :chart_with_upwards_trend: Improvements
4+
5+
- The Mynewt integration now supports the Memfault demo shell via
6+
`mflt_shell_init()`, see the [Mynewt port README.md](ports/mynewt/README.md)
7+
for details. Huge thanks to @t3zeng for providing this implementation!
8+
- Add support for ESP-IDF v4.3.1. This update should fix the bootlooping issue
9+
seen when using the port with v4.3.1+ of ESP-IDF.
10+
- Add support for `LOG2` deferred mode on zephyr. This should fix bootloops when
11+
enabling `LOG2`.
12+
- Fix flipped args passed from `MEMFAULT_ASSERT_RECORD()` to
13+
`MEMFAULT_ASSERT_EXTRA_AND_REASON()` (regression in v0.23.0). This affected
14+
the `_extra` additional context value passed via this macro.
15+
- Fix a typo in
16+
[`ports/esp_idf/memfault/common/memfault_platform_http_client.c`](ports/esp_idf/memfault/common/memfault_platform_http_client.c)
17+
which caused the OTA example to always return "OTA Update Available" when the
18+
current version is already the latest.
19+
20+
#### :house: Internal
21+
22+
- Updated list of sample apps in (`examples/README.md`)[examples/README.md]
23+
124
### Changes between Memfault SDK 0.27.1 and SDK 0.27.0 - Oct 11, 2021
225

326
#### :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: 327008
2-
GIT COMMIT: 0b4bb4c57
1+
BUILD ID: 338784
2+
GIT COMMIT: a8d871a22

components/include/memfault/core/compiler_gcc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ extern "C" {
1717

1818
#define MEMFAULT_PACKED __attribute__((packed))
1919
#define MEMFAULT_PACKED_STRUCT struct MEMFAULT_PACKED
20+
//! MEMFAULT_NORETURN is only intended to be overridden in unit tests, if needed
21+
#if !defined(MEMFAULT_NORETURN)
2022
#define MEMFAULT_NORETURN __attribute__((noreturn))
23+
#endif
2124
#define MEMFAULT_NAKED_FUNC __attribute__((naked))
2225
#define MEMFAULT_UNREACHABLE __builtin_unreachable()
2326
#if defined(__clang__)

components/include/memfault/panics/assert.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extern "C" {
4242
} while (0)
4343

4444
#define MEMFAULT_ASSERT_RECORD(_extra) \
45-
MEMFAULT_ASSERT_EXTRA_AND_REASON(kMfltRebootReason_Assert, _extra)
45+
MEMFAULT_ASSERT_EXTRA_AND_REASON(_extra, kMfltRebootReason_Assert)
4646

4747
#define MEMFAULT_ASSERT_EXTRA(exp, _extra) \
4848
do { \

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 = 27, .patch = 1 }
22+
#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 27, .patch = 2 }
2323

2424
#ifdef __cplusplus
2525
}

examples/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Memfault SDK:
1212
(STM32F407G-DISC1)
1313
- WICED SDK / Cypress BCM943364WCD1
1414
- Zephyr / STMicroelectronics STM32L4 series (B-L475E-IOT01A Discovery kit)
15+
- Amazon FreeRTOS / Cypress PSoC 64 MCU (CY8CKIT-064S0S2-4343W)
16+
- Dialog DA145xx and DA1469x
17+
- Espressif ESP-IDF / ESP32 (ESP-WROVER-KIT)
18+
- nRF Connect SDK / Nordic nRF9160 (PCA10090)
1519

1620
## Using the Demo Application
1721

ports/esp_idf/memfault/common/memfault_platform_http_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static int prv_build_latest_release_url(char *buf, size_t buf_len) {
142142
sMemfaultDeviceInfo device_info;
143143
memfault_platform_get_device_info(&device_info);
144144
return snprintf(buf, buf_len,
145-
"%s://%s/api/v0/releases/latest/url?device_serial=%s&hardware_version=%s&software_type=%s&software_version=%s",
145+
"%s://%s/api/v0/releases/latest/url?device_serial=%s&hardware_version=%s&software_type=%s&current_version=%s",
146146
MEMFAULT_HTTP_GET_SCHEME(),
147147
MEMFAULT_HTTP_GET_DEVICE_API_HOST(),
148148
device_info.device_serial,

ports/esp_idf/memfault/common/memfault_platform_metrics.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ bool memfault_platform_metrics_timer_boot(uint32_t period_sec,
4242
.name = "mflt"
4343
};
4444

45+
// Ignore return value; this function should be safe to call multiple times
46+
// during system init, but needs to called before we create any timers.
47+
// See implementation here (may change by esp-idf version!):
48+
// https://github.com/espressif/esp-idf/blob/master/components/esp_timer/src/esp_timer.c#L431-L460
49+
(void)esp_timer_init();
50+
4551
esp_timer_handle_t periodic_timer;
4652
ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer));
4753

ports/mynewt/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,12 @@ And add the following **after** the `.text` in your targets linker script:
7070
KEEP(*(.note.gnu.build-id))
7171
} > FLASH
7272
```
73+
74+
## Enabling Memfault Demo Shell Commands
75+
76+
The Memfault demo shell commands can be included in the mynewt shell (useful for
77+
testing various Memfault features). To enable:
78+
79+
1. set `MEMFAULT_CLI: 1` in the target's `syscfg.yml`.
80+
2. enable the shell commands by calling `mflt_shell_init()` at the appropriate
81+
point in the application initialization (eg after `sysinit()`).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#pragma once
2+
3+
//! @file
4+
//!
5+
//! Copyright (c) Memfault, Inc.
6+
//! See License.txt for details
7+
8+
#ifdef __cplusplus
9+
extern "C" {
10+
#endif
11+
12+
int mflt_shell_init(void);
13+
14+
#ifdef __cplusplus
15+
}
16+
#endif

0 commit comments

Comments
 (0)