Skip to content

Commit aca17f2

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 1.2.3 (Build 3471)
1 parent 4b61755 commit aca17f2

File tree

7 files changed

+25
-17
lines changed

7 files changed

+25
-17
lines changed

CHANGES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Memfault Firmware SDK Changelog
22

3+
## 1.2.3 - Sept 12, 2023
4+
5+
- General:
6+
- Include the current MCU SDK version in the http client user agent header
7+
- Zephyr:
8+
- Update include paths for CMSIS headers for upcoming Zephyr support. Thanks
9+
@gmarull for the patch!
10+
- Modus Toolbox:
11+
- Allow a user application to override
12+
`memfault_metrics_heartbeat_collect_data`.
13+
314
## 1.2.2 - Sept 5, 2023
415

516
### :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: 3403
2-
GIT COMMIT: 6563e08b6
1+
BUILD ID: 3471
2+
GIT COMMIT: 3ebeeaa65

components/http/src/memfault_http_utils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "memfault/core/math.h"
2020
#include "memfault/core/platform/device_info.h"
2121
#include "memfault/http/http_client.h"
22+
#include "memfault/version.h"
2223

2324
//! Default buffer size for the URL-encoded device info parameters. This may
2425
//! need to be set higher by the user if there are particularly long device info
@@ -60,7 +61,7 @@ static bool prv_write_host_hdr(MfltHttpClientSendCb write_callback, void *ctx,
6061
}
6162

6263
static bool prv_write_user_agent_hdr(MfltHttpClientSendCb write_callback, void *ctx) {
63-
#define USER_AGENT_HDR "User-Agent:MemfaultSDK/0.4.2\r\n"
64+
#define USER_AGENT_HDR "User-Agent:MemfaultSDK/" MEMFAULT_SDK_VERSION_STR "\r\n"
6465
const size_t user_agent_hdr_len = MEMFAULT_STATIC_STRLEN(USER_AGENT_HDR);
6566
return write_callback(USER_AGENT_HDR, user_agent_hdr_len, ctx);
6667
}

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

2525
#ifdef __cplusplus
2626
}

ports/cypress/psoc6/memfault_platform_core.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
static cy_wcm_wlan_statistics_t s_last_wlan_statistics = { 0 };
3434
#endif
3535

36-
void memfault_metrics_heartbeat_port_collect_data(void) {
36+
void memfault_metrics_heartbeat_collect_sdk_data(void) {
3737
#if MEMFAULT_PORT_MEMORY_TRACKING_ENABLED
3838
#if defined(__GNUC__) && !defined(__ARMCC_VERSION)
3939

@@ -81,7 +81,6 @@ void memfault_metrics_heartbeat_port_collect_data(void) {
8181
#endif /* MEMFAULT_PORT_WIFI_TRACKING_ENABLED */
8282
}
8383

84-
8584
#if MEMFAULT_PORT_WIFI_TRACKING_ENABLED
8685

8786
static void prv_wcm_event_cb(cy_wcm_event_t event, cy_wcm_event_data_t *event_data) {
@@ -135,11 +134,6 @@ void memfault_wcm_metrics_boot(void) {
135134

136135
#endif /* MEMFAULT_PORT_WIFI_TRACKING_ENABLED */
137136

138-
void memfault_metrics_heartbeat_collect_data(void) {
139-
memfault_metrics_heartbeat_port_collect_data();
140-
}
141-
142-
143137
MEMFAULT_WEAK
144138
void memfault_platform_reboot(void) {
145139
NVIC_SystemReset();

ports/zephyr/common/memfault_platform_coredump_regions.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
#include "memfault/panics/platform/coredump.h"
1616
#include "memfault/ports/zephyr/version.h"
1717

18-
#if MEMFAULT_ZEPHYR_VERSION_GT(2, 1)
18+
#if MEMFAULT_ZEPHYR_VERSION_GT(3, 4)
19+
#include <cmsis_core.h>
20+
#elif MEMFAULT_ZEPHYR_VERSION_GT(2, 1)
1921
#include MEMFAULT_ZEPHYR_INCLUDE(arch/arm/aarch32/cortex_m/cmsis.h)
2022
#else
2123
#include MEMFAULT_ZEPHYR_INCLUDE(arch/arm/cortex_m/cmsis.h)

tests/src/test_memfault_http_utils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ TEST(MfltHttpClientUtils, Test_MfltHttpClientPost) {
9797
const char *expected_string =
9898
"POST /api/v0/chunks/DEMOSERIAL HTTP/1.1\r\n"
9999
"Host:chunks.memfault.com\r\n"
100-
"User-Agent:MemfaultSDK/0.4.2\r\n"
100+
"User-Agent:MemfaultSDK/0.0.0\r\n"
101101
"Memfault-Project-Key:00112233445566778899aabbccddeeff\r\n"
102102
"Content-Type:application/octet-stream\r\n"
103103
"Content-Length:123\r\n\r\n";
@@ -129,7 +129,7 @@ TEST(MfltHttpClientUtils, Test_MfltHttpClientGetOtaPayloadUrl) {
129129
const char *expected_string =
130130
"GET /api/v0/releases/latest/url?&device_serial=DEMOSERIAL&hardware_version=main-proto&software_type=main&current_version=1.0.0 HTTP/1.1\r\n"
131131
"Host:device.memfault.com\r\n"
132-
"User-Agent:MemfaultSDK/0.4.2\r\n"
132+
"User-Agent:MemfaultSDK/0.0.0\r\n"
133133
"Memfault-Project-Key:00112233445566778899aabbccddeeff\r\n"
134134
"\r\n";
135135

@@ -172,7 +172,7 @@ TEST(MfltHttpClientUtils, Test_MfltHttpClientGetOtaPayload) {
172172
const char *expected_string =
173173
"GET /path/to/ota/payload/yay HTTP/1.1\r\n"
174174
"Host:example.ota.payload.com\r\n"
175-
"User-Agent:MemfaultSDK/0.4.2\r\n"
175+
"User-Agent:MemfaultSDK/0.0.0\r\n"
176176
"\r\n";
177177

178178
STRCMP_EQUAL(expected_string, ctx.buf);
@@ -190,7 +190,7 @@ TEST(MfltHttpClientUtils, Test_MfltHttpClientGetOtaPayloadNoPath) {
190190
const char *expected_string =
191191
"GET / HTTP/1.1\r\n"
192192
"Host:example.ota.payload.com\r\n"
193-
"User-Agent:MemfaultSDK/0.4.2\r\n"
193+
"User-Agent:MemfaultSDK/0.0.0\r\n"
194194
"\r\n";
195195

196196
STRCMP_EQUAL(expected_string, ctx.buf);

0 commit comments

Comments
 (0)