1# Copyright (c) 2021 Nordic Semiconductor ASA 2# SPDX-License-Identifier: Apache-2.0 3 4config LOG_BACKEND_SWO 5 bool "Serial Wire Output (SWO) backend" 6 depends on HAS_SWO 7 select LOG_OUTPUT 8 help 9 When enabled, backend will use SWO for logging. 10 11if LOG_BACKEND_SWO 12 13config LOG_BACKEND_SWO_REF_FREQ_HZ 14 int "SWO reference clock frequency" 15 default $(dt_node_int_prop_int,$(dt_nodelabel_path,itm),swo-ref-frequency) if $(dt_nodelabel_enabled,itm) 16 default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency) if $(dt_node_has_prop,/cpus/cpu@0,clock-frequency) 17 default 0 18 help 19 Set SWO reference frequency. In most cases it is equal to CPU 20 frequency. 21 22config LOG_BACKEND_SWO_FREQ_HZ 23 int "Set SWO output frequency" 24 default 0 25 help 26 Set SWO output frequency. Value 0 will select maximum frequency 27 supported by the given MCU. Not all debug probes support high 28 frequency SWO operation. In this case the frequency has to be set 29 manually. 30 31 SWO value defined by this option will be configured at boot. Most SWO 32 viewer programs will configure SWO frequency when attached to the 33 debug probe. Such configuration will persist only until the device 34 reset. To ensure flawless operation the frequency configured here and 35 by the SWO viewer program has to match. 36 37backend = SWO 38backend-str = swo 39source "subsys/logging/Kconfig.template.log_format_config" 40 41endif # LOG_BACKEND_SWO 42