1# Copyright (c) 2021 Nordic Semiconductor ASA 2# SPDX-License-Identifier: Apache-2.0 3 4config LOG_BACKEND_UART 5 bool "UART backend" 6 depends on UART_CONSOLE 7 default y if !SHELL_BACKEND_SERIAL 8 select LOG_OUTPUT 9 help 10 When enabled backend is using UART to output logs. 11 12if LOG_BACKEND_UART 13 14config LOG_BACKEND_UART_ASYNC 15 bool "Use UART Asynchronous API" 16 depends on UART_ASYNC_API 17 depends on !LOG_BACKEND_UART_OUTPUT_DICTIONARY_HEX 18 19config LOG_BACKEND_UART_BUFFER_SIZE 20 int "Maximum number of bytes to buffer in RAM before flushing" 21 default 32 if LOG_BACKEND_UART_ASYNC 22 default 1 23 help 24 In deferred logging mode, sets the maximum number of bytes which can be buffered in 25 RAM before log_output_flush is automatically called on the UART backend. The buffer 26 will also be flushed after each log message. 27 28 In immediate logging mode, processed log messages are not buffered and are always 29 output one byte at a time. 30 31config LOG_BACKEND_UART_AUTOSTART 32 bool "Automatically start UART backend" 33 default y 34 help 35 When enabled automatically start the UART logging backend on 36 application start. When disabled, the application needs to start 37 the backend manually using log_backend_enable(). 38 39backend = UART 40backend-str = uart 41source "subsys/logging/Kconfig.template.log_format_config" 42 43if LOG_BACKEND_UART_OUTPUT_DICTIONARY 44 45choice 46 prompt "Dictionary mode output format" 47 default LOG_BACKEND_UART_OUTPUT_DICTIONARY_BIN 48 49config LOG_BACKEND_UART_OUTPUT_DICTIONARY_BIN 50 bool "Dictionary (binary)" 51 help 52 Dictionary-based logging output in binary. 53 54config LOG_BACKEND_UART_OUTPUT_DICTIONARY_HEX 55 bool "Dictionary (hexadecimal)" 56 help 57 Dictionary-based logging output in hexadecimal. Supported only for UART backend. 58 59endchoice 60 61endif # LOG_BACKEND_UART_OUTPUT_DICTIONARY 62 63endif # LOG_BACKEND_UART 64