2018-10-04 21:17:00 +08:00
|
|
|
# Kconfig.backends - Shell badckends configuration options
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (c) 2018 Nordic Semiconductor ASA
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
|
|
|
|
menuconfig SHELL_BACKENDS
|
|
|
|
bool "Enable shell backends"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enable shell backends.
|
|
|
|
|
|
|
|
if SHELL_BACKENDS
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL
|
2019-03-22 23:22:24 +08:00
|
|
|
bool "Enable serial backend"
|
2018-10-04 21:17:00 +08:00
|
|
|
default y
|
|
|
|
select SERIAL
|
2018-09-10 15:48:56 +08:00
|
|
|
select RING_BUFFER
|
2018-10-04 21:17:00 +08:00
|
|
|
help
|
2019-03-22 23:22:24 +08:00
|
|
|
Enable serial backend.
|
2018-10-04 21:17:00 +08:00
|
|
|
|
2018-11-16 21:09:31 +08:00
|
|
|
if SHELL_BACKEND_SERIAL
|
|
|
|
|
2019-03-22 23:22:24 +08:00
|
|
|
config SHELL_PROMPT_UART
|
|
|
|
string "Displayed prompt name"
|
|
|
|
default "uart:~$ "
|
|
|
|
help
|
|
|
|
Displayed prompt name for UART backend.
|
|
|
|
|
2019-08-28 22:29:26 +08:00
|
|
|
# Workaround for not being able to have commas in macro arguments
|
|
|
|
DT_CHOSEN_Z_SHELL_UART := zephyr,shell-uart
|
|
|
|
|
2018-11-27 19:11:04 +08:00
|
|
|
config UART_SHELL_ON_DEV_NAME
|
|
|
|
string "Device Name of UART Device for SHELL_BACKEND_SERIAL"
|
2019-09-16 20:54:02 +08:00
|
|
|
default "$(dt_chosen_label,$(DT_CHOSEN_Z_SHELL_UART))" if HAS_DTS
|
2018-11-27 19:11:04 +08:00
|
|
|
default "UART_0"
|
|
|
|
help
|
|
|
|
This option specifies the name of UART device to be used for the
|
|
|
|
SHELL UART backend.
|
|
|
|
|
2018-09-10 15:48:56 +08:00
|
|
|
# Internal config to enable UART interrupts if supported.
|
2018-11-21 16:16:56 +08:00
|
|
|
config SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
|
|
|
|
bool "Interrupt driven"
|
2018-11-28 18:30:25 +08:00
|
|
|
default y
|
2018-09-10 15:48:56 +08:00
|
|
|
depends on SERIAL_SUPPORT_INTERRUPT
|
2018-11-28 18:30:25 +08:00
|
|
|
select UART_INTERRUPT_DRIVEN
|
2018-09-10 15:48:56 +08:00
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE
|
|
|
|
int "Set TX ring buffer size"
|
|
|
|
default 8
|
2018-11-21 16:16:56 +08:00
|
|
|
depends on SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
|
2018-09-10 15:48:56 +08:00
|
|
|
help
|
|
|
|
If UART is utilizing DMA transfers then increasing ring buffer size
|
|
|
|
increases transfers length and reduces number of interrupts.
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE
|
|
|
|
int "Set RX ring buffer size"
|
|
|
|
default 64
|
|
|
|
help
|
|
|
|
RX ring buffer size impacts accepted latency of handling incoming
|
|
|
|
bytes by shell. If shell input is coming from the keyboard then it is
|
|
|
|
usually enough if ring buffer is few bytes (more than one due to
|
|
|
|
escape sequences). However, if bulk data is transferred it may be
|
|
|
|
required to increase it.
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_RX_POLL_PERIOD
|
|
|
|
int "RX polling period (in milliseconds)"
|
|
|
|
default 10
|
2018-11-21 16:16:56 +08:00
|
|
|
depends on !SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
|
2018-09-10 15:48:56 +08:00
|
|
|
help
|
|
|
|
Determines how often UART is polled for RX byte.
|
|
|
|
|
2018-12-17 17:43:58 +08:00
|
|
|
module = SHELL_BACKEND_SERIAL
|
|
|
|
default-timeout = 100
|
|
|
|
source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
|
|
|
|
|
|
|
|
default-size = 10
|
|
|
|
source "subsys/shell/Kconfig.template.shell_log_queue_size"
|
|
|
|
|
2018-11-16 21:09:31 +08:00
|
|
|
choice
|
|
|
|
prompt "Initial log level limit"
|
|
|
|
default SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
|
|
|
|
bool "System limit (LOG_MAX_LEVEL)"
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_DBG
|
|
|
|
bool "Debug"
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_INF
|
|
|
|
bool "Info"
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_WRN
|
|
|
|
bool "Warning"
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_ERR
|
|
|
|
bool "Error"
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL_NONE
|
|
|
|
bool "None"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config SHELL_BACKEND_SERIAL_LOG_LEVEL
|
|
|
|
int
|
|
|
|
default 0 if SHELL_BACKEND_SERIAL_LOG_LEVEL_NONE
|
|
|
|
default 1 if SHELL_BACKEND_SERIAL_LOG_LEVEL_ERR
|
|
|
|
default 2 if SHELL_BACKEND_SERIAL_LOG_LEVEL_WRN
|
|
|
|
default 3 if SHELL_BACKEND_SERIAL_LOG_LEVEL_INF
|
|
|
|
default 4 if SHELL_BACKEND_SERIAL_LOG_LEVEL_DBG
|
|
|
|
default 5 if SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
|
|
|
|
|
2018-09-10 15:48:56 +08:00
|
|
|
endif #SHELL_BACKEND_SERIAL
|
|
|
|
|
2018-10-19 15:37:47 +08:00
|
|
|
config SHELL_BACKEND_RTT
|
2019-03-22 23:22:24 +08:00
|
|
|
bool "Enable RTT backend"
|
2018-11-16 21:09:31 +08:00
|
|
|
select USE_SEGGER_RTT
|
2018-10-19 15:37:47 +08:00
|
|
|
select RTT_CONSOLE
|
|
|
|
help
|
|
|
|
Enable RTT backend.
|
|
|
|
|
2018-11-16 21:09:31 +08:00
|
|
|
if SHELL_BACKEND_RTT
|
|
|
|
|
2019-03-22 23:22:24 +08:00
|
|
|
config SHELL_PROMPT_RTT
|
|
|
|
string "Displayed prompt name"
|
|
|
|
default "rtt:~$ "
|
|
|
|
help
|
|
|
|
Displayed prompt name for RTT backend.
|
|
|
|
|
2018-11-28 21:06:40 +08:00
|
|
|
config SHELL_RTT_RX_POLL_PERIOD
|
|
|
|
int "RX polling period (in milliseconds)"
|
|
|
|
default 10
|
|
|
|
help
|
|
|
|
Determines how often RTT is polled for RX byte.
|
|
|
|
|
2018-12-17 17:43:58 +08:00
|
|
|
module = SHELL_BACKEND_RTT
|
|
|
|
default-timeout = 100
|
|
|
|
source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
|
|
|
|
|
|
|
|
default-size = 10
|
|
|
|
source "subsys/shell/Kconfig.template.shell_log_queue_size"
|
|
|
|
|
2018-11-16 21:09:31 +08:00
|
|
|
choice
|
|
|
|
prompt "Initial log level limit"
|
2018-11-28 21:06:40 +08:00
|
|
|
default SHELL_RTT_INIT_LOG_LEVEL_DEFAULT
|
2018-11-16 21:09:31 +08:00
|
|
|
|
2018-11-28 21:06:40 +08:00
|
|
|
config SHELL_RTT_INIT_LOG_LEVEL_DEFAULT
|
2018-11-16 21:09:31 +08:00
|
|
|
bool "System limit (LOG_MAX_LEVEL)"
|
|
|
|
|
2018-11-28 21:06:40 +08:00
|
|
|
config SHELL_RTT_INIT_LOG_LEVEL_DBG
|
2018-11-16 21:09:31 +08:00
|
|
|
bool "Debug"
|
|
|
|
|
2018-11-28 21:06:40 +08:00
|
|
|
config SHELL_RTT_INIT_LOG_LEVEL_INF
|
2018-11-16 21:09:31 +08:00
|
|
|
bool "Info"
|
|
|
|
|
2018-11-28 21:06:40 +08:00
|
|
|
config SHELL_RTT_INIT_LOG_LEVEL_WRN
|
2018-11-16 21:09:31 +08:00
|
|
|
bool "Warning"
|
|
|
|
|
2018-11-28 21:06:40 +08:00
|
|
|
config SHELL_RTT_INIT_LOG_LEVEL_ERR
|
2018-11-16 21:09:31 +08:00
|
|
|
bool "Error"
|
|
|
|
|
2018-11-28 21:06:40 +08:00
|
|
|
config SHELL_RTT_INIT_LOG_LEVEL_NONE
|
2018-11-16 21:09:31 +08:00
|
|
|
bool "None"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2018-11-28 21:06:40 +08:00
|
|
|
config SHELL_RTT_INIT_LOG_LEVEL
|
2018-11-16 21:09:31 +08:00
|
|
|
int
|
2018-11-28 21:06:40 +08:00
|
|
|
default 0 if SHELL_RTT_INIT_LOG_LEVEL_NONE
|
|
|
|
default 1 if SHELL_RTT_INIT_LOG_LEVEL_ERR
|
|
|
|
default 2 if SHELL_RTT_INIT_LOG_LEVEL_WRN
|
|
|
|
default 3 if SHELL_RTT_INIT_LOG_LEVEL_INF
|
|
|
|
default 4 if SHELL_RTT_INIT_LOG_LEVEL_DBG
|
|
|
|
default 5 if SHELL_RTT_INIT_LOG_LEVEL_DEFAULT
|
|
|
|
|
|
|
|
module = SHELL_RTT
|
|
|
|
module-str = RTT shell backend
|
|
|
|
source "subsys/logging/Kconfig.template.log_config"
|
2018-11-16 21:09:31 +08:00
|
|
|
|
|
|
|
endif #SHELL_BACKEND_RTT
|
|
|
|
|
2019-03-28 18:54:14 +08:00
|
|
|
config SHELL_BACKEND_TELNET
|
|
|
|
bool "Enable TELNET backend."
|
|
|
|
depends on NET_TCP
|
|
|
|
depends on NET_IPV4 || NET_IPV6
|
|
|
|
help
|
|
|
|
Enable TELNET backend.
|
|
|
|
|
|
|
|
if SHELL_BACKEND_TELNET
|
|
|
|
|
2019-03-22 23:22:24 +08:00
|
|
|
config SHELL_PROMPT_TELNET
|
|
|
|
string "Displayed prompt name"
|
|
|
|
default "~$ "
|
|
|
|
help
|
|
|
|
Displayed prompt name for TELNET backend.
|
|
|
|
|
2019-03-28 18:54:14 +08:00
|
|
|
config SHELL_TELNET_PORT
|
|
|
|
int "Telnet port number"
|
|
|
|
default 23
|
|
|
|
help
|
|
|
|
This option is used to configure on which port telnet is going
|
|
|
|
to be bound.
|
|
|
|
|
|
|
|
config SHELL_TELNET_LINE_BUF_SIZE
|
|
|
|
int "Telnet line buffer size"
|
|
|
|
default 80
|
|
|
|
help
|
|
|
|
This option can be used to modify the size of the buffer storing
|
|
|
|
shell output line, prior to sending it through the network.
|
|
|
|
Of course an output line can be longer than such size, it just
|
|
|
|
means sending it will start as soon as it reaches this size.
|
|
|
|
It really depends on what type of output is expected.
|
|
|
|
A lot of short lines: better reduce this value. On the contrary,
|
|
|
|
raise it.
|
|
|
|
|
|
|
|
config SHELL_TELNET_SEND_TIMEOUT
|
|
|
|
int "Telnet line send timeout"
|
|
|
|
default 100
|
|
|
|
help
|
|
|
|
This option can be used to modify the duration of the timer that kick
|
|
|
|
in when a line buffer is not empty but did not yet meet the line feed.
|
|
|
|
|
|
|
|
config SHELL_TELNET_SUPPORT_COMMAND
|
|
|
|
bool "Add support for telnet commands (IAC) [Experimental]"
|
|
|
|
help
|
|
|
|
Current support is so limited it's not interesting to enable it.
|
|
|
|
However, if proven to be needed at some point, it will be possible
|
|
|
|
to extend such support.
|
|
|
|
|
|
|
|
module = SHELL_TELNET
|
|
|
|
default-timeout = 100
|
|
|
|
source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
|
|
|
|
|
|
|
|
default-size = 10
|
|
|
|
source "subsys/shell/Kconfig.template.shell_log_queue_size"
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Initial log level limit"
|
|
|
|
default SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
|
|
|
|
|
|
|
|
config SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
|
|
|
|
bool "System limit (LOG_MAX_LEVEL)"
|
|
|
|
|
|
|
|
config SHELL_TELNET_INIT_LOG_LEVEL_DBG
|
|
|
|
bool "Debug"
|
|
|
|
|
|
|
|
config SHELL_TELNET_INIT_LOG_LEVEL_INF
|
|
|
|
bool "Info"
|
|
|
|
|
|
|
|
config SHELL_TELNET_INIT_LOG_LEVEL_WRN
|
|
|
|
bool "Warning"
|
|
|
|
|
|
|
|
config SHELL_TELNET_INIT_LOG_LEVEL_ERR
|
|
|
|
bool "Error"
|
|
|
|
|
|
|
|
config SHELL_TELNET_INIT_LOG_LEVEL_NONE
|
|
|
|
bool "None"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config SHELL_TELNET_INIT_LOG_LEVEL
|
|
|
|
int
|
|
|
|
default 0 if SHELL_TELNET_INIT_LOG_LEVEL_NONE
|
|
|
|
default 1 if SHELL_TELNET_INIT_LOG_LEVEL_ERR
|
|
|
|
default 2 if SHELL_TELNET_INIT_LOG_LEVEL_WRN
|
|
|
|
default 3 if SHELL_TELNET_INIT_LOG_LEVEL_INF
|
|
|
|
default 4 if SHELL_TELNET_INIT_LOG_LEVEL_DBG
|
|
|
|
default 5 if SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
|
|
|
|
|
|
|
|
module = SHELL_TELNET
|
|
|
|
module-str = TELNET shell backend
|
|
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
|
|
|
|
endif # SHELL_TELNET_BACKEND
|
|
|
|
|
2018-10-02 20:47:20 +08:00
|
|
|
config SHELL_BACKEND_DUMMY
|
|
|
|
bool "Enable dummy backend."
|
|
|
|
help
|
2018-10-17 18:16:06 +08:00
|
|
|
Enable dummy backend which can be used to execute commands with no
|
|
|
|
need for physical transport interface.
|
2018-10-02 20:47:20 +08:00
|
|
|
|
2019-03-22 23:22:24 +08:00
|
|
|
config SHELL_PROMPT_DUMMY
|
|
|
|
string "Displayed prompt name"
|
|
|
|
depends on SHELL_BACKEND_DUMMY
|
|
|
|
default "~$ "
|
|
|
|
help
|
|
|
|
Displayed prompt name for DUMMY backend.
|
|
|
|
|
2018-10-04 21:17:00 +08:00
|
|
|
endif # SHELL_BACKENDS
|