Skip to content

Commit 5d66be4

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 0.39.0 (Build 1415)
1 parent 9caa5bf commit 5d66be4

File tree

8 files changed

+69
-18
lines changed

8 files changed

+69
-18
lines changed

CHANGES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
### Changes between Memfault SDK 0.39.0 and SDK 0.38.0 - Feb 3, 2023
2+
3+
#### :boom: Breaking Changes
4+
5+
- Breaking changes to the
6+
[`memfault_freertos_get_task_regions()`](ports/freertos/src/memfault_freertos_ram_regions.c)
7+
function, which can be used to capture FreeRTOS tasks when coredumps are sized
8+
smaller than all available RAM. The function will now, by default, capture a
9+
truncated copy of each FreeRTOS TCB, instead of the complete structure. This
10+
makes better use of coredump storage space; the TCB structures can be very
11+
large (>1kB), but Memfault only needs the first few fields for coredump
12+
decoding. The configuration flag `MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE` (see
13+
[`default_config.h`](components/include/memfault/default_config.h)) can be set
14+
to `0` in `memfault_platform_config.h` to return to the previous behavior.
15+
116
### Changes between Memfault SDK 0.38.0 and SDK 0.37.2 - Feb 1, 2023
217

318
#### :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: 1368
2-
GIT COMMIT: 4a9233626
1+
BUILD ID: 1415
2+
GIT COMMIT: cb7a3096e

components/include/memfault/components.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ extern "C" {
6161
#include "memfault/panics/coredump.h"
6262
#include "memfault/panics/fault_handling.h"
6363
#include "memfault/panics/platform/coredump.h"
64+
#include "memfault/util/banner.h"
6465
#include "memfault/util/base64.h"
6566
#include "memfault/util/cbor.h"
6667
#include "memfault/util/circular_buffer.h"

components/include/memfault/default_config.h

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -545,15 +545,23 @@ extern "C" {
545545
#define MEMFAULT_PLATFORM_COREDUMP_STORAGE_REGIONS_CUSTOM 0
546546
#endif
547547

548-
//! Override the size of TCB memory to collect set by the FreeRTOS port. Default
549-
//! behavior is to collect the entire TCB structure. This option is useful when using
550-
//! FreeRTOS and coredump space is limited. In certain configurations, such as using
551-
//! configUSE_NEWLIB_REENTRANT, FreeRTOS TCBs contain extra fields that are not required when
552-
//! decoding coredumps. Using this option can free up coredump space for other memory regions if
553-
//! needed. If `MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE` is set to 0, a default value for the TCB size
554-
//! is used. Please see ports/freertos/src/memfault_freertos_ram_regions.c for more info
548+
//! Set the capture size for FreeRTOS TCB structures in the coredump, when
549+
//! memfault_freertos_ram_regions.c is used.
550+
//!
551+
//! Set this to 0 to collect the entire TCB structure.
552+
//!
553+
//! The default value captures the required structure fields in each TCB used
554+
//! for RTOS Awareness by the Memfault backend, but truncates unused fields- for
555+
//! example, if FreeRTOS is configured with configUSE_NEWLIB_REENTRANT, the TCBs
556+
//! contain extra fields that are not needed for thread decode and take up space
557+
//! in the coredump.
558+
//!
559+
//! See more details here: https://docs.memfault.com/docs/mcu/rtos-analysis
560+
//!
561+
//! And see ports/freertos/src/memfault_freertos_ram_regions.c for information
562+
//! on the implementation
555563
#ifndef MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE
556-
#define MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE 0
564+
#define MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE 100
557565
#endif
558566

559567
#ifdef __cplusplus
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#pragma once
2+
3+
//! @file
4+
//!
5+
//! Copyright (c) Memfault, Inc.
6+
//! See License.txt for details
7+
//!
8+
//! Memfault splash screen banner.
9+
10+
#ifdef __cplusplus
11+
extern "C" {
12+
#endif
13+
14+
// clang-format off
15+
#define MEMFAULT_BANNER_(MEMFAULT_COLOR_START, MEMFAULT_COLOR_END) \
16+
"▙▗▌ ▗▀▖ ▜▐ " MEMFAULT_COLOR_START " ▄▄▀▀▄▄ " MEMFAULT_COLOR_END "\n" \
17+
"▌▘▌▞▀▖▛▚▀▖▐ ▝▀▖▌ ▌▐▜▀ " MEMFAULT_COLOR_START " █▄ ▄█" MEMFAULT_COLOR_END "\n" \
18+
"▌ ▌▛▀ ▌▐ ▌▜▀ ▞▀▌▌ ▌▐▐ ▖ " MEMFAULT_COLOR_START " ▄▀▀▄▄▀▀▄" MEMFAULT_COLOR_END "\n" \
19+
"▘ ▘▝▀▘▘▝ ▘▐ ▝▀▘▝▀▘ ▘▀ " MEMFAULT_COLOR_START " ▀▀▄▄▀▀ " MEMFAULT_COLOR_END "\n"
20+
// clang-format on
21+
22+
//! Memfault banner with colorized logo
23+
#define MEMFAULT_BANNER_COLORIZED MEMFAULT_BANNER_("\e[36m", "\e[0m")
24+
25+
//! Memfault banner with monochrome logo
26+
#define MEMFAULT_BANNER_MONOCHROME MEMFAULT_BANNER_("", "")
27+
28+
#ifdef __cplusplus
29+
}
30+
#endif

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

2424
#ifdef __cplusplus
2525
}

examples/esp32/apps/memfault_demo_app/main/console_example_main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,8 @@ void app_main() {
348348
*/
349349
const char *prompt = LOG_COLOR_I "esp32> " LOG_RESET_COLOR;
350350

351-
const char banner[] = "\n\n"
352-
"▙▗▌ ▗▀▖ ▜▐ \e[36m ▄▄▀▀▄▄ \e[0m\n"
353-
"▌▘▌▞▀▖▛▚▀▖▐ ▝▀▖▌ ▌▐▜▀ \e[36m █▄ ▄█\e[0m\n"
354-
"▌ ▌▛▀ ▌▐ ▌▜▀ ▞▀▌▌ ▌▐▐ ▖ \e[36m ▄▀▀▄▄▀▀▄\e[0m\n"
355-
"▘ ▘▝▀▘▘▝ ▘▐ ▝▀▘▝▀▘ ▘▀ \e[36m ▀▀▄▄▀▀ \e[0m\n";
351+
const char banner[] = "\n\n" MEMFAULT_BANNER_COLORIZED;
352+
356353
puts(banner);
357354

358355
/* Figure out if the terminal supports escape sequences */

ports/freertos/src/memfault_freertos_ram_regions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
#error "'#include "memfault/ports/freertos_trace.h"' must be added to FreeRTOSConfig.h"
8888
#endif
8989

90-
// If the MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE value is not already set, apply a default to
91-
// MEMFAULT_FREERTOS_TCB_SIZE here. This value can be overriden by setting
90+
// If the MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE value is set to 0, apply a default
91+
// to MEMFAULT_FREERTOS_TCB_SIZE here. This value can be overriden by setting
9292
// MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE in memfault_platform_config.h. See
9393
// include/memfault/default_config.h for more information.
9494
#if MEMFAULT_PLATFORM_FREERTOS_TCB_SIZE

0 commit comments

Comments
 (0)