Skip to content

Commit 4c81ab4

Browse files
committed
modules: Remove memfault module
Remove memfault module, all needed Memfault is now included in NCSs integration. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
1 parent 0313650 commit 4c81ab4

14 files changed

+41
-374
lines changed

app/CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@ add_subdirectory(src/modules/button)
2424
add_subdirectory_ifdef(CONFIG_APP_BATTERY src/modules/battery)
2525
add_subdirectory_ifdef(CONFIG_APP_ENVIRONMENTAL src/modules/environmental)
2626
add_subdirectory_ifdef(CONFIG_APP_LED src/modules/led)
27-
add_subdirectory_ifdef(CONFIG_APP_MEMFAULT src/modules/memfault)
2827
add_subdirectory_ifdef(CONFIG_APP_SHELL src/modules/shell)
2928

30-
# Include Memfault configuration folder
31-
zephyr_include_directories(config)
32-
3329
if (CONFIG_NRF_CLOUD_COAP_SEC_TAG GREATER_EQUAL 2147483648 AND CONFIG_NRF_CLOUD_COAP_SEC_TAG LESS_EQUAL 2147483667)
3430
message(WARNING "CONFIG_NRF_CLOUD_COAP_SEC_TAG is set to a developer security tag. "
3531
"TLS traffic can now be decrypted with Nordic tools. "

app/Kconfig

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ rsource "src/modules/led/Kconfig.led"
2121
rsource "src/modules/app/Kconfig.app"
2222
rsource "src/modules/fota/Kconfig.fota"
2323
rsource "src/modules/environmental/Kconfig.environmental"
24-
rsource "src/modules/memfault/Kconfig.memfault"
2524
rsource "src/modules/shell/Kconfig.shell"
2625
rsource "src/modules/button/Kconfig.button"
2726

app/boards/thingy91x_nrf9151_ns.conf

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ CONFIG_APP_BATTERY=y
1515

1616
# LED module
1717
CONFIG_APP_LED=y
18+
CONFIG_APP_LED_LOG_LEVEL_DBG=y
1819

1920
# Fuel Gage
2021
CONFIG_NRF_FUEL_GAUGE=y
@@ -23,6 +24,7 @@ CONFIG_NPM1300_CHARGER=y
2324
# Wi-Fi
2425
CONFIG_WIFI=y
2526
CONFIG_WIFI_NRF70=y
27+
CONFIG_WIFI_NRF70_LOG_LEVEL_ERR=y
2628
CONFIG_WIFI_NRF70_SKIP_LOCAL_ADMIN_MAC=y
2729
CONFIG_NRF70_BH_WQ_STACK_SIZE=1024
2830
CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024

app/config/memfault_platform_config.h

-7
This file was deleted.

app/config/memfault_trace_reason_user_config.def

-12
This file was deleted.

app/overlay-memfault.conf

+20-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor
2+
# Copyright (c) 2025 Nordic Semiconductor
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
CONFIG_APP_MEMFAULT=y
8-
CONFIG_APP_MEMFAULT_LOG_LEVEL_DBG=y
9-
CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI=y
10-
CONFIG_MEMFAULT_NCS_PROJECT_KEY=""
11-
CONFIG_MEMFAULT_LOGGING_RAM_SIZE=4096
7+
CONFIG_MEMFAULT=y
128
CONFIG_MEMFAULT_HEAP_STATS=y
13-
CONFIG_MEMFAULT_NCS_LOCATION_METRICS=y
14-
CONFIG_MEMFAULT_HTTP_DEDICATED_WORKQUEUE_STACK_SIZE=1560
9+
CONFIG_MEMFAULT_LOGGING_ENABLE=y
10+
CONFIG_MEMFAULT_LOGGING_RAM_SIZE=4096
1511
CONFIG_MEMFAULT_COREDUMP_FULL_THREAD_STACKS=y
12+
CONFIG_MEMFAULT_HTTP_DEDICATED_WORKQUEUE_STACK_SIZE=1560
13+
CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD=y
14+
CONFIG_MEMFAULT_HTTP_ENABLE=y
1615
CONFIG_MEMFAULT_EVENT_STORAGE_SIZE=2048
1716

17+
# Certificate management
18+
CONFIG_MEMFAULT_ROOT_CERT_STORAGE_NRF9160_MODEM=y
19+
CONFIG_MODEM_KEY_MGMT=y
20+
21+
# Memfault NCS integration
22+
CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI=y
23+
CONFIG_MEMFAULT_NCS_PROJECT_KEY=""
24+
CONFIG_MEMFAULT_NCS_LOCATION_METRICS=y
25+
CONFIG_MEMFAULT_NCS_LTE_METRICS=y
26+
CONFIG_MEMFAULT_NCS_STACK_METRICS=y
27+
CONFIG_MEMFAULT_NCS_INTERNAL_FLASH_BACKED_COREDUMP=y
28+
CONFIG_MEMFAULT_NCS_POST_COREDUMP_ON_NETWORK_CONNECTED=y
29+
1830
# Memfault depends on POSIX, disable unneeded POSIX features
1931
CONFIG_POSIX_FILE_SYSTEM=n

app/overlay-modemtrace-to-memfault.conf

-15
This file was deleted.

app/prj.conf

-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ CONFIG_APP_FOTA_LOG_LEVEL_DBG=y
196196
CONFIG_APP_LOCATION_LOG_LEVEL_DBG=y
197197
CONFIG_APP_CLOUD_LOG_LEVEL_DBG=y
198198
CONFIG_APP_NETWORK_LOG_LEVEL_DBG=y
199-
CONFIG_APP_LED_LOG_LEVEL_DBG=y
200199
CONFIG_APP_SHELL_LOG_LEVEL_DBG=y
201200
CONFIG_APP_LOG_LEVEL_DBG=y
202201

app/sample.yaml

+15-11
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,24 @@ tests:
1212
sysbuild: true
1313
integration_platforms:
1414
- thingy91x/nrf9151/ns
15+
- nrf9151dk/nrf9151/ns
1516
platform_allow:
1617
- thingy91x/nrf9151/ns
18+
- nrf9151dk/nrf9151/ns
19+
tags: ci_build
20+
app.build.memfault:
21+
build_only: true
22+
sysbuild: true
23+
integration_platforms:
24+
- thingy91x/nrf9151/ns
25+
- nrf9151dk/nrf9151/ns
26+
platform_allow:
27+
- thingy91x/nrf9151/ns
28+
- nrf9151dk/nrf9151/ns
29+
extra_configs:
30+
- CONFIG_MEMFAULT_NCS_PROJECT_KEY="SECRET"
31+
extra_args: EXTRA_CONF_FILE="overlay-memfault.conf;overlay-etb.conf"
1732
tags: ci_build
18-
# app.build.memfault:
19-
# build_only: true
20-
# sysbuild: true
21-
# integration_platforms:
22-
# - thingy91x/nrf9151/ns
23-
# platform_allow:
24-
# - thingy91x/nrf9151/ns
25-
# extra_configs:
26-
# - CONFIG_MEMFAULT_NCS_PROJECT_KEY="PROJECTKEY"
27-
# extra_args: EXTRA_CONF_FILE="overlay-memfault.conf;overlay-modemtrace-to-memfault.conf;overlay-etb.conf"
28-
# tags: ci_build
2933
# app.build.bootloader_update:
3034
# build_only: true
3135
# sysbuild: true

app/src/modules/app/app.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
#include "message_channel.h"
1616
#include "button.h"
1717
#include "network.h"
18-
#include "environmental.h"
1918
#include "cloud_module.h"
2019
#include "fota.h"
2120
#include "location.h"
2221
#include "led.h"
2322

23+
#if defined(CONFIG_APP_ENVIRONMENTAL)
24+
#include "environmental.h"
25+
#endif /* CONFIG_APP_ENVIRONMENTAL */
26+
2427
#if defined(CONFIG_APP_BATTERY)
2528
#include "battery.h"
2629
#endif /* CONFIG_APP_BATTERY */

app/src/modules/cloud/cloud_module.c

-4
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,6 @@ static void shadow_get(bool delta_only)
470470
return;
471471
} else if (err > 0) {
472472
LOG_WRN("Cloud error: %d", err);
473-
474-
IF_ENABLED(CONFIG_MEMFAULT,
475-
(MEMFAULT_TRACE_EVENT_WITH_STATUS(nrf_cloud_coap_shadow_get, err)));
476-
477473
return;
478474
} else if (err) {
479475
LOG_ERR("Failed to request shadow delta: %d", err);

app/src/modules/memfault/CMakeLists.txt

-7
This file was deleted.

app/src/modules/memfault/Kconfig.memfault

-52
This file was deleted.

0 commit comments

Comments
 (0)