Skip to content

Commit efd97b9

Browse files
author
Memfault Inc
committed
Memfault Firmware SDK 0.43.3 (Build 2200)
1 parent 6400d71 commit efd97b9

File tree

22 files changed

+184
-169
lines changed

22 files changed

+184
-169
lines changed

CHANGES.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
### Changes between Memfault SDK 0.43.3 and 0.43.2 - May 22, 2023
2+
3+
#### :chart_with_upwards_trend: Improvements
4+
5+
- Zephyr:
6+
7+
- Add more granular Kconfig settings to control what's collected in
8+
[`memfault_zephyr_coredump_get_regions()`](ports/zephyr/common/memfault_platform_coredump_regions.c).
9+
Default settings are identical to before this change.
10+
11+
- `CONFIG_MEMFAULT_COREDUMP_COLLECT_STACK_REGIONS`
12+
- `CONFIG_MEMFAULT_COREDUMP_COLLECT_KERNEL_REGION`
13+
- `CONFIG_MEMFAULT_COREDUMP_COLLECT_TASKS_REGIONS`
14+
15+
- Fix a build error when an application is configured without
16+
`CONFIG_HEAP_MEM_POOL_SIZE=y` (i.e. no `kmalloc` in use).
17+
18+
- Fix a build error when building the
19+
[nRF9160 example](examples/nrf-connect-sdk/nrf9160) on nRF-Connect SDK v2.3.0.
20+
21+
- ESP-IDF:
22+
23+
- Add support for upcoming v5.1 release of the ESP-IDF SDK
24+
- Add support in the [ESP32 example app](examples/esp32) for the ESP32-C6 chip
25+
126
### Changes between Memfault SDK 0.43.2 and 0.43.1 - May 3, 2023
227

328
#### :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: 2071
2-
GIT COMMIT: b1c0f7c97
1+
BUILD ID: 2200
2+
GIT COMMIT: dd058e1ee

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

2424
#ifdef __cplusplus
2525
}

examples/esp32/apps/memfault_demo_app/main/Kconfig.projbuild

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ config MEMFAULT_APP_WIFI_AUTOJOIN
3333

3434
choice BLINK_LED
3535
prompt "Blink LED type"
36-
default BLINK_LED_GPIO if IDF_TARGET_ESP32
36+
default BLINK_LED_GPIO if IDF_TARGET_ESP32 || !SOC_RMT_SUPPORTED
3737
default BLINK_LED_RMT
3838
help
3939
Defines the default peripheral for blink example
@@ -50,6 +50,7 @@ config BLINK_LED_RMT_CHANNEL
5050
range 0 7
5151
default 0
5252
help
53+
Note: this is only used if ESP-IDF version is < 5.0. See led.c.
5354
Set the RMT peripheral channel.
5455
ESP32 RMT channel from 0 to 7
5556
ESP32-S2 RMT channel from 0 to 3
@@ -59,16 +60,16 @@ config BLINK_LED_RMT_CHANNEL
5960
config BLINK_GPIO
6061
int "Blink GPIO number"
6162
range 0 48
62-
default 8 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32H2
63+
default 5 if IDF_TARGET_ESP32
6364
default 18 if IDF_TARGET_ESP32S2
6465
default 48 if IDF_TARGET_ESP32S3
65-
default 5
66+
default 8
6667
help
6768
GPIO number (IOxx) to blink on and off or the RMT signal for the addressable LED.
6869
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink.
6970

7071
# esp32c3 specific settings
71-
if IDF_TARGET_ESP32C3
72+
if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6
7273
# Default optimize for size due to increase in binary size
7374
# This can be changed in root -> Compiler Options
7475
# The choice and prompt lines are required and must match the esp-idf definition

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

Lines changed: 0 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "freertos/FreeRTOS.h"
2222
#include "freertos/task.h"
2323
#include "sdkconfig.h"
24-
#include "soc/rtc_cntl_reg.h"
2524

2625
#ifdef CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS
2726
#define WITH_TASKS_INFO 1
@@ -30,7 +29,6 @@
3029
static void register_free();
3130
static void register_heap_dump();
3231
static void register_restart();
33-
static void register_make();
3432
#if WITH_TASKS_INFO
3533
static void register_tasks();
3634
#endif
@@ -39,7 +37,6 @@ void register_system() {
3937
register_free();
4038
register_heap_dump();
4139
register_restart();
42-
register_make();
4340
#if WITH_TASKS_INFO
4441
register_tasks();
4542
#endif
@@ -122,105 +119,3 @@ static void register_tasks() {
122119
}
123120

124121
#endif // WITH_TASKS_INFO
125-
126-
/** This command helps maintain sanity when testing console example from a console */
127-
128-
static int make(int argc, char** argv) {
129-
int count = REG_READ(RTC_CNTL_STORE0_REG);
130-
if (++count >= 3) {
131-
printf("This is not the console you are looking for.\n");
132-
return 0;
133-
}
134-
REG_WRITE(RTC_CNTL_STORE0_REG, count);
135-
136-
const char* make_output =
137-
R"(LD build/console.elf
138-
esptool.py v2.1-beta1
139-
)";
140-
141-
const char* flash_output[] = {
142-
R"(Flashing binaries to serial port (*) (app at offset 0x10000)...
143-
esptool.py v2.1-beta1
144-
Connecting....
145-
)",
146-
R"(Chip is ESP32D0WDQ6 (revision 0)
147-
Uploading stub...
148-
Running stub...
149-
Stub running...
150-
Changing baud rate to 921600
151-
Changed.
152-
Configuring flash size...
153-
Auto-detected Flash size: 4MB
154-
Flash params set to 0x0220
155-
Compressed 15712 bytes to 9345...
156-
)",
157-
R"(Wrote 15712 bytes (9345 compressed) at 0x00001000 in 0.1 seconds (effective 1126.9 kbit/s)...
158-
Hash of data verified.
159-
Compressed 333776 bytes to 197830...
160-
)",
161-
R"(Wrote 333776 bytes (197830 compressed) at 0x00010000 in 3.3 seconds (effective 810.3 kbit/s)...
162-
Hash of data verified.
163-
Compressed 3072 bytes to 82...
164-
)",
165-
R"(Wrote 3072 bytes (82 compressed) at 0x00008000 in 0.0 seconds (effective 1588.4 kbit/s)...
166-
Hash of data verified.
167-
Leaving...
168-
Hard resetting...
169-
)"};
170-
171-
const char* monitor_output =
172-
R"(MONITOR
173-
)" LOG_COLOR_W R"(--- idf_monitor on (*) 115200 ---
174-
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --
175-
)" LOG_RESET_COLOR;
176-
177-
bool need_make = false;
178-
bool need_flash = false;
179-
bool need_monitor = false;
180-
for (int i = 1; i < argc; ++i) {
181-
if (strcmp(argv[i], "all") == 0) {
182-
need_make = true;
183-
} else if (strcmp(argv[i], "flash") == 0) {
184-
need_make = true;
185-
need_flash = true;
186-
} else if (strcmp(argv[i], "monitor") == 0) {
187-
need_monitor = true;
188-
} else if (argv[i][0] == '-') {
189-
/* probably -j option */
190-
} else if (isdigit((int)argv[i][0])) {
191-
/* might be an argument to -j */
192-
} else {
193-
printf("make: *** No rule to make target `%s'. Stop.\n", argv[i]);
194-
/* Technically this is an error, but let's not spoil the output */
195-
return 0;
196-
}
197-
}
198-
if (argc == 1) {
199-
need_make = true;
200-
}
201-
if (need_make) {
202-
printf("%s", make_output);
203-
}
204-
if (need_flash) {
205-
size_t n_items = sizeof(flash_output) / sizeof(flash_output[0]);
206-
for (int i = 0; i < n_items; ++i) {
207-
printf("%s", flash_output[i]);
208-
vTaskDelay(200 / portTICK_PERIOD_MS);
209-
}
210-
}
211-
if (need_monitor) {
212-
printf("%s", monitor_output);
213-
esp_restart();
214-
}
215-
return 0;
216-
}
217-
218-
static void register_make() {
219-
const esp_console_cmd_t cmd = {
220-
.command = "make",
221-
.help = NULL, /* hide from 'help' output */
222-
.hint = "all | flash | monitor",
223-
.func = &make,
224-
};
225-
ESP_ERROR_CHECK(esp_console_cmd_register(&cmd));
226-
}

examples/esp32/apps/memfault_demo_app/main/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ dependencies:
99
version: "^2.0.0"
1010
rules: # will add dependency only when all if clauses are True
1111
- if: "idf_version >=5.0" # supports all SimpleSpec grammars (https://python-semanticversion.readthedocs.io/en/latest/reference.html#semantic_version.SimpleSpec)
12-
- if: "target in [esp32s2, esp32s3, esp32c3]" # supports boolean operator ==, !=, in, not in.
12+
- if: "target not in [esp32]" # supports boolean operator ==, !=, in, not in.

examples/nrf-connect-sdk/nrf9160/memfault_demo_app/CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@ else() # nRF Connect SDK Version >= 1.8.0
9292
# in v1.8+, use the modem_info library to get the IMEI for device_serial
9393
set(CONFIG_MODEM_INFO y CACHE INTERNAL "")
9494

95-
# Use SPM instead of TFM for Secure Firmware as TFM does not (yet) support forwarding of fault handlers
96-
set(CONFIG_BUILD_WITH_TFM n CACHE INTERNAL "")
97-
# Explicitly set SPM=y because as of nRF Connect >= 2.1.0 it is marked as deprecated and no longer enabled by default
98-
set(CONFIG_SPM y CACHE INTERNAL "")
95+
# pre-2.3.0, SPM (Secure Partition Manager) can be used instead of the default
96+
# TFM, and results in nicer backtraces in certain cases, so select it here.
97+
if (${NCS_VERSION_MAJOR}.${NCS_VERSION_MINOR}.${NCS_VERSION_PATCH} VERSION_LESS 2.2.99)
98+
# Use SPM instead of TFM for Secure Firmware as TFM does not (yet) support forwarding of fault handlers
99+
set(CONFIG_BUILD_WITH_TFM n CACHE INTERNAL "")
100+
# Explicitly set SPM=y because as of nRF Connect >= 2.1.0 it is marked as deprecated and no longer enabled by default
101+
set(CONFIG_SPM y CACHE INTERNAL "")
102+
endif()
99103
endif()
100104

101105
# Required for app to compile against nRF Connect SDK <= v1.2

examples/nrf-connect-sdk/nrf9160/memfault_demo_app/west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ manifest:
22
projects:
33
- name: nrf
44
url: https://github.com/nrfconnect/sdk-nrf
5-
revision: v2.0.2
5+
revision: v2.2.0
66
import: true
77
import:
88
path-blocklist: modules/lib/memfault-firmware-sdk

examples/zephyr/qemu/qemu-app/Kconfig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ config ZEPHYR_MEMFAULT_EXAMPLE_THREAD_TOGGLE
1313
config ZEPHYR_MEMFAULT_EXAMPLE_MEMORY_METRICS
1414
bool "Use metrics to monitor memory usage in the example app"
1515
default y
16-
depends on MEMFAULT && THREAD_STACK_INFO
16+
depends on MEMFAULT && MEMFAULT_HEAP_STATS && THREAD_STACK_INFO
17+
18+
config ZEPHYR_MEMFAULT_EXAMPLE_SOFTWARE_VERSION
19+
string "Software Version"
20+
default "1.0.0"
21+
help
22+
The software version to report to Memfault.
1723

1824
endmenu
1925

examples/zephyr/qemu/qemu-app/prj.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@ CONFIG_LOG_BACKEND_UART=y
2222
# be useful if the board doesn't have a UART available.
2323
CONFIG_SHELL_LOG_BACKEND=n
2424

25-
CONFIG_SYS_HEAP_RUNTIME_STATS=y
25+
# Enable heap stats explicitly. It's enabled by default when heap is enabled,
26+
# see below, but in a default app, it won't be enabled because heap is disabled.
27+
# For this reference example, we select it explicitly.
28+
CONFIG_MEMFAULT_HEAP_STATS=y
2629

27-
# Increase the heap pool and main stack sizes for the example app
30+
# Increase the heap pool and main stack sizes for the example app. Setting a
31+
# non-zero memory pool size is required for heap stats, otherwise there's no
32+
# k_malloc used
2833
CONFIG_HEAP_MEM_POOL_SIZE=4096
2934
CONFIG_MAIN_STACK_SIZE=4096
3035

0 commit comments

Comments
 (0)