Skip to content

Commit c1e3eb7

Browse files
gminnjtguggedal
authored andcommitted
memfault: fix fw version reported to Memfault
Unfortunately we can't use C macros in `.conf` files 😢, so we have to override the fw prefix symbol in a Kconfig file instead. There is probably a better solution here for default values in the Kconfigs in NCS, but this is a simple fix for now. Tested by printing device info on boot: ``` uart:~$ mflt get_device_info [00:00:06.696,868] <inf> mflt: S/N: 359404230597438 [00:00:06.696,929] <inf> mflt: SW type: app [00:00:06.696,990] <inf> mflt: SW version: 1.3.0-dev+c0a36e [00:00:06.697,052] <inf> mflt: HW version: nrf9151dk ``` Signed-off-by: Gillian Minnehan <gillian.minnehan@nordicsemi.no>
1 parent 7d1d131 commit c1e3eb7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app/overlay-memfault.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ CONFIG_MEMFAULT_HTTP_CLIENT_TIMEOUT_MS=30000
1717
CONFIG_MEMFAULT_EVENT_STORAGE_SIZE=4096
1818
CONFIG_PM_PARTITION_SIZE_MEMFAULT_STORAGE=0x2A000
1919
CONFIG_MEMFAULT_COREDUMP_COLLECT_BSS_REGIONS=y
20-
CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX="$(APP_VERSION_STRING)"
2120

2221
# Certificate management
2322
CONFIG_MEMFAULT_ROOT_CERT_STORAGE_NRF9160_MODEM=y

app/src/modules/cloud/Kconfig.cloud

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ config APP_CLOUD_MSG_PROCESSING_TIMEOUT_SECONDS
140140
Maximum time allowed for processing a single message in the module's state machine.
141141
The value must be smaller than CONFIG_APP_CLOUD_WATCHDOG_TIMEOUT_SECONDS.
142142

143+
if MEMFAULT
144+
145+
# Set Memfault software_version prefix from the VERSION file in the application
146+
config MEMFAULT_NCS_FW_VERSION_PREFIX
147+
default "$(APPVERSION)+" if "$(APPVERSION)" != ""
148+
149+
endif # MEMFAULT
150+
143151
module = APP_CLOUD
144152
module-str = Cloud
145153
source "subsys/logging/Kconfig.template.log_config"

0 commit comments

Comments
 (0)