Skip to content

Commit 0fbb820

Browse files
author
Memfault Inc.
committed
Memfault Firmware SDK 1.11.4 (Build local)
1 parent 57cf611 commit 0fbb820

File tree

8 files changed

+50
-21
lines changed

8 files changed

+50
-21
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [1.11.4] - 2024-09-10
10+
11+
### :chart_with_upwards_trend: Improvements
12+
13+
- ESP-IDF:
14+
15+
- Fix a minor issue where `MEMFAULT_LOG_x()` macros (`MEMFAULT_LOG_ERROR()`
16+
etc ) would be recorded twice in the log buffer.
17+
18+
- General:
19+
20+
- Fix an error in the unit test CI build due to the addition of the
21+
`-Wc11-c2x-compat` compiler warning flag. This flag is not valid for the C++
22+
compiler, and has been changed to be enabled only for the C compiler.
23+
24+
- nRF-Connect SDK:
25+
26+
- Fix a possible stack overflow when tracking the Memfault Connectivity
27+
Connected Time Vital for the nRF9160 LTE connection, due to a change in the
28+
nRF-Connect SDK v2.7.0 from prior versions.
29+
930
## [1.11.3] - 2024-09-05
1031

1132
### :chart_with_upwards_trend: Improvements

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
BUILD ID: local
2-
GIT COMMIT: c29972dd3ef
3-
VERSION: 1.11.3
2+
GIT COMMIT: a3e5d59615c
3+
VERSION: 1.11.4

components/demo/src/memfault_demo_cli_log.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ int memfault_demo_cli_cmd_test_log(MEMFAULT_UNUSED int argc, MEMFAULT_UNUSED cha
2020
MEMFAULT_LOG_WARN("Warning log!");
2121
MEMFAULT_LOG_ERROR("Error log!");
2222

23-
#if MEMFAULT_SDK_LOG_SAVE_DISABLE
23+
// ESP-IDF will still save logs when MEMFAULT_SDK_LOG_SAVE_DISABLE is set
24+
#if MEMFAULT_SDK_LOG_SAVE_DISABLE && !defined(ESP_PLATFORM)
2425
// MEMFAULT_LOGs are not written to the ram backed log buffer so do
25-
// it explicitly
26+
// it explicitly for testing purposes
2627
MEMFAULT_LOG_SAVE(kMemfaultPlatformLogLevel_Debug, "Debug log!");
2728
MEMFAULT_LOG_SAVE(kMemfaultPlatformLogLevel_Info, "Info log!");
2829
MEMFAULT_LOG_SAVE(kMemfaultPlatformLogLevel_Warning, "Warning log!");

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 = 11, .patch = 3 }
23-
#define MEMFAULT_SDK_VERSION_STR "1.11.3"
22+
#define MEMFAULT_SDK_VERSION { .major = 1, .minor = 11, .patch = 4 }
23+
#define MEMFAULT_SDK_VERSION_STR "1.11.4"
2424

2525
#ifdef __cplusplus
2626
}

ports/esp_idf/memfault/config/memfault_esp_idf_port_config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ extern "C" {
5959
#define MEMFAULT_COMPACT_LOG_ENABLE 1
6060
#endif
6161

62+
// Memfault SDK logs are routed to ESP-IDF logging, which are saved by Memfault,
63+
// so it's redundant to save them in the Memfault SDK as well.
64+
#define MEMFAULT_SDK_LOG_SAVE_DISABLE 1
65+
6266
// Pick up any user configuration overrides. This should be kept at the bottom
6367
// of this file
6468
#if CONFIG_MEMFAULT_USER_CONFIG_SILENT_FAIL

ports/zephyr/ncs/src/memfault_platform_metrics_connectivity_lte.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
#if defined(CONFIG_MEMFAULT_NRF_CONNECTIVITY_CONNECTED_TIME_NRF91X)
2525
//! Handler for LTE events
2626
static void prv_memfault_lte_event_handler(const struct lte_lc_evt *const evt) {
27-
enum lte_lc_func_mode mode;
28-
lte_lc_func_mode_get(&mode);
29-
MEMFAULT_LOG_DEBUG("LTE mode: %d", mode);
30-
3127
switch (evt->type) {
3228
case LTE_LC_EVT_NW_REG_STATUS:
3329
switch (evt->nw_reg_status) {
@@ -47,12 +43,9 @@ static void prv_memfault_lte_event_handler(const struct lte_lc_evt *const evt) {
4743
case LTE_LC_NW_REG_UNKNOWN:
4844
// intentional fallthrough
4945
case LTE_LC_NW_REG_UICC_FAIL:
50-
// only mark as disconnected if modem is supposed to be connected
51-
if (mode == LTE_LC_FUNC_MODE_NORMAL || mode == LTE_LC_FUNC_MODE_ACTIVATE_LTE) {
52-
MEMFAULT_LOG_DEBUG("Connected state: connection lost");
53-
memfault_metrics_connectivity_connected_state_change(
54-
kMemfaultMetricsConnectivityState_ConnectionLost);
55-
}
46+
MEMFAULT_LOG_DEBUG("Connected state: connection lost");
47+
memfault_metrics_connectivity_connected_state_change(
48+
kMemfaultMetricsConnectivityState_ConnectionLost);
5649
break;
5750
default:
5851
break;

scripts/create_arduino_library.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def download_memfault_library(working_dir: str, tag: str):
5656

5757
def extract_memfault_library(working_dir: str, release_artifact_filepath: str):
5858
logging.debug("Extracting %s", release_artifact_filepath)
59-
download = tarfile.open(release_artifact_filepath)
59+
download = tarfile.open(release_artifact_filepath) # noqa: SIM115
6060
download.extractall(working_dir) # noqa: S202
6161
root_folder_name = download.getnames()[0]
6262
download.close()

tests/MakefileWorkerOverrides.mk

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ CPPUTEST_WARNINGFLAGS = \
5454
-Wshadow \
5555
-Wswitch-default
5656

57+
# Default from MakefileWorker.mk if none defined
58+
CPPUTEST_C_WARNINGFLAGS = \
59+
-Wstrict-prototypes
60+
5761
CPPUTEST_CFLAGS += \
5862
-Wbad-function-cast
5963

@@ -67,7 +71,7 @@ CPPUTEST_WARNINGFLAGS += \
6771
CC_VERSION_OUTPUT ="$(shell $(CXX) -v 2>&1)"
6872
CLANG_STR = clang
6973
ifeq ($(findstring $(CLANG_STR),$(CC_VERSION_OUTPUT)),$(CLANG_STR))
70-
# Clang-only warning flags
74+
# Clang-only C/C++ warning flags
7175
COMPILER_SPECIFIC_WARNINGS += \
7276
-Wno-bad-function-cast \
7377
-Wno-c++11-extensions \
@@ -96,15 +100,19 @@ COMPILER_SPECIFIC_WARNINGS += \
96100
-Wno-zero-length-array \
97101
-Wno-unsafe-buffer-usage \
98102
-Wno-cast-function-type-strict \
99-
-Wc23-extensions \
103+
104+
# Clang-only C-only warning flags
105+
COMPILER_SPECIFIC_C_WARNINGS += -Wc23-extensions
100106

101107
else
102-
# GCC-only warnings
108+
# GCC-only C/C++ warnings
103109
COMPILER_SPECIFIC_WARNINGS += \
104110
-Wformat-signedness \
105111
-fno-extended-identifiers \
106112
-Wbidi-chars \
107-
-Wc11-c2x-compat \
113+
114+
# GCC-only C-only warnings
115+
COMPILER_SPECIFIC_C_WARNINGS += -Wc11-c2x-compat
108116

109117
# Only enable -fanalyzer if GCC version is >= 12
110118
GCC_VERSION_GTEQ_12 := $(shell expr $$($(CC) -dumpversion | cut -f1 -d.) \>= 12)
@@ -141,8 +149,10 @@ CPPUTEST_LDFLAGS += \
141149
endif
142150

143151
CPPUTEST_WARNINGFLAGS += $(COMPILER_SPECIFIC_WARNINGS)
152+
CPPUTEST_C_WARNINGFLAGS += $(COMPILER_SPECIFIC_C_WARNINGS)
144153

145154
export CPPUTEST_WARNINGFLAGS
155+
export CPPUTEST_C_WARNINGFLAGS
146156

147157
export CPPUTEST_LDFLAGS
148158

0 commit comments

Comments
 (0)