Skip to content

Commit bdacc2d

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 0.30.5 (Build 447316)
1 parent 7660861 commit bdacc2d

File tree

17 files changed

+377
-13
lines changed

17 files changed

+377
-13
lines changed

CHANGES.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
### Changes between Memfault SDK 0.30.5 and SDK 0.30.4 - May 24, 2022
2+
3+
#### :rocket: New Features
4+
5+
- ESP-IDF: add Memfault Compact Log example integration to the
6+
[`examples/esp32`](examples/esp32) project
7+
8+
#### :chart_with_upwards_trend: Improvements
9+
10+
- ESP-IDF: Fix backtraces when using ESP-IDF v4.4+
11+
- nRF-Connect SDK: enable the Kconfig flag `MEMFAULT_NRF_CONNECT_SDK` by default
12+
when targeting the nrf52 + nrf53 series SOCs (previously only enabled by
13+
default for nrf91 series)
14+
15+
#### :house: Internal
16+
17+
Added clarifications around licensing in ports and examples folders. See
18+
[README](README.md) for more details.
19+
120
### Changes between Memfault SDK 0.30.4 and SDK 0.30.3 - May 4, 2022
221

322
#### :chart_with_upwards_trend: Improvements

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,10 @@ the top for build & test coverage status of the `master` branch.
162162
163163
- Don't hesitate to contact us for help! You can reach us through
164164
165+
166+
# License
167+
168+
Unless specifically indicated otherwise in a file, all memfault-firmware-sdk
169+
files are all licensed under the [Memfault License](/License.txt). (A few files
170+
in the [examples](/examples) and [ports](/ports) directory are licensed
171+
differently based on vendor requirements.)

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
BUILD ID: 438599
2-
GIT COMMIT: 3905e51c1
1+
BUILD ID: 447316
2+
GIT COMMIT: 77b7799c5

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

2424
#ifdef __cplusplus
2525
}

examples/esp32/apps/memfault_demo_app/CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,18 @@ project(${PROJECT_NAME})
1818
set(IDF_PROJECT_EXECUTABLE ${PROJECT_NAME}.elf)
1919
add_custom_command(TARGET ${IDF_PROJECT_EXECUTABLE}
2020
POST_BUILD
21-
COMMAND python ${memfault_firmare_sdk_dir}/scripts/fw_build_id.py ${IDF_PROJECT_EXECUTABLE})
21+
# Compute and insert the build id
22+
COMMAND python ${memfault_firmare_sdk_dir}/scripts/fw_build_id.py ${IDF_PROJECT_EXECUTABLE}
23+
# Save a copy of the ELF that includes the 'log_fmt' section
24+
COMMAND ${CMAKE_COMMAND} -E copy ${IDF_PROJECT_EXECUTABLE} ${IDF_PROJECT_EXECUTABLE}.memfault
25+
# Remove the 'log_fmt' compact log section, which confuses elf2image
26+
COMMAND ${CMAKE_OBJCOPY} --remove-section log_fmt ${IDF_PROJECT_EXECUTABLE}
27+
)
28+
29+
# Add a custom target to swap over the stashed complete elf above after
30+
# elf2image runs
31+
add_custom_target(swap_original_memfault_elf ALL
32+
COMMAND ${CMAKE_COMMAND} -E rename ${IDF_PROJECT_EXECUTABLE}.memfault ${IDF_PROJECT_EXECUTABLE}
33+
DEPENDS app
34+
COMMENT "Copy over original ELF for Memfault uploading"
35+
)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ void app_main() {
241241
register_wifi();
242242
register_app();
243243

244+
#if MEMFAULT_COMPACT_LOG_ENABLE
245+
MEMFAULT_COMPACT_LOG_SAVE(kMemfaultPlatformLogLevel_Info, "This is a compact log example");
246+
#endif
247+
244248
/* Prompt to be printed before each line.
245249
* This can be customized, made dynamic, etc.
246250
*/

examples/esp32/apps/memfault_demo_app/main/memfault_platform_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
//! Default configuration settings can be found in "memfault/config.h"
1010

1111
#define MEMFAULT_TASK_WATCHDOG_ENABLE 1
12+
#define MEMFAULT_COMPACT_LOG_ENABLE 1

examples/nrf-connect-sdk/nrf9160/memfault_demo_app/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ $ west build -b nrf9160dk_nrf9160_ns memfault_demo_app
2727
Note that you will need to use `nrf9160dk_nrf9160ns` instead on
2828
versions of NCS based on Zephyr 2.6 and earlier.
2929

30+
And on versions of NCS based on Zephyr 2.5 and earlier,
31+
`CONFIG_OPENOCD_SUPPORT=y` should be set, for example:
32+
33+
```bash
34+
# NCS v1.4.0, which uses Zephyr 2.5, requires this build command
35+
$ BOARD=nrf9160dk_nrf9160ns west build -b nrf9160dk_nrf9160ns memfault_demo_app -- -DCONFIG_OPENOCD_SUPPORT=y
36+
```
37+
3038
## Testing the Integration
3139

3240
Commands to test the integration are exposed under the `mflt` submenu in the CLI

ports/esp_idf/memfault/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,11 @@ component_compile_options(-DMEMFAULT_ESP_HTTP_CLIENT_ENABLE=$ENV{MEMFAULT_ESP_HT
8585
# Much more flexibility in debug information collected (e.g. all RAM, just the current stack trace, select stacks and variables)
8686
# Data can be posted directly from device to Memfault cloud for deduplication and analysis
8787
target_link_libraries(${this_component} INTERFACE "-Wl,--wrap=esp_core_dump_to_flash -Wl,--wrap=esp_core_dump_init -Wl,--wrap=esp_core_dump_image_get")
88+
89+
# Include a linker script fragment to support compact logs, when enabled
90+
get_filename_component(compact_log_linker_script ${MEMFAULT_ESP_IDF_PORT_COMMON}/memfault_compact_log.ld ABSOLUTE)
91+
target_link_libraries(
92+
${this_component}
93+
INTERFACE
94+
-T ${compact_log_linker_script}
95+
)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
Custom section to be included in the linker command file to support compact
3+
logs. Read more at https://mflt.io/compact-logs
4+
*/
5+
6+
SECTIONS
7+
{
8+
log_fmt 0xF0000000 (INFO) :
9+
{
10+
/*
11+
explicitly define this symbol. some versions of the xtensa toolchain
12+
(esp-2020r3-8.4.0 at least) incorrectly places it by default at 8 bytes
13+
into the log_fmt section, which causes decoding to fail.
14+
*/
15+
__start_log_fmt = ABSOLUTE(.);
16+
KEEP(*(*.log_fmt_hdr))
17+
KEEP(*(log_fmt))
18+
}
19+
}

0 commit comments

Comments
 (0)