2015-05-21 00:40:39 +08:00
|
|
|
# Kconfig - console driver configuration options
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
2017-01-25 05:03:19 +08:00
|
|
|
# Copyright (c) 2016 Cadence Design Systems, Inc.
|
2015-05-21 00:40:39 +08:00
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2015-05-21 00:40:39 +08:00
|
|
|
#
|
|
|
|
|
2015-08-13 01:33:56 +08:00
|
|
|
menuconfig CONSOLE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Console drivers"
|
2015-08-13 01:33:56 +08:00
|
|
|
|
|
|
|
if CONSOLE
|
|
|
|
|
2017-01-24 17:01:05 +08:00
|
|
|
config CONSOLE_INPUT_MAX_LINE_LEN
|
|
|
|
int "Console maximum input line length"
|
|
|
|
default 128
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This option can be used to modify the maximum length a console input
|
|
|
|
can be.
|
2017-01-24 17:01:05 +08:00
|
|
|
|
2015-09-19 01:15:51 +08:00
|
|
|
config CONSOLE_HAS_DRIVER
|
|
|
|
bool
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This is an option to be enabled by console drivers to signal
|
|
|
|
that some kind of console exists.
|
2015-09-19 01:15:51 +08:00
|
|
|
|
2015-05-05 23:12:02 +08:00
|
|
|
config CONSOLE_HANDLER
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Enable console input handler"
|
2015-10-15 14:57:42 +08:00
|
|
|
depends on UART_CONSOLE
|
2015-05-05 23:12:02 +08:00
|
|
|
select UART_INTERRUPT_DRIVEN
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This option enables console input handler allowing to write simple
|
|
|
|
interaction between serial console and the OS.
|
2015-06-27 00:14:02 +08:00
|
|
|
|
2015-08-13 01:33:56 +08:00
|
|
|
config UART_CONSOLE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use UART for console"
|
2015-08-13 01:33:56 +08:00
|
|
|
depends on SERIAL && SERIAL_HAS_DRIVER
|
2015-09-19 01:15:51 +08:00
|
|
|
select CONSOLE_HAS_DRIVER
|
2015-08-13 01:33:56 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enable this option to use one UART for console. Make sure
|
|
|
|
CONFIG_UART_CONSOLE_ON_DEV_NAME is also set correctly.
|
2015-08-13 01:33:56 +08:00
|
|
|
|
2017-07-08 00:05:05 +08:00
|
|
|
if !HAS_DTS
|
2015-12-02 00:42:20 +08:00
|
|
|
config UART_CONSOLE_ON_DEV_NAME
|
|
|
|
string "Device Name of UART Device for UART Console"
|
|
|
|
default "UART_0"
|
2015-08-13 01:33:56 +08:00
|
|
|
depends on UART_CONSOLE
|
2015-06-27 00:14:02 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This option specifies the name of UART device to be used for
|
|
|
|
UART console.
|
2017-07-08 00:05:05 +08:00
|
|
|
endif
|
2015-08-13 01:33:56 +08:00
|
|
|
|
2016-03-29 05:05:33 +08:00
|
|
|
config UART_CONSOLE_INIT_PRIORITY
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Init priority"
|
2015-12-19 21:23:50 +08:00
|
|
|
default 60
|
2015-10-27 03:56:02 +08:00
|
|
|
depends on UART_CONSOLE
|
|
|
|
help
|
|
|
|
Device driver initialization priority.
|
|
|
|
Console has to be initialized after the UART driver
|
|
|
|
it uses.
|
|
|
|
|
2016-04-12 05:11:28 +08:00
|
|
|
config UART_CONSOLE_DEBUG_SERVER_HOOKS
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Debug server hooks in debug console"
|
2016-04-12 05:11:28 +08:00
|
|
|
depends on UART_CONSOLE
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This option allows a debug server agent such as GDB to take over the
|
|
|
|
handling of traffic that goes through the console logic. The debug
|
|
|
|
server looks at characters received and decides to handle them itself if
|
|
|
|
they are some sort of control characters, or let the regular console
|
|
|
|
code handle them if they are of no special significance to it.
|
2016-04-12 05:11:28 +08:00
|
|
|
|
2018-01-18 10:01:52 +08:00
|
|
|
config UART_CONSOLE_MCUMGR
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Enable UART console mcumgr passthrough"
|
2018-01-18 10:01:52 +08:00
|
|
|
depends on UART_CONSOLE
|
|
|
|
help
|
|
|
|
Enables the UART console to receive mcumgr frames for image upgrade
|
|
|
|
and device management. When enabled, the UART console does not
|
|
|
|
process mcumgr frames, but it hands them up to a higher level module
|
|
|
|
(e.g., the shell). If unset, incoming mcumgr frames are dropped.
|
|
|
|
|
2016-11-07 08:58:14 +08:00
|
|
|
config USB_UART_CONSOLE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use USB port for console outputs"
|
2016-11-07 08:58:14 +08:00
|
|
|
depends on SERIAL
|
|
|
|
select CONSOLE_HAS_DRIVER
|
|
|
|
select USB_CDC_ACM
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enable this option to use the USB UART for console output. The output
|
|
|
|
can be viewed from the USB host via /dev/ttyACM* port. Note that console
|
|
|
|
inputs from the USB UART are not functional yet. Also since the USB
|
|
|
|
layer currently doesn't support multiple interfaces, this shouldn't be
|
2017-12-28 21:40:21 +08:00
|
|
|
selected in conjunction with, say, USB Mass Storage.
|
2016-11-07 08:58:14 +08:00
|
|
|
|
2017-04-20 16:33:36 +08:00
|
|
|
config USB_UART_DTR_WAIT
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Wait on DTR control signal"
|
2017-04-20 16:33:36 +08:00
|
|
|
depends on USB_UART_CONSOLE
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enable this option to use flow control on the console. The uart console
|
|
|
|
waits until the DTR is asserted by the host.
|
|
|
|
Note: Disabling this might lead to missing console prints.
|
2017-04-20 16:33:36 +08:00
|
|
|
|
2015-09-19 00:57:13 +08:00
|
|
|
config RAM_CONSOLE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use RAM console"
|
2015-09-19 01:15:51 +08:00
|
|
|
select CONSOLE_HAS_DRIVER
|
2015-09-19 00:57:13 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Emit console messages to a RAM buffer "ram_console" which can
|
|
|
|
be examined at runtime with a debugger. Useful in board bring-up
|
|
|
|
if there aren't any working serial drivers.
|
2015-09-19 00:57:13 +08:00
|
|
|
|
|
|
|
config RAM_CONSOLE_BUFFER_SIZE
|
|
|
|
int "Ram Console buffer size"
|
|
|
|
default 1024
|
|
|
|
depends on RAM_CONSOLE
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Size of the RAM console buffer. Messages will wrap around if the
|
|
|
|
length is exceeded.
|
2015-09-19 00:57:13 +08:00
|
|
|
|
2016-11-22 22:33:46 +08:00
|
|
|
config RTT_CONSOLE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use RTT console"
|
2016-11-22 22:33:46 +08:00
|
|
|
depends on HAS_SEGGER_RTT
|
|
|
|
select CONSOLE_HAS_DRIVER
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Emit console messages to a RAM buffer that is then read by the
|
|
|
|
Segger J-Link software and displayed on a computer in real-time.
|
|
|
|
Requires support for Segger J-Link on the companion IC onboard.
|
2016-11-22 22:33:46 +08:00
|
|
|
|
2018-06-01 13:30:57 +08:00
|
|
|
if RTT_CONSOLE
|
|
|
|
|
|
|
|
config RTT_TX_RETRY_CNT
|
|
|
|
int "Number of TX retries"
|
|
|
|
default 2
|
|
|
|
help
|
|
|
|
Number of TX retries before dropping the byte and assuming that
|
|
|
|
RTT session is inactive.
|
|
|
|
|
|
|
|
config RTT_TX_RETRY_DELAY_MS
|
|
|
|
int "Delay between TX retries in milliseconds"
|
|
|
|
default 2
|
|
|
|
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.
|
|
|
|
|
|
|
|
config RTT_TX_RETRY_IN_INTERRUPT
|
|
|
|
bool "Busy wait in the interrupt context for TX retry"
|
|
|
|
help
|
|
|
|
If enabled RTT console will busy wait between TX retries when console
|
|
|
|
assumes that RTT session is active. In case of heavy traffic data can
|
|
|
|
be lost and it may be necessary to increase delay or number of
|
|
|
|
retries.
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2015-11-13 06:00:47 +08:00
|
|
|
config IPM_CONSOLE_SENDER
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Inter-processor Mailbox console sender"
|
2015-09-22 04:57:40 +08:00
|
|
|
select CONSOLE_HAS_DRIVER
|
2015-09-11 04:26:27 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enable the sending side of IPM console
|
2015-09-11 04:26:27 +08:00
|
|
|
|
2015-11-13 06:00:47 +08:00
|
|
|
config IPM_CONSOLE_RECEIVER
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Inter-processor Mailbox console receiver"
|
2015-09-11 04:26:27 +08:00
|
|
|
select RING_BUFFER
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enable the receiving side of IPM console
|
2015-09-11 04:26:27 +08:00
|
|
|
|
2017-03-01 05:45:46 +08:00
|
|
|
config IPM_CONSOLE_STACK_SIZE
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Stack size for IPM console receiver thread"
|
2017-03-01 05:45:46 +08:00
|
|
|
depends on IPM_CONSOLE_RECEIVER
|
|
|
|
default 512
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Each instance of the IPM console receiver driver creates a worker
|
|
|
|
thread to print out incoming messages from the remote CPU. Specify the
|
|
|
|
stack size for these threads here.
|
2017-03-01 05:45:46 +08:00
|
|
|
|
2016-03-29 05:05:33 +08:00
|
|
|
config IPM_CONSOLE_INIT_PRIORITY
|
2018-08-14 22:19:20 +08:00
|
|
|
int "IPM console init priority"
|
2015-10-27 03:56:02 +08:00
|
|
|
default 60
|
2015-11-13 06:00:47 +08:00
|
|
|
depends on IPM_CONSOLE_SENDER || IPM_CONSOLE_RECEIVER
|
2015-10-27 03:56:02 +08:00
|
|
|
help
|
|
|
|
Device driver initialization priority.
|
2015-11-13 06:00:47 +08:00
|
|
|
Console has to be initialized after the IPM subsystem
|
2015-10-27 03:56:02 +08:00
|
|
|
it uses.
|
|
|
|
|
2015-11-25 15:11:30 +08:00
|
|
|
config UART_PIPE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Enable pipe UART driver"
|
2015-11-25 15:11:30 +08:00
|
|
|
select UART_INTERRUPT_DRIVEN
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enable pipe UART driver. This driver allows application to communicate
|
|
|
|
over UART with custom defined protocol. Driver doesn't inspect received
|
|
|
|
data (as contrary to console UART driver) and all aspects of received
|
|
|
|
protocol data are handled by application provided callback.
|
2015-11-25 15:11:30 +08:00
|
|
|
|
2017-07-12 22:22:00 +08:00
|
|
|
if !HAS_DTS
|
2016-05-25 07:17:13 +08:00
|
|
|
config UART_PIPE_ON_DEV_NAME
|
2015-12-02 00:42:20 +08:00
|
|
|
string "Device Name of UART Device for pipe UART"
|
|
|
|
default "UART_0"
|
|
|
|
depends on UART_PIPE
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This option specifies the name of UART device to be used
|
|
|
|
for pipe UART.
|
2017-07-12 22:22:00 +08:00
|
|
|
endif
|
2015-12-02 00:42:20 +08:00
|
|
|
|
2018-01-18 10:01:52 +08:00
|
|
|
config UART_MCUMGR
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Enable mcumgr UART driver"
|
2018-01-18 10:01:52 +08:00
|
|
|
select UART_INTERRUPT_DRIVEN
|
|
|
|
help
|
|
|
|
Enable the mcumgr UART driver. This driver allows the application to
|
|
|
|
communicate over UART using the mcumgr protocol for image upgrade and
|
|
|
|
device management. The driver doesn't inspect received data (as
|
|
|
|
contrary to console UART driver) and all aspects of received protocol
|
|
|
|
data are handled by an application provided callback.
|
|
|
|
|
|
|
|
if UART_MCUMGR
|
|
|
|
if !HAS_DTS
|
|
|
|
config UART_MCUMGR_ON_DEV_NAME
|
|
|
|
string "Device Name of UART Device for mcumgr UART"
|
|
|
|
default "UART_0"
|
|
|
|
depends on UART_MCUMGR
|
|
|
|
help
|
|
|
|
This option specifies the name of UART device to be used
|
|
|
|
for mcumgr UART.
|
|
|
|
endif # !HAS_DTS
|
|
|
|
|
|
|
|
config UART_MCUMGR_RX_BUF_SIZE
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Size of receive buffer for mcumgr fragments received over UART, in bytes"
|
2018-01-18 10:01:52 +08:00
|
|
|
default 128
|
|
|
|
help
|
|
|
|
Specifies the size of the mcumgr UART receive buffer, in bytes. This
|
|
|
|
value must be large enough to accommodate any line sent by an mcumgr
|
|
|
|
client.
|
|
|
|
|
|
|
|
config UART_MCUMGR_RX_BUF_COUNT
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Number of receive buffers for mcumgr fragments received over UART"
|
2018-01-18 10:01:52 +08:00
|
|
|
default 2
|
|
|
|
help
|
|
|
|
Specifies the number of the mcumgr UART receive buffers. Receive
|
|
|
|
buffers hold received mcumgr fragments prior to reassembly. This
|
|
|
|
setting's value must satisfy the following relation:
|
|
|
|
UART_MCUMGR_RX_BUF_COUNT * UART_MCUMGR_RX_BUF_SIZE >=
|
|
|
|
MCUMGR_SMP_UART_MTU
|
|
|
|
|
|
|
|
endif # UART_MCUMGR
|
|
|
|
|
2017-01-25 05:03:19 +08:00
|
|
|
config XTENSA_SIM_CONSOLE
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Use Xtensa simulator console"
|
2017-01-25 05:03:19 +08:00
|
|
|
depends on SIMULATOR_XTENSA
|
|
|
|
select CONSOLE_HAS_DRIVER
|
|
|
|
default y
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Use simulator console to print messages.
|
2017-01-20 16:08:35 +08:00
|
|
|
|
2017-12-21 21:14:19 +08:00
|
|
|
config NATIVE_POSIX_CONSOLE
|
2018-08-01 18:45:49 +08:00
|
|
|
bool "Use the host terminal for console"
|
2018-01-24 23:46:15 +08:00
|
|
|
depends on ARCH_POSIX
|
2017-12-21 21:14:19 +08:00
|
|
|
select CONSOLE_HAS_DRIVER
|
|
|
|
help
|
2018-08-01 18:45:49 +08:00
|
|
|
Use the host terminal (where the native_posix binary was launched) for the
|
|
|
|
Zephyr console
|
2018-01-24 23:46:15 +08:00
|
|
|
|
|
|
|
config NATIVE_POSIX_STDIN_CONSOLE
|
2018-08-01 18:45:49 +08:00
|
|
|
bool "Use the host terminal stdin"
|
2018-01-24 23:46:15 +08:00
|
|
|
depends on NATIVE_POSIX_CONSOLE
|
2018-09-23 01:19:59 +08:00
|
|
|
default y if !NATIVE_UART_0_ON_STDINOUT
|
2018-01-24 23:46:15 +08:00
|
|
|
help
|
2018-08-01 18:45:49 +08:00
|
|
|
Feed the host terminal stdin to the Zephyr console/shell.
|
2018-01-24 23:46:15 +08:00
|
|
|
|
|
|
|
config NATIVE_STDIN_POLL_PERIOD
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Polling period for stdin"
|
2018-01-24 23:46:15 +08:00
|
|
|
depends on NATIVE_POSIX_STDIN_CONSOLE
|
|
|
|
default 20
|
|
|
|
help
|
|
|
|
In ms, polling period for stdin
|
|
|
|
|
|
|
|
config NATIVE_STDIN_PRIO
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Priority of the stdin polling thread"
|
2018-01-24 23:46:15 +08:00
|
|
|
depends on NATIVE_POSIX_STDIN_CONSOLE
|
|
|
|
default 4
|
|
|
|
help
|
2018-02-08 03:19:32 +08:00
|
|
|
Priority of the native stdin polling thread
|
2018-01-24 23:46:15 +08:00
|
|
|
|
|
|
|
config NATIVE_POSIX_STDOUT_CONSOLE
|
2018-08-01 18:45:49 +08:00
|
|
|
bool "Print to the host terminal stdout"
|
2018-01-24 23:46:15 +08:00
|
|
|
depends on NATIVE_POSIX_CONSOLE
|
|
|
|
default y
|
|
|
|
help
|
2018-08-01 18:45:49 +08:00
|
|
|
Zephyr's printk messages will be directed to the host terminal stdout.
|
2017-12-21 21:14:19 +08:00
|
|
|
|
2017-01-25 05:03:19 +08:00
|
|
|
config XTENSA_CONSOLE_INIT_PRIORITY
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Init priority"
|
2017-01-25 05:03:19 +08:00
|
|
|
default 60
|
|
|
|
depends on XTENSA_SIM_CONSOLE
|
|
|
|
help
|
|
|
|
Device driver initialization priority.
|
|
|
|
|
2017-12-21 21:14:19 +08:00
|
|
|
config NATIVE_POSIX_CONSOLE_INIT_PRIORITY
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Init priority"
|
2017-12-21 21:14:19 +08:00
|
|
|
default 60
|
|
|
|
depends on NATIVE_POSIX_CONSOLE
|
|
|
|
help
|
|
|
|
Device driver initialization priority.
|
|
|
|
|
2017-01-25 05:03:19 +08:00
|
|
|
source "drivers/console/Kconfig.telnet"
|
2017-08-31 17:28:40 +08:00
|
|
|
source "drivers/console/Kconfig.ws"
|
2015-08-13 01:33:56 +08:00
|
|
|
endif
|