Skip to content

Commit be5c013

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 0.30.1 (Build 422861)
1 parent 7d3396b commit be5c013

File tree

11 files changed

+40
-11
lines changed

11 files changed

+40
-11
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ executors:
1616
memfault-ci:
1717
docker:
1818
# TODO: create separate docker image + public Dockerfile
19-
- image: memfault/ci:2.5.0
19+
- image: memfault/ci:3.2.0
2020
working_directory: ~/repo
2121

2222
commands:

CHANGES.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
### Changes between Memfault SDK 0.30.1 and SDK 0.30.0 - April 6, 2022
2+
3+
#### :chart_with_upwards_trend: Improvements
4+
5+
- Fix stack selection when in ISR context in some Zephyr versions
6+
- Fix a build error when building Zephyr with `CONFIG_NORDIC_SECURITY_BACKEND`
7+
enabled. New Kconfig flag `CONFIG_MEMFAULT_HTTP_USES_MBEDTLS` can be used to
8+
manually control this configuration if necessary (default should be set
9+
correctly in most cases)
10+
11+
#### :house: Internal
12+
13+
- Fix CI unit test build error from older version of gcc
14+
115
### Changes between Memfault SDK 0.30.0 and SDK 0.29.1 - Mar 31, 2022
216

317
#### :rocket: New Features

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
BUILD ID: 421632
2-
GIT COMMIT: 92115a2ee
1+
BUILD ID: 422861
2+
GIT COMMIT: a04fc3457

components/include/memfault/core/compact_log_compile_time_checks.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ extern "C" {
2727
#define MEMFAULT_LOGGING_MAX_SUPPORTED_ARGS 15
2828

2929

30-
static void _run_printf_like_func_check(const char* format, ...)
30+
static void run_printf_like_func_check_(const char* format, ...)
3131
MEMFAULT_PRINTF_LIKE_FUNC(1, 2);
3232

3333
//! Mark the function as used to prevent warnings in situations where this header is included but
3434
//! no logging is actually used
3535
MEMFAULT_USED
36-
static void _run_printf_like_func_check(MEMFAULT_UNUSED const char* format, ...) { }
36+
static void run_printf_like_func_check_(MEMFAULT_UNUSED const char* format, ...) { }
3737

3838
//! Compilation time checks on log formatter
3939
//!
@@ -48,7 +48,7 @@ static void _run_printf_like_func_check(MEMFAULT_UNUSED const char* format, ...)
4848
" args > MEMFAULT_LOGGING_MAX_SUPPORTED_ARGS (" \
4949
MEMFAULT_EXPAND_AND_QUOTE(MEMFAULT_LOGGING_MAX_SUPPORTED_ARGS) ")!"); \
5050
if (false) { \
51-
_run_printf_like_func_check(format, ## __VA_ARGS__); \
51+
run_printf_like_func_check_(format, ## __VA_ARGS__); \
5252
} \
5353
} while (0)
5454

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

2424
#ifdef __cplusplus
2525
}

examples/zephyr/apps/memfault_demo_app/prj.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ CONFIG_MBEDTLS_HEAP_SIZE=34000
5252
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=4096
5353
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
5454

55+
# Use MBEDTLS for Memfault HTTP sockets
56+
CONFIG_MEMFAULT_HTTP_USES_MBEDTLS=y
57+
5558
# Disable socket offload because attempts to use eswifi socket offload
5659
# hangs during setsockopt() calls
5760
CONFIG_NET_SOCKETS_OFFLOAD=n

ports/zephyr/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ config MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS
182182
The first check will run between [1, 1+MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS]
183183
Subsequent checks will run at MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS intervals.
184184

185+
config MEMFAULT_HTTP_USES_MBEDTLS
186+
bool "Use mbedTLS for HTTP transport"
187+
default y if !NET_SOCKETS_OFFLOAD_TLS
188+
help
189+
Configure Memfault HTTP for using mbedTLS- perform some sanity checks
190+
at compile time that it is configured correctly.
191+
185192
endif # MEMFAULT_HTTP_ENABLE
186193

187194
config MEMFAULT_EVENT_STORAGE_SIZE

ports/zephyr/common/memfault_platform_coredump_regions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ MEMFAULT_WEAK
4242
const sMfltCoredumpRegion *memfault_platform_coredump_get_regions(
4343
const sCoredumpCrashInfo *crash_info, size_t *num_regions) {
4444

45-
const bool msp_was_active = (crash_info->exception_reg_state->exc_return & (1 << 3)) == 0;
45+
const bool msp_was_active = (crash_info->exception_reg_state->exc_return & (1 << 2)) == 0;
4646
int region_idx = 0;
4747

4848
size_t stack_size_to_collect = memfault_platform_sanitize_address_range(

ports/zephyr/common/memfault_platform_http.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "memfault/http/utils.h"
2929
#include "memfault/panics/assert.h"
3030

31-
#if CONFIG_MBEDTLS
31+
#if defined(CONFIG_MEMFAULT_HTTP_USES_MBEDTLS)
3232

3333
// Sanity check that SNI extension is enabled when using Mbed TLS since as of 2.4 Zephyr doesn't
3434
// enable it by default
@@ -43,7 +43,7 @@
4343
#error "MBEDTLS_SSL_SERVER_NAME_INDICATION must be enabled for Memfault HTTPS. This can be done with CONFIG_MBEDTLS_USER_CONFIG_ENABLE/FILE"
4444
#endif
4545

46-
#endif /* CONFIG_MBEDTLS */
46+
#endif /* CONFIG_MEMFAULT_HTTP_USES_MBEDTLS */
4747

4848
#if (CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE > 0)
4949
static void *prv_calloc(size_t count, size_t size) {

ports/zephyr/v2.4/memfault_fault_handler.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ void __wrap_z_fatal_error(unsigned int reason, const z_arch_esf_t *esf) {
4646
const struct __extra_esf_info *extra_info = &esf->extra_info;
4747
const _callee_saved_t *callee_regs = extra_info->callee;
4848

49+
// Read the "SPSEL" bit where
50+
// 0 = Main Stack Pointer in use prior to exception
51+
// 1 = Process Stack Pointer in use prior to exception
4952
const uint32_t exc_return = extra_info->exc_return;
50-
const bool msp_was_active = (exc_return & (1 << 3)) == 0;
53+
const bool msp_was_active = (exc_return & (1 << 2)) == 0;
5154

5255
sMfltRegState reg = {
5356
.exception_frame = (void *)(msp_was_active ? extra_info->msp : callee_regs->psp),

0 commit comments

Comments
 (0)