-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathKconfig
835 lines (709 loc) · 33.3 KB
/
Kconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
config MEMFAULT
bool "Memfault Support"
default n
depends on CPU_CORTEX_M || RISCV || SOC_SERIES_ESP32S3
select RUNTIME_NMI if CPU_CORTEX_M
select EXTRA_EXCEPTION_INFO if CPU_CORTEX_M
select DEBUG_THREAD_INFO
help
Enable Zephyr Integration with the Memfault SDK
At the moment a port is only provided for Cortex-M based targets
if MEMFAULT
config MEMFAULT_CACHE_FAULT_REGS
bool "Memfault Cache ARM fault registers"
default y
depends on CPU_CORTEX_M
help
Save a copy of the ARMv7's fault registers before Zephyr
modifies them to provide a more accurate crash analysis
in the Memfault Issues view.
config MEMFAULT_USER_CONFIG_ENABLE
bool "Enable user configuration of the Memfault SDK"
default y
help
When enabled, a user must add the three Memfault
configuration files to their port:
memfault_platform_config.h
memfault_metrics_heartbeat_config.def
memfault_trace_reason_user_config.def
config MEMFAULT_USER_CONFIG_SILENT_FAIL
bool "Continue with build even if user configuration of Memfault SDK is missing"
default y
help
When enabled, __has_include is used to conditionally include the three Memfault
configuration files to a port if they exist instead of failing to compile if
they do not:
memfault_platform_config.h
memfault_metrics_heartbeat_config.def
memfault_trace_reason_user_config.def
config MEMFAULT_SOC_FAMILY_ESP32
bool "Enable ESP32 support"
# Note: the generic ESP32 family config changed from SOC_FAMILY_ESP32 to
# SOC_FAMILY_ESPRESSIF_ESP32 in Zephyr 3.7.0. To provide backwards
# compatible support without referencing unavailable Kconfig values,
# generate a Memfault-specific option that works on Zephyr 3.7.0 and
# also earlier releases.
default y if SOC_FAMILY_ESPRESSIF_ESP32 || SOC_SERIES_ESP32 || SOC_SERIES_ESP32S2 || SOC_SERIES_ESP32S3
help
Enable ESP32 support in the Memfault SDK
# sub menu for coredump settings
menu "Memfault Coredump Settings"
config MEMFAULT_COREDUMP_STORAGE_CUSTOM
bool
default n
help
Can be used by another Kconfig option to disable the RAM backed
coredump implementation using select.
config MEMFAULT_RAM_BACKED_COREDUMP
bool "Memfault Ram Backed Coredump"
default y if !MEMFAULT_COREDUMP_STORAGE_CUSTOM
depends on !MEMFAULT_COREDUMP_STORAGE_CUSTOM
help
Save a minimal coredump in noinit RAM.
config MEMFAULT_RAM_BACKED_COREDUMP_SIZE
int "Memfault Ram Backed Coredump"
default 8192
depends on MEMFAULT_RAM_BACKED_COREDUMP
help
The amount of RAM to allocate for saving coredumps
config MEMFAULT_RAM_BACKED_COREDUMP_REGION
string "Memfault Ram Backed Coredump Region"
default ".noinit.mflt_coredump"
depends on MEMFAULT_RAM_BACKED_COREDUMP
help
The region in memory where the coredump will be stored.
This region should be marked as NOINIT in the linker script.
config MEMFAULT_COREDUMP_COLLECT_DATA_REGIONS
bool "Include data region in coredump"
default y
help
When enabled, the data region will be captured as part
of the coredump. If not enough space is available for all of
the data, the coredump will be truncated.
config MEMFAULT_COREDUMP_COLLECT_BSS_REGIONS
bool "Include bss region in coredump"
default n
help
When enabled, the bss region will be captured as part
of the coredump. If not enough space is available for all of
the data, the coredump will be truncated.
config MEMFAULT_COREDUMP_COLLECT_STACK_REGIONS
bool "Include active stack region in coredump"
default y
help
When enabled, the stack region will be captured as part
of the coredump. If disabled, no backtrace will be possible.
config MEMFAULT_COREDUMP_COLLECT_KERNEL_REGION
bool "Include kernel region in coredump"
default y
help
When enabled, the kernel region will be captured as part
of the coredump. The kernel region holds data structures required to
parse Zephyr thread state from the coredump data, so thread awareness
will not be possible if this region is omitted.
config MEMFAULT_COREDUMP_COLLECT_TASKS_REGIONS
bool "Include tasks region in coredump"
default y
depends on MEMFAULT_COREDUMP_COLLECT_KERNEL_REGION
help
When enabled, Zephyr thread stacks will be captured as part of the
coredump. Disabling this will disable non-active-thread backtrace.
config MEMFAULT_COREDUMP_COMPUTE_THREAD_STACK_USAGE
bool "Compute thread stack usage on device"
default y
depends on THREAD_STACK_INFO && !STACK_GROWS_UP && INIT_STACKS
help
Adds thread stack usage computed during fault handling into a coredump.
config MEMFAULT_COREDUMP_STACK_SIZE_TO_COLLECT
int "Maximum amount of bytes to collect for task"
default 256
help
The larger the size, the more stack frames Memfault can recover for tasks. The
default setting typically allows for 4 or more frames to be recovered.
config MEMFAULT_COREDUMP_FULL_THREAD_STACKS
bool "Collect full thread stacks in coredumps"
default n
depends on THREAD_STACK_INFO
help
When enabled, Memfault will collect the full thread stack in
coredumps. This will likely increase the size of coredumps, and there
will no longer be a strict ceiling on the coredump task region sizes.
This is provided as an alternative when capturing all of RAM is not
viable but full thread stack analysis (watermarking, stack overflow
tagging) is desired.
config MEMFAULT_COREDUMP_MAX_TRACKED_TASKS
int "Maximum amount of tasks to collect in a coredump"
default 32
help
The maximum amount of tasks Memfault will store state for in a coredump.
config MEMFAULT_COREDUMP_COLLECT_MPU_STATE
bool "Include MPU state in coredump"
default y
depends on CPU_CORTEX_M
depends on ARM_MPU
help
When enabled, the MPU state will be captured as part
of the coredump. This adds
8 + 8 * MEMFAULT_COREDUMP_MPU_REGIONS_TO_COLLECT bytes to the coredump.
config MEMFAULT_COREDUMP_MPU_REGIONS_TO_COLLECT
int "Maximum amount of MPU regions to collect in a coredump"
default 8
range 1 16
depends on MEMFAULT_COREDUMP_COLLECT_MPU_STATE
help
The maximum amount of MPU regions Memfault will store state for in a
coredump.
endmenu # Memfault Coredump Settings
config MEMFAULT_HEAP_STATS
bool "Collect system heap stats with coredumps"
# our wrapper conflicts with the esp32 heap_caps implementation
default y if (!MEMFAULT_SOC_FAMILY_ESP32)
select SYS_HEAP_RUNTIME_STATS
depends on HEAP_MEM_POOL_SIZE > 0
help
When enabled, system heap stats are captured as part of the coredump.
The heap stats subsystem collects info on system heap
allocation/deallocation (k_malloc/k_free).
config MEMFAULT_SHELL
bool "Memfault Shell"
default y if SHELL
depends on SHELL
help
CLI Utilities for interfacing with the Memfault SDK
config MEMFAULT_SHELL_SELF_TEST
bool "Execute self test via a shell command `mflt test self`"
default n
depends on MEMFAULT_SHELL
help
Adds a command, `mflt test self`, to run a suite of tests used to verify the device's
integration with the Memfault SDK. By default, this will run tests to validate device
info, component boot, coredump regions, coredump storage capacity, data export, and
platform time. A reboot test is available by running `memfault_self_test reboot`
if MEMFAULT_SHELL_SELF_TEST
config MEMFAULT_SHELL_SELF_TEST_COREDUMP_STORAGE
bool "Adds option to run coredump storage test [EXPERIMENTAL]"
select EXPERIMENTAL
help
Enabling this option adds an experimental coredump storage test.
The test exercises the coredump storage implementation by erasing, reading,
and writing the entire coredump partition. This test may fail due to Flash
cache issues on some platforms. The test requires disabling any watchdogs
(hardware, software, etc) to allow the test to complete. This test may be run with
`mflt test self coredump_storage`.
endif
config MEMFAULT_PLATFORM_LOG_FALLBACK_TO_PRINTK
bool "Fallback to printk for platform logging"
default y if ! LOG
help
When enabled, the platform logging implementation will fallback
to printk if Zephyr LOG is disabled. This is useful for testing when
Zephyr LOG is not enabled (eg due to code space limitations).
config MEMFAULT_REBOOT_REASON_CUSTOM_ENABLE
bool "Allows users to create custom reboot reasons outside of the predefined set"
default n
help
Enable the ability to define custom reboot reasons. This is useful
for tracking down the root cause of a reboot when it is not supported
by the default set of reboot reasons.
config MEMFAULT_COMPACT_LOG
bool "Enable compact logging"
default n
help
When enabled, the Memfault SDK will use a compact representation
for log messages written using the 'MEMFAULT_LOG_x' macros. Find more
information here: https://mflt.io/compact-logs
config MEMFAULT_LOGGING_ENABLE
bool "Memfault Zephyr backend logging Enable [EXPERIMENTAL]"
default n
select LOG
select LOG_OUTPUT
help
Adds support for routing Zephyr logging calls to the Memfault
logging backend.
if MEMFAULT_LOGGING_ENABLE
config MEMFAULT_LOGGING_RAM_SIZE
int "Set the size of the Memfault logging storage buffer"
default 512
depends on MEMFAULT_LOGGING_ENABLE
help
The Memfault logs will be stored in a static logging storage buffer
defined in memfault_logging.c. Adjust this value to ensure enough
room for a reasonalbe number of log entries.
config MEMFAULT_METRICS_LOGS_ENABLE
bool "Enable collection of metrics for log message counts"
default y
help
When enabled, Memfault will collect metrics for log messages.
This can be useful for tracking the number of logs generated
by the system.
endif # MEMFAULT_LOGGING_ENABLE
config MEMFAULT_ROOT_CERT_STORAGE
bool "Memfault TLS root certificate storage enabled"
default y if MEMFAULT_HTTP_ENABLE
help
Enables TLS root certificate storage for Memfault data upload
choice MEMFAULT_ROOT_CERT_STORAGE_CONTEXT
bool "Implementation used to store Memfault Root certificates"
default MEMFAULT_ROOT_CERT_STORAGE_NRF9160_MODEM if SOC_SERIES_NRF91X && TRUSTED_EXECUTION_NONSECURE
default MEMFAULT_ROOT_CERT_STORAGE_TLS_CREDENTIAL_STORAGE
depends on MEMFAULT_ROOT_CERT_STORAGE
config MEMFAULT_ROOT_CERT_STORAGE_NRF9160_MODEM
bool "Uses the storage on the NRF9160 modem for storing root certificates"
config MEMFAULT_ROOT_CERT_STORAGE_TLS_CREDENTIAL_STORAGE
bool "Uses Zephyr's tls_credential_add() API for storing root certificates"
config MEMFAULT_ROOT_CERT_STORAGE_CUSTOM
bool "Provide a custom implementation of memfault_root_cert_storage_add()"
endchoice
config MEMFAULT_HTTP_ENABLE
bool "Enables support for using Memfault's HTTP APIs"
default y if SOC_SERIES_NRF91X && TRUSTED_EXECUTION_NONSECURE
imply POSIX_API
help
Enables support for querying the Memfault API for OTA updates
and posting Memfault chunks
if MEMFAULT_HTTP_ENABLE
config MEMFAULT_HTTP_MAX_POST_SIZE
int "Set the Maximum HTTP Body Size Memfault will use in a POST request"
default 0
depends on MEMFAULT_HTTP_ENABLE
help
Some network drivers have bugs which limit the maximum amount of
data that can be sent in a single HTTP request. When the value is 0 (default),
no size restriction on HTTP post size will be enforced. For a non-zero value,
this will be the maximum body length of a posted check. This size is allocated
on the stack posting the data.
config MEMFAULT_HTTP_PERIODIC_UPLOAD
bool "Enables a work job to periodically push new data to Memfault"
default y if SOC_SERIES_NRF91X
help
This implementation makes use of a k_timer_* and k_work_submit to schedule
a background job that periodically checks to see if new Memfault data
is available and pushes it to Memfault if so (via a HTTP POST).
choice MEMFAULT_HTTP_PERIODIC_UPLOAD_CONTEXT
prompt "Work queue implementation to use for periodic HTTP posting"
depends on MEMFAULT_HTTP_PERIODIC_UPLOAD
default MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_DEDICATED_WORKQUEUE if SOC_SERIES_NRF91X
default MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_SYSTEM_WORKQUEUE
config MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_SYSTEM_WORKQUEUE
bool "Periodically push new data to Memfault from system workqueue"
help
When using this feature, make sure CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE
is set appropriately for the board's HTTP stack to not cause a stack overflow.
Using the system workqueue reduces RAM usage compared to a dedicated workqueue.
Sending data from the system workqueue with LTE networks is known to cause issues and
a dedicated workqueue maybe be required.
config MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_DEDICATED_WORKQUEUE
bool "Periodically push new data to Memfault using a dedicated workqueue"
help
When using this feature, make sure CONFIG_MEMFAULT_HTTP_DEDICATED_WORKQUEUE_STACK_SIZE
is set appropriately for the board's HTTP stack to not cause a stack overflow. A dedicated
workqueue over the system workqueue is beneficial if http requests for the network stack
in use can block for a long time (e.g. LTE) but comes at the cost of using extra RAM.
endchoice
config MEMFAULT_HTTP_DEDICATED_WORKQUEUE_STACK_SIZE
int "Stack size for dedicated http upload queue, in bytes"
default 2048
depends on MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_DEDICATED_WORKQUEUE
config MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS
int "Interval with which the periodic upload task should run"
default 3600
depends on MEMFAULT_HTTP_PERIODIC_UPLOAD
help
The first check will run between [1, 1+MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS]
Subsequent checks will run at MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS intervals.
config MEMFAULT_HTTP_USES_MBEDTLS
bool "Use mbedTLS for HTTP transport"
default y if MBEDTLS
help
Configure Memfault HTTP for using mbedTLS- perform some sanity checks
at compile time that it is configured correctly. Note that if MbedTLS
is used for purposes other than securing the TCP/IP sockets, i.e. if
TLS is offloaded to the underlying socket, this check is invalid, and
should be explicitly set to 'n'.
choice MEMFAULT_TLS_CERTS_FORMAT
prompt "TLS certificates format"
default MEMFAULT_TLS_CERTS_USE_DER
help
Choose the format of the TLS certificates used by Memfault
config MEMFAULT_TLS_CERTS_USE_PEM
bool "Use PEM format for TLS certificates"
depends on (MBEDTLS_PEM_CERTIFICATE_FORMAT || !(MBEDTLS && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h"))
help
When enabled, Memfault will use PEM format for TLS certificates.
When disabled, DER format will be used.
config MEMFAULT_TLS_CERTS_USE_DER
bool "Use DER format for TLS certificates"
depends on !NET_SOCKETS_OFFLOAD
help
When enabled, Memfault will use DER format for TLS certificates.
When disabled, PEM format will be used. DER format may reduce runtime
memory requirements (for example if using mbedTLS).
endchoice # MEMFAULT_TLS_CERTS_FORMAT
config MEMFAULT_PROJECT_KEY
string "Memfault Project Key"
help
Token used to communicate with Memfault. Find it at
https://mflt.io/project-key
endif # MEMFAULT_HTTP_ENABLE
config MEMFAULT_ZEPHYR_FOTA_DOWNLOAD_CALLBACK_CUSTOM
bool "Provide a custom implementation for FOTA download"
default n
help
By default, the Memfault SDK implements a stub for the FOTA download
callback invoked when a download completes. An end user can provide
their own implementation by enabling this option and implementing
memfault_zephyr_fota_download_callback().
choice MEMFAULT_ZEPHYR_FOTA_BACKEND
prompt "Backend for FOTA updates"
default MEMFAULT_ZEPHYR_FOTA_BACKEND_MCUBOOT
default MEMFAULT_ZEPHYR_FOTA_BACKEND_DUMMY
help
Choose the backend for FOTA updates
config MEMFAULT_ZEPHYR_FOTA_BACKEND_MCUBOOT
bool "Use MCUboot backend implementation for FOTA updates"
depends on MEMFAULT_HTTP_ENABLE && BOOTLOADER_MCUBOOT && !MEMFAULT_NRF_CONNECT_SDK
help
Adds support for performing OTA updates via MCUboot. If an update is available,
the binary will be downloaded and installed in the secondary slot(slot1_partition).
By default, the device will be rebooted into the new firmware. Users can customize
the behavior after the update is downloaded by providing a custom implementation
of memfault_zephyr_fota_download_callback() and setting MEMFAULT_ZEPHYR_FOTA_DOWNLOAD_CALLBACK_CUSTOM=y.
For information on release management with Memfault: https://mflt.io/release-mgmt.
config MEMFAULT_ZEPHYR_FOTA_BACKEND_DUMMY
bool "Use a dummy backend implementation for FOTA updates"
depends on MEMFAULT_HTTP_ENABLE
help
The dummy implementation is a no-op OTA update and is useful for testing the download
of an OTA playload. It will pull the OTA payload but not install it on the device.
For information on release management with Memfault: https://mflt.io/release-mgmt.
endchoice
config MEMFAULT_EVENT_STORAGE_SIZE
int "Memfault Event Storage RAM Buffer Size"
default 1024
help
The storage area used to batch memfault events before they are flushed
to persistent storage or the Memfault Cloud.
config MEMFAULT_REBOOT_REASON_GET_CUSTOM
bool "Provide a custom implementation for recovering reboot information"
default n
help
User of SDK must provide their own implementation of memfault_reboot_reason_get()
when disabled
config MEMFAULT_REBOOT_TRACKING_REGION
string "Memfault Reboot Tracking Region"
default ".rtc_noinit" if (MEMFAULT_SOC_FAMILY_ESP32)
default ".noinit.mflt_reboot_info"
help
The region in memory where the reboot tracking information will be stored.
This region should be marked as NOINIT in the linker script.
config MEMFAULT_CLEAR_RESET_REG
bool "Whether or not to clear bits in MCU reset reason register"
default y
help
When disabled, the end user is responsible for clearing the reset register. (Bits
generally persist across resets)
config MEMFAULT_METRICS
bool "Enable the memfault Metrics subsystem"
default y
if MEMFAULT_METRICS
config MEMFAULT_METRICS_EXTRA_DEFS_FILE
bool "Enable inclusion of additional metrics definition file"
default n
help
Enables inclusion of an additional metric definition file,
'memfault_metrics_heartbeat_extra.def'. This can be useful for third party
libraries that want to include additional default metrics.
config MEMFAULT_METRICS_HEARTBEAT_INTERVAL_SECS
int "The interval in seconds between heartbeats"
default 3600
help
The interval in seconds between heartbeat metrics tallying.
config MEMFAULT_METRICS_TIMER_CUSTOM
bool "Provide a custom implementation of Memfault Metric Deps"
default n
help
By default the Memfault SDK makes use of Zephyrs k_timer_* to
schedule the heartbeat timer and k_work_* to run the heartbeat callback
work. This option can be used to disable that implementation in
ports/zephyr/common/memfault_platform_metrics.c and allow for
a custom implementation of memfault_platform_metrics_timer_boot() to be provided
config MEMFAULT_METRICS_DEFAULT_SET_ENABLE
bool "Enable collection of a default set of metrics by the Zephyr port"
default y
help
By default the Memfault SDK will automatically capture heartbeat metrics
to help track how the Zephyr RTOS is operating. For more details about the
metrics collected, see ports/zephyr/config/memfault_metrics_heartbeat_zephyr_port_config.def
When disabled, no default metrics will be collected.
config MEMFAULT_FS_BYTES_FREE_METRIC
bool "Enable collection of a metric for the amount of free space on the filesystem"
default y
depends on FILE_SYSTEM
config MEMFAULT_FS_BYTES_FREE_VFS_PATH
string "Path to the mount point to collect free space metrics for"
default "lfs1"
depends on FILE_SYSTEM && MEMFAULT_FS_BYTES_FREE_METRIC
help
The path to the virtual filesystem mount point to collect free space
metrics for, omitting the leading '/'.
config MEMFAULT_METRICS_CPU_TEMP
bool "Enable collection of CPU temperature metrics"
default y
depends on SENSOR && "$(dt_alias_enabled,die-temp0)"
help
Memfault CPU temperature metric component. Requires a `die-temp0`
device tree node.
config MEMFAULT_METRICS_SYNC_SUCCESS
bool "Enable collection of sync success metrics"
default y
help
Memfault user-defined sync success metric component. More information
at https://mflt.io/core-metrics .
config MEMFAULT_METRICS_MEMFAULT_SYNC_SUCCESS
bool "Enable collection of memfault sync success metrics"
default y
depends on MEMFAULT_HTTP_ENABLE
help
Collects Memfault metrics for the number of successful and failed
syncs to the Memfault cloud. More information at
https://mflt.io/core-metrics .
config MEMFAULT_METRICS_CONNECTIVITY_CONNECTED_TIME
bool "Enable collection of memfault connectivity time metrics"
default y
help
Memfault connectivity time metric component. More information at
https://mflt.io/core-metrics .
config MEMFAULT_METRICS_BATTERY_ENABLE
bool "Enable collection of battery metrics"
default n
help
Memfault battery metric component. More information at
https://mflt.io/core-metrics .
config MEMFAULT_BATTERY_METRICS_BOOT_ON_SYSTEM_INIT
bool "Auto initialize battery metrics on system init"
default y
depends on MEMFAULT_METRICS_BATTERY_ENABLE
help
Automatically initialize the battery metric subsystem on bootup
config MEMFAULT_METRICS_TCP_IP
bool "Enable collection of TCP/IP metrics"
default y
depends on NET_STATISTICS && NET_STATISTICS_USER_API
help
Collects Memfault metrics for TCP/IP statistics.
config MEMFAULT_METRICS_WIFI
bool "Enable collection of Wi-Fi metrics"
default y
depends on NET_MGMT_EVENT && WIFI
config MEMFAULT_METRICS_MEMORY_USAGE
bool "Enable collection of memory usage metrics"
default y
depends on SYS_HEAP_RUNTIME_STATS
help
Collects Memfault metrics for memory usage stats.
config MEMFAULT_METRICS_THREADS
bool "Enable collection of per-thread metrics"
default y
depends on THREAD_STACK_INFO
help
Collects Memfault metrics for thread stats. See
memfault/ports/zephyr/thread_metrics.h on how to register threads for
metrics.
config MEMFAULT_METRICS_THREADS_MEMORY_SCALE_FACTOR
int "Scale factor for memory metrics"
default 100
depends on MEMFAULT_METRICS_THREADS
help
The scale factor to use for memory metrics. The value recorded is
multiplied by this factor before being stored in the metric. For
example, if stack usage is 50.00%, and the scale factor is 100, the
value stored in the metric will be 5000, and is scaled back to 50.00%
when Memfault's cloud processes the data.
config MEMFAULT_METRICS_THREADS_DEFAULTS
bool "Enable collection of default thread metrics"
default y
depends on MEMFAULT_METRICS_THREADS
help
Enables default set of threads to track metrics on (idle, sysworkq). If
providing a custom set of threads to track, disable this option.
endif # MEMFAULT_METRICS
config MEMFAULT_SOFTWARE_WATCHDOG_CUSTOM
bool "Provide a custom implementation of Software Watchdog"
default n
help
By default Memfault implements a software watchdog implementation. Users can call
memfault_software_watchdog_enable() on boot and memfault_software_watchdog_feed()
when they feed the hardware watchdog. When the software watchdog expires, Memfault
will capture a coredump and then the system will be rebooted. This option can be used
to disable the implementation in ports/zephyr/common/memfault_software_watchdog.c
config MEMFAULT_SOFTWARE_WATCHDOG_TIMEOUT_SECS
int "The time, in seconds, to configure the software watchdog expiration for"
default 15
config MEMFAULT_RECORD_REBOOT_ON_SYSTEM_INIT
bool "Record reboot reason during system initialization"
default y
help
Record the reboot reason event during system initialization. Disable
this if device info is not valid until later in startup, then call
`memfault_zephyr_collect_reset_info()` from
`#include "memfault/ports/zephyr/core.h"` to store the reboot reason
event.
config MEMFAULT_INIT_PRIORITY
int "The priority of Memfault initialization on system start"
default KERNEL_INIT_PRIORITY_DEFAULT
help
The SYS_INIT relative priority for Memfault initialization.
config MEMFAULT_INIT_LEVEL_POST_KERNEL
bool "Use POST_KERNEL init level for Memfault initialization"
default n
help
Set the Memfault initialization SYS_INIT priority level to
"POST_KERNEL". Default is "APPLICATION".
config MEMFAULT_CATCH_ZEPHYR_ASSERT
bool "Support backtrace through Zephyr __ASSERT() calls"
default y
help
When enabled, Memfault will support proper backtraces when a Zephyr
__ASSERT() trips. If disabled (i.e. user needs a custom implementation
of assert_post_action()), backtraces will not be correctly captured
from __ASSERT() macro call sites, unless assert_post_action() contains
a MEMFAULT_ASSERT() invocation.
config MEMFAULT_PLATFORM_EXTRA_CONFIG_FILE
bool "Enable inclusion of additional platform config file"
default n
help
Enables inclusion of an additional platform config file,
'memfault_platform_config_extra.h'. This can be useful for third party
libraries that want to include additional default platform configs.
config MEMFAULT_PLATFORM_METRICS_CONNECTIVITY_BOOT
bool "Initialize platform-specific connectivity metrics on system init"
default n
help
When enabled, memfault_metrics_boot() will call a platform-implemented
memfault_platform_metrics_connectivity_boot() function. If not already
implemented for the user's platform, the user must supply their own implementation.
This function is typically used to register event handlers to that will mark
the connectivity state changes when the device connects and disconnects.
Marking these state changes is required to calculate the connectivity time metrics.
config MEMFAULT_FAULT_HANDLER_RETURN
bool "Return from fault handler"
default n
help
When enabled, the Memfault fault handler will call `z_fatal_error`
instead of rebooting the system. Useful if the system needs to hook into
`k_sys_fatal_error_handler` at the end of system fault handling.
choice MEMFAULT_SYSTEM_TIME_SOURCE
prompt "Memfault system time source"
default MEMFAULT_SYSTEM_TIME_SOURCE_DATETIME if DATE_TIME
default MEMFAULT_SYSTEM_TIME_SOURCE_RTC if RTC
default MEMFAULT_SYSTEM_TIME_SOURCE_CUSTOM
help
Choose the source of the system time used by the Memfault SDK
config MEMFAULT_SYSTEM_TIME_SOURCE_CUSTOM
bool "Custom/disabled"
help
When enabled, the user can provide an implementation of
memfault_platform_time_get_current() in their port. This also can be
selected to disable the built-in implementations.
config MEMFAULT_SYSTEM_TIME_SOURCE_DATETIME
bool "Datetime"
depends on DATE_TIME
help
Provides a built-in implementation of
memfault_platform_time_get_current() using the Zephyr datetime
subsystem.
config MEMFAULT_SYSTEM_TIME_SOURCE_RTC
bool "RTC"
depends on RTC
help
Provides a built-in implementation of
memfault_platform_time_get_current() using the Zephyr RTC subsystem.
endchoice
config MEMFAULT_DATETIME_TIMESTAMP_EVENT_CALLBACK
bool "Install a callback on boot for date_time events"
default y
depends on MEMFAULT_SYSTEM_TIME_SOURCE_DATETIME
help
When enabled, a callback will be installed on boot to update the
Memfault SDK's timestamp when the Zephyr datetime subsystem is
updated. Note that the date_time library only has 1 event callback, so
if it's needed elsewhere, this option should be disabled and the
memfault_zephyr_date_time_evt_handler() function should be called from
the application's date_time event handler.
config MEMFAULT_CDR_ENABLE
bool "Enable the Memfault CDR component"
default y
help
Permits usage of the Memfault CDR feature. See
https://mflt.io/custom-data-recordings for more information.
choice MEMFAULT_BUILD_ID_TYPE
prompt "Build ID type"
default MEMFAULT_USE_MEMFAULT_BUILD_ID if (MEMFAULT_SOC_FAMILY_ESP32 && !BOOTLOADER_MCUBOOT)
default MEMFAULT_USE_GNU_BUILD_ID
help
Choose the type of build ID to include in the image
config MEMFAULT_USE_MEMFAULT_BUILD_ID
bool "Use a Memfault build ID in an image"
# Memfault build ID should be used if the ESP32 bootloader is used.
# esptool.py generates the flashable image, which ignores the
# .note.gnu.build-id section despite being marked as ALLOC.
help
Use a Memfault build ID in an image
menuconfig MEMFAULT_USE_GNU_BUILD_ID
bool "Use a GNU build ID in an image"
depends on !(MEMFAULT_SOC_FAMILY_ESP32 && !BOOTLOADER_MCUBOOT)
if MEMFAULT_USE_GNU_BUILD_ID
choice MEMFAULT_GNU_BUILD_ID_SOURCE
prompt "GNU Build ID source"
default MEMFAULT_GNU_BUILD_ID_SOURCE_BUILTIN
help
Choose if a GNU build ID is generated by built-in SDK features
or by other means
config MEMFAULT_GNU_BUILD_ID_SOURCE_BUILTIN
bool "Built-in via Memfault SDK"
help
Use the Memfault SDK to generate and include a GNU build ID
config MEMFAULT_GNU_BUILD_ID_SOURCE_CUSTOM
bool "Custom source"
help
Use a custom source to generate and include a GNU build ID
Set the name of the GNU build ID symbol with MEMFAULT_GNU_BUILD_ID_SYMBOL
in your application's memfault_platform_config.h
endchoice # MEMFAULT_GNU_BUILD_ID_SOURCE
endif # MEMFAULT_USE_GNU_BUILD_ID
endchoice # MEMFAULT_BUILD_ID_TYPE
menu "Memfault Built-In Device Info Options"
config MEMFAULT_BUILTIN_DEVICE_INFO_SOFTWARE_VERSION
string "Builtin device info .software_version"
default "$(APP_VERSION_TWEAK_STRING)" if (("$(VERSION_TWEAK)") && ("$(VERSION_TWEAK)" != "0"))
default "$(APPVERSION)" if "$(APPVERSION)" != ""
default "0.0.0"
config MEMFAULT_BUILTIN_DEVICE_INFO_SOFTWARE_TYPE
string "Builtin device info .software_type"
default "app"
config MEMFAULT_BUILTIN_DEVICE_INFO_HARDWARE_VERSION
string "Builtin device info .hardware_version"
default BOARD
endmenu # MEMFAULT_BUILTIN_DEVICE_INFO
config MEMFAULT_COMPRESS_DEBUG_INFO
bool "Compress debug info"
default y
help
Compress debug info to reduce the size of the output elf file.
config MEMFAULT_BUILD_META_IN_ELF
bool "Include build meta in ELF"
default y
imply BUILD_OUTPUT_META
help
Include build meta in the ELF file.
config MEMFAULT_DTS_IN_ELF
bool "Include DTS in the ELF file"
default y
help
When enabled, the DTS will be included as a non-loadable section in
the ELF file.
module = MEMFAULT
module-str = Memfault
source "subsys/logging/Kconfig.template.log_config"
rsource "ncs/Kconfig"
endif # MEMFAULT