| # Copyright (c) 2021 Nordic Semiconductor ASA |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| menu "Backends" |
| |
| config LOG_BACKEND_UART |
| bool "Enable UART backend" |
| depends on UART_CONSOLE |
| default y if !SHELL_BACKEND_SERIAL |
| help |
| When enabled backend is using UART to output logs. |
| |
| if LOG_BACKEND_UART |
| |
| config LOG_BACKEND_UART_ASYNC |
| bool "Use UART Asynchronous API" |
| depends on UART_ASYNC_API |
| depends on !LOG_BACKEND_UART_OUTPUT_DICTIONARY_HEX |
| |
| config LOG_BACKEND_UART_OUTPUT_DICTIONARY |
| bool |
| depends on LOG2 |
| select LOG_DICTIONARY_SUPPORT |
| help |
| UART backend is in dictionary-based logging output mode. |
| |
| choice LOG_BACKEND_UART_OUTPUT |
| prompt "UART Backend Output Mode" |
| default LOG_BACKEND_UART_OUTPUT_TEXT |
| |
| config LOG_BACKEND_UART_OUTPUT_TEXT |
| bool "Text" |
| help |
| Output in text. |
| |
| config LOG_BACKEND_UART_SYST_ENABLE |
| bool "MIPI SyS-T" |
| depends on LOG_BACKEND_UART |
| depends on LOG_MIPI_SYST_ENABLE |
| help |
| When enabled backend is using UART to output syst format logs. |
| |
| config LOG_BACKEND_UART_OUTPUT_DICTIONARY_HEX |
| bool "Dictionary (hexadecimal)" |
| depends on LOG2 |
| select LOG_BACKEND_UART_OUTPUT_DICTIONARY |
| help |
| Dictionary-based logging output in hexadecimal. |
| |
| config LOG_BACKEND_UART_OUTPUT_DICTIONARY_BIN |
| bool "Dictionary (binary)" |
| depends on LOG2 |
| select LOG_BACKEND_UART_OUTPUT_DICTIONARY |
| help |
| Dictionary-based logging output in binary. |
| |
| endchoice |
| |
| endif # LOG_BACKEND_UART |
| |
| config LOG_BACKEND_SWO |
| bool "Enable Serial Wire Output (SWO) backend" |
| depends on HAS_SWO |
| help |
| When enabled, backend will use SWO for logging. |
| |
| if LOG_BACKEND_SWO |
| |
| config LOG_BACKEND_SWO_FREQ_HZ |
| int "Set SWO output frequency" |
| default 0 |
| help |
| Set SWO output frequency. Value 0 will select maximum frequency |
| supported by the given MCU. Not all debug probes support high |
| frequency SWO operation. In this case the frequency has to be set |
| manually. |
| |
| SWO value defined by this option will be configured at boot. Most SWO |
| viewer programs will configure SWO frequency when attached to the |
| debug probe. Such configuration will persist only until the device |
| reset. To ensure flawless operation the frequency configured here and |
| by the SWO viewer program has to match. |
| |
| config LOG_BACKEND_SWO_SYST_ENABLE |
| bool "Enable SWO syst backend" |
| depends on LOG_MIPI_SYST_ENABLE |
| help |
| When enabled backend is using SWO to output syst format logs. |
| |
| endif # LOG_BACKEND_SWO |
| |
| config LOG_BACKEND_RTT |
| bool "Enable Segger J-Link RTT backend" |
| depends on USE_SEGGER_RTT |
| default y if !SHELL_BACKEND_RTT |
| select SEGGER_RTT_CUSTOM_LOCKING |
| help |
| When enabled, backend will use RTT for logging. This backend works on a per |
| message basis. Only a whole message (terminated with a carriage return: '\r') |
| is transferred to up-buffer at once depending on available space and |
| selected mode. |
| In panic mode backend always blocks and waits until there is space |
| in up-buffer for a message and message is transferred to host. |
| |
| if LOG_BACKEND_RTT |
| |
| choice LOG_BACKEND_RTT_MODE |
| prompt "Logger behavior" |
| default LOG_BACKEND_RTT_MODE_BLOCK |
| |
| config LOG_BACKEND_RTT_MODE_DROP |
| bool "Drop messages that do not fit in up-buffer." |
| help |
| If there is not enough space in up-buffer for a message, drop it. |
| Number of dropped messages will be logged. |
| Increase up-buffer size helps to reduce dropping of messages. |
| |
| config LOG_BACKEND_RTT_MODE_BLOCK |
| bool "Block until message is transferred to host." |
| help |
| Waits until there is enough space in the up-buffer for a message. |
| |
| config LOG_BACKEND_RTT_SYST_ENABLE |
| bool "Enable RTT syst backend" |
| depends on LOG_MIPI_SYST_ENABLE |
| help |
| When enabled backend is using RTT to output syst format logs. |
| |
| config LOG_BACKEND_RTT_MODE_OVERWRITE |
| bool "Overwrite messages if up-buffer full" |
| help |
| If there is not enough space in up-buffer for a message overwrite |
| oldest one. |
| |
| endchoice |
| |
| config LOG_BACKEND_RTT_MESSAGE_SIZE |
| int "Size of internal buffer for storing messages." |
| range 32 256 |
| default 128 |
| depends on LOG_BACKEND_RTT_MODE_DROP |
| help |
| This option defines maximum message size transferable to up-buffer. |
| |
| if LOG_BACKEND_RTT_MODE_BLOCK |
| |
| config LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE |
| int "Size of the output buffer" |
| default 16 |
| help |
| Buffer is used by log_output module for preparing output data (e.g. |
| string formatting). |
| |
| config LOG_BACKEND_RTT_RETRY_CNT |
| int "Number of retries" |
| default 4 |
| help |
| Number of TX retries before dropping the data and assuming that |
| RTT session is inactive. |
| |
| config LOG_BACKEND_RTT_RETRY_DELAY_MS |
| int "Delay between TX retries in milliseconds" |
| default 5 |
| help |
| Sleep period between TX retry attempts. During RTT session, host pulls |
| data periodically. Period starts from 1-2 milliseconds and can be |
| increased if traffic on RTT increases (also from host to device). In |
| case of heavy traffic data can be lost and it may be necessary to |
| increase delay or number of retries. |
| |
| endif # LOG_BACKEND_RTT_MODE_BLOCK |
| |
| config LOG_BACKEND_RTT_BUFFER |
| int "Buffer number used for logger output." |
| range 0 SEGGER_RTT_MAX_NUM_UP_BUFFERS |
| default 0 |
| help |
| Select index of up-buffer used for logger output, by default it uses |
| terminal up-buffer and its settings. |
| |
| config LOG_BACKEND_RTT_BUFFER_SIZE |
| int "Size of reserved up-buffer for logger output." |
| default 1024 |
| depends on LOG_BACKEND_RTT_BUFFER > 0 |
| help |
| Specify reserved size of up-buffer used for logger output. |
| |
| # Enable processing of printk calls using log if terminal buffer is used. |
| # Same buffer is used by RTT console. If printk would go through RTT console |
| # that will lead to corruption of RTT data which is not protected against being |
| # interrupted by an interrupt. |
| config LOG_BACKEND_RTT_FORCE_PRINTK |
| bool |
| default y if LOG_BACKEND_RTT_BUFFER = 0 && RTT_CONSOLE |
| select LOG_PRINTK |
| |
| endif # LOG_BACKEND_RTT |
| |
| config LOG_BACKEND_SPINEL |
| bool "Enable OpenThread dedicated Spinel protocol backend" |
| depends on !LOG_BACKEND_UART |
| depends on NET_L2_OPENTHREAD |
| help |
| When enabled, backend will use OpenThread dedicated SPINEL protocol for logging. |
| This protocol is byte oriented and wrapps given messages into serial frames. |
| Backend should be enabled only to OpenThread purposes and when UART backend is disabled |
| or works on antoher UART device to avoid interference. |
| |
| if LOG_BACKEND_SPINEL |
| |
| config LOG_BACKEND_SPINEL_BUFFER_SIZE |
| int "Size of reserved up-buffer for logger output." |
| default 64 |
| help |
| Specify reserved size of up-buffer used for logger output. |
| |
| endif # LOG_BACKEND_SPINEL |
| |
| config LOG_BACKEND_NATIVE_POSIX |
| bool "Enable native backend" |
| depends on ARCH_POSIX |
| help |
| Enable backend in native_posix |
| |
| config LOG_BACKEND_XTENSA_SIM |
| bool "Enable xtensa simulator backend" |
| depends on SOC_XTENSA_SAMPLE_CONTROLLER || SOC_FAMILY_INTEL_ADSP |
| help |
| Enable backend in xtensa simulator |
| |
| config LOG_BACKEND_XTENSA_OUTPUT_BUFFER_SIZE |
| int "Size of the output buffer" |
| default 16 |
| depends on LOG_BACKEND_XTENSA_SIM |
| help |
| Buffer is used by log_output module for preparing output data (e.g. |
| string formatting). |
| |
| # Immediate mode cannot be used with network backend as it would cause the sent |
| # rsyslog message to be malformed. |
| config LOG_BACKEND_NET |
| bool "Enable networking backend" |
| depends on NETWORKING && NET_UDP && !LOG_MODE_IMMEDIATE |
| select NET_CONTEXT_NET_PKT_POOL |
| help |
| Send syslog messages to network server. |
| See RFC 5424 (syslog protocol) and RFC 5426 (syslog over UDP) |
| specifications for details. |
| |
| if LOG_BACKEND_NET |
| |
| config LOG_BACKEND_NET_SERVER |
| string "Syslog server IP address" |
| help |
| This can be either IPv4 or IPv6 address. |
| Server listen UDP port number can be configured here too. |
| Following syntax is supported: |
| 192.0.2.1:514 |
| 192.0.2.42 |
| [2001:db8::1]:514 |
| [2001:db8::2] |
| 2001:db::42 |
| |
| config LOG_BACKEND_NET_MAX_BUF |
| int "How many network buffers to allocate for sending messages" |
| range 3 256 |
| default 3 |
| help |
| Each syslog message should fit into a network packet that will be |
| sent to server. This number tells how many syslog messages can be |
| in transit to the server. |
| |
| config LOG_BACKEND_NET_MAX_BUF_SIZE |
| int "Max syslog message size" |
| range 64 1180 |
| default 1180 if NET_IPV6 |
| default 480 if NET_IPV4 |
| default 256 |
| help |
| As each syslog message needs to fit to UDP packet, set this value |
| so that messages are not truncated. |
| The RFC 5426 recommends that for IPv4 the size is 480 octets and for |
| IPv6 the size is 1180 octets. As each buffer will use RAM, the value |
| should be selected so that typical messages will fit the buffer. |
| |
| config LOG_BACKEND_NET_SYST_ENABLE |
| bool "Enable networking syst backend" |
| depends on LOG_MIPI_SYST_ENABLE |
| help |
| When enabled backend is using networking to output syst format logs. |
| |
| config LOG_BACKEND_NET_AUTOSTART |
| bool "Automatically start networking backend" |
| default y if NET_CONFIG_NEED_IPV4 || NET_CONFIG_NEED_IPV6 |
| help |
| When enabled automatically start the networking backend on |
| application start. If no routes to the logging server are available |
| on application startup, this must be set to n and the backend must be |
| started by the application later on. Otherwise the logging |
| thread might block. |
| |
| endif # LOG_BACKEND_NET |
| |
| config LOG_BACKEND_ADSP |
| bool "Enable Intel ADSP buffer backend" |
| depends on SOC_FAMILY_INTEL_ADSP |
| help |
| Enable backend for the host trace protocol of the Intel ADSP |
| family of audio processors |
| |
| config LOG_BACKEND_FS |
| bool "Enable file system backend" |
| depends on FILE_SYSTEM |
| help |
| When enabled, backend is using the configured file system to output logs. |
| As the file system must be mounted for the logging to work, it must be |
| either configured for auto-mount or manually mounted by the application. |
| Log messages are discarded as long as the file system is not mounted. |
| |
| if LOG_BACKEND_FS |
| |
| config LOG_BACKEND_FS_OUTPUT_DICTIONARY |
| bool |
| depends on LOG2 |
| select LOG_DICTIONARY_SUPPORT |
| help |
| FS backend is in dictionary-based logging output mode. |
| |
| choice LOG_BACKEND_FS_OUTPUT |
| prompt "FS Backend Output Mode" |
| default LOG_BACKEND_FS_OUTPUT_TEXT |
| |
| config LOG_BACKEND_FS_OUTPUT_TEXT |
| bool "Text" |
| help |
| Output in text. |
| |
| config LOG_BACKEND_FS_OUTPUT_DICTIONARY_BIN |
| bool "Dictionary (binary)" |
| depends on LOG2 |
| select LOG_BACKEND_FS_OUTPUT_DICTIONARY |
| help |
| Dictionary-based logging output in binary. |
| |
| endchoice |
| |
| config LOG_BACKEND_FS_OVERWRITE |
| bool "Enable old log files overwrite" |
| default y |
| help |
| When enabled backend overwrites oldest log files. |
| In other case, when memory is full, new messages are dropped. |
| |
| config LOG_BACKEND_FS_FILE_PREFIX |
| string "Log file name prefix" |
| default "log." |
| help |
| User defined name of log files saved in the file system. |
| The prefix is followed by the number of log file. |
| |
| config LOG_BACKEND_FS_DIR |
| string "Log directory" |
| default "/lfs1" |
| help |
| Directory to which log files will be written. |
| |
| config LOG_BACKEND_FS_FILE_SIZE |
| int "User defined log file size" |
| default 4096 |
| range 128 1073741824 |
| help |
| Max log file size (in bytes). |
| |
| config LOG_BACKEND_FS_FILES_LIMIT |
| int "Max number of files containing logs" |
| default 10 |
| help |
| Limit of number of files with logs. It is also limited by |
| size of file system partition. |
| |
| endif # LOG_BACKEND_FS |
| |
| endmenu |