Skip to content

Commit 4b61755

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 1.2.2 (Build 3403)
1 parent 9f19c8c commit 4b61755

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

CHANGES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Memfault Firmware SDK Changelog
2+
3+
## 1.2.2 - Sept 5, 2023
4+
5+
### :chart_with_upwards_trend: Improvements
6+
7+
- ESP-IDF:
8+
- Correct the heartbeat metrics key definition include configuration to
9+
generate a consistent key index across the application. This regressed in
10+
version 1.0.1 of the SDK.
11+
112
### Changes between Memfault SDK 1.2.0 and 1.2.1 - Sept 1, 2023
213

314
#### :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: 3382
2-
GIT COMMIT: b1e62a17a
1+
BUILD ID: 3403
2+
GIT COMMIT: 6563e08b6

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

2525
#ifdef __cplusplus
2626
}

ports/esp_idf/memfault/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,16 @@ if (CONFIG_MEMFAULT_FREERTOS_TASK_RUNTIME_STATS)
187187
endif()
188188

189189
component_compile_options(-DMEMFAULT_ESP_HTTP_CLIENT_ENABLE=$ENV{MEMFAULT_ESP_HTTP_CLIENT_ENABLE})
190-
component_compile_options(-DMEMFAULT_METRICS_USER_HEARTBEAT_DEFS_FILE="memfault_esp_metrics_heartbeat_config.def")
190+
# Set the heartbeat config file to use the ESP-IDF port file, which will bring
191+
# in the user's heartbeat config automatically. Set it as a global compiler
192+
# option so it properly affects both component compilation and when the metric
193+
# keys are used in the application.
194+
if (IDF_VERSION_MAJOR VERSION_EQUAL 3)
195+
# On pre-v4 of ESP-IDF, insert the compiler flag to the global CMAKE_C_FLAGS
196+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMEMFAULT_METRICS_USER_HEARTBEAT_DEFS_FILE=\\\"memfault_esp_metrics_heartbeat_config.def\\\"" CACHE STRING "Global C Flags" FORCE)
197+
else()
198+
idf_build_set_property(COMPILE_OPTIONS -DMEMFAULT_METRICS_USER_HEARTBEAT_DEFS_FILE="memfault_esp_metrics_heartbeat_config.def" APPEND)
199+
endif()
191200

192201
# We will intercept the panic handlers enabled by CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH
193202
# and run the Memfault Fault Handler instead.

scripts/mflt-build-id/src/mflt_build_id/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,16 @@ class BuildIdError(Exception):
235235

236236

237237
class BuildIdInspectorAndPatcher:
238-
def __init__(self, elf_file, elf=None):
239-
# type: (IO[bytes], Optional[ELFFile]) -> None
238+
def __init__(self, elf_file, elf=None, elf_helper=None):
239+
# type: (IO[bytes], Optional[ELFFile], Optional[ELFFileHelper]) -> None
240240
"""
241241
:param elf_file: file object with the ELF to inspect and/or patch
242242
:param elf: optional, already instantiated ELFFile
243+
:param elf_helper: optional, already instantiated ELFFileHelper
243244
"""
244245
self.elf_file = elf_file
245-
self.elf = elf or ELFFile(elf_file)
246-
self._helper = ELFFileHelper(self.elf)
246+
self.elf = (elf_helper.elf if elf_helper else elf) or ELFFile(elf_file)
247+
self._helper = elf_helper or ELFFileHelper(self.elf)
247248

248249
def _generate_build_id(self, sha1_symbol_section=None, sha1_symbol_section_offset=0):
249250
# type: (Optional[Section], int) -> hashlib._Hash

0 commit comments

Comments
 (0)