Added functionality to enable active shell backends via Kconfig file. When there will be more backends implemented user will have an option to select only required ones. It is no longer needed to select SERIAL in prj.conf. Fixes #10190 Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
189 lines
4.2 KiB
Plaintext
189 lines
4.2 KiB
Plaintext
# Kconfig - Shell configuration options
|
|
|
|
#
|
|
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
|
# Copyright (c) 2016 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
menu "Shell Options"
|
|
|
|
menuconfig CONSOLE_SHELL
|
|
bool "Enable legacy shell [ Experimental ]"
|
|
select CONSOLE_HANDLER
|
|
select CONSOLE_SUBSYS
|
|
help
|
|
Shell implementation based on CONSOLE_HANDLER.
|
|
|
|
|
|
if CONSOLE_SHELL
|
|
|
|
config CONSOLE_SHELL_STACKSIZE
|
|
int "Console handler shell stack size"
|
|
default 2000
|
|
help
|
|
Stack size for the console handler shell.
|
|
|
|
config CONSOLE_SHELL_MAX_CMD_QUEUED
|
|
int "Shell's command queue size"
|
|
default 3
|
|
help
|
|
Maximum size of the queue for input commands.
|
|
|
|
|
|
endif
|
|
|
|
menuconfig SHELL
|
|
bool "Enable shell"
|
|
select LOG_RUNTIME_FILTERING
|
|
select POLL
|
|
|
|
if SHELL
|
|
|
|
module = SHELL
|
|
module-str = Shell
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
source "subsys/shell/Kconfig.backends"
|
|
|
|
config SHELL_STACK_SIZE
|
|
int "Shell thread stack size"
|
|
default 2048 if MULTITHREADING
|
|
default 0 if !MULTITHREADING
|
|
help
|
|
Stack size for thread created for each instance.
|
|
|
|
config SHELL_THREAD_PRIO
|
|
int "Shell thread priority"
|
|
depends on MULTITHREADING
|
|
default -2
|
|
help
|
|
Shell thread priority.
|
|
|
|
config SHELL_BACKSPACE_MODE_DELETE
|
|
bool "Default escape code for backspace is DELETE (0x7F)"
|
|
default y
|
|
help
|
|
Terminals have different escape code settings for backspace button.
|
|
Some terminals send code: 0x08 (backspace) other 0x7F (delete). When
|
|
this option is set shell will expect 0x7F for backspace key.
|
|
|
|
config SHELL_PROMPT_LENGTH
|
|
int "Maximum prompt length"
|
|
default 16
|
|
help
|
|
Maximum length of prompt name in bytes.
|
|
|
|
config SHELL_CMD_BUFF_SIZE
|
|
int "Shell command buffer size"
|
|
default 256
|
|
help
|
|
Maximum command size.
|
|
|
|
config SHELL_PRINTF_BUFF_SIZE
|
|
int "Shell print buffer size"
|
|
default 30
|
|
help
|
|
Maximum text buffer size for fprintf function.
|
|
It is working like stdio buffering in Linux systems
|
|
to limit number of peripheral access calls.
|
|
|
|
config SHELL_ARGC_MAX
|
|
int "Maximum arguments in shell command"
|
|
default 12
|
|
help
|
|
Maximum number of arguments that can build a command.
|
|
If command is composed of more than defined, argument SHELL_ARGC_MAX
|
|
and following are passed as one argument in the string.
|
|
|
|
config SHELL_WILDCARD
|
|
bool "Enable wildcard support in shell"
|
|
select FNMATCH
|
|
help
|
|
Enables using * in shell.
|
|
|
|
config SHELL_ECHO_STATUS
|
|
bool "Enable echo on shell"
|
|
default y
|
|
help
|
|
If enabled shell prints back every input byte.
|
|
|
|
config SHELL_VT100_COLORS
|
|
bool "Enable colors in shell"
|
|
default y
|
|
help
|
|
If enabled VT100 colors are used in shell (e.g. print errors in red).
|
|
|
|
config SHELL_METAKEYS
|
|
bool "Enable metakeys"
|
|
default y
|
|
help
|
|
Enables shell metakeys: Home, End, ctrl+a, ctrl+c, ctrl+e, ctrl+l,
|
|
ctrl+u, ctrl+w
|
|
|
|
config SHELL_HELP
|
|
bool "Enable help message"
|
|
default y
|
|
help
|
|
Enables formatting help message when requested with '-h' or '--help'.
|
|
|
|
config SHELL_HELP_ON_WRONG_ARGUMENT_COUNT
|
|
bool "Enable printing help on wrong argument count"
|
|
depends on SHELL_HELP
|
|
default y
|
|
|
|
config SHELL_HISTORY
|
|
bool "Enable history in shell"
|
|
default y
|
|
help
|
|
Enable commands history. History can be accessed using up and down
|
|
arrows
|
|
|
|
if SHELL_HISTORY
|
|
|
|
config SHELL_HISTORY_BUFFER
|
|
int "History buffer in bytes"
|
|
default 1024
|
|
help
|
|
Number of bytes dedicated for storing executed commands.
|
|
|
|
endif #SHELL_HISTORY
|
|
|
|
config SHELL_MAX_LOG_MSG_BUFFERED
|
|
int "Maximal number of log messages in FIFO"
|
|
default 8
|
|
help
|
|
When amount of buffered log messages exceeds this threshold oldest
|
|
messages are discarded.
|
|
|
|
config SHELL_STATS
|
|
bool "Enable shell statistics"
|
|
default y
|
|
|
|
config SHELL_CMDS
|
|
bool "Enable built-in commands"
|
|
default y
|
|
help
|
|
Enable built-in commands like 'clear', 'history', etc.
|
|
|
|
config SHELL_CMDS_RESIZE
|
|
bool "Enable resize command"
|
|
depends on SHELL_CMDS
|
|
default y
|
|
help
|
|
By default shell assumes width of a terminal screen set to 80
|
|
characters. Each time terminal screen width is changed resize command
|
|
must be called to ensure correct text display on the terminal screen.
|
|
Resize command can be turned off to safe code memory (~0,5k).
|
|
|
|
config SHELL_LOG_BACKEND
|
|
bool
|
|
default y if LOG
|
|
default n if !LOG
|
|
|
|
source "subsys/shell/modules/Kconfig"
|
|
|
|
endif #SHELL
|
|
endmenu
|
|
|