| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 | 
							- # Console driver configuration options
 
- # Copyright (c) 2014-2015 Wind River Systems, Inc.
 
- # Copyright (c) 2016 Cadence Design Systems, Inc.
 
- # SPDX-License-Identifier: Apache-2.0
 
- # Setting shared by different subsystems
 
- # Workaround for not being able to have commas in macro arguments
 
- DT_CHOSEN_Z_CONSOLE := zephyr,console
 
- config UART_CONSOLE_ON_DEV_NAME
 
- 	string "Device Name of UART Device for UART Console"
 
- 	default "$(dt_chosen_label,$(DT_CHOSEN_Z_CONSOLE))" if HAS_DTS
 
- 	default "UART_0"
 
- 	depends on (UART_CONSOLE || CONSOLE_SUBSYS)
 
- 	help
 
- 	  This option specifies the name of UART device to be used for
 
- 	  UART console.
 
- 	  
 
- config UART_DC5V_ON_DEV_NAME
 
- 	string "Device Name of UART Device for DC5V Communication"
 
- 	default "UART_2"
 
- 	help
 
- 	  This option specifies the name of UART device to be used for
 
- 	  DC5V Uart.	  
 
- menuconfig CONSOLE
 
- 	bool "Console drivers"
 
- if CONSOLE
 
- config CONSOLE_INPUT_MAX_LINE_LEN
 
- 	int "Console maximum input line length"
 
- 	default 128
 
- 	help
 
- 	  This option can be used to modify the maximum length a console input
 
- 	  can be.
 
- config CONSOLE_HAS_DRIVER
 
- 	bool
 
- 	help
 
- 	  This is an option to be enabled by console drivers to signal
 
- 	  that some kind of console exists.
 
- config CONSOLE_HANDLER
 
- 	bool "Enable console input handler"
 
- 	depends on UART_CONSOLE && SERIAL_SUPPORT_INTERRUPT
 
- 	select UART_INTERRUPT_DRIVEN
 
- 	help
 
- 	  This option enables console input handler allowing to write simple
 
- 	  interaction between serial console and the OS.
 
- config UART_CONSOLE
 
- 	bool "Use UART for console"
 
- 	depends on SERIAL && SERIAL_HAS_DRIVER
 
- 	select CONSOLE_HAS_DRIVER
 
- 	help
 
- 	  Enable this option to use one UART for console.
 
- config UART_CONSOLE_INIT_PRIORITY
 
- 	int "Init priority"
 
- 	default 95 if USB_UART_CONSOLE
 
- 	default 60
 
- 	depends on UART_CONSOLE
 
- 	help
 
- 	  Device driver initialization priority.
 
- 	  Console has to be initialized after the UART driver
 
- 	  it uses.
 
- config UART_CONSOLE_DEBUG_SERVER_HOOKS
 
- 	bool "Debug server hooks in debug console"
 
- 	depends on UART_CONSOLE
 
- 	help
 
- 	  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.
 
- config UART_CONSOLE_MCUMGR
 
- 	bool "Enable UART console mcumgr passthrough"
 
- 	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.
 
- config UART_CONSOLE_INPUT_EXPIRED
 
- 	bool "Enable support for UART console input expired mechanism"
 
- 	default y
 
- 	depends on UART_CONSOLE && PM
 
- 	help
 
- 	  This option allows a notification to the power management module that
 
- 	  the module for UART console is in use now. If the interval of console
 
- 	  module doesn't receive any input message exceeds expired timeout, such
 
- 	  as UART_CONSOLE_INPUT_EXPIRED_TIMEOUT, the power management module is
 
- 	  allowed to enter sleep/deep sleep state and turn off the clock of UART
 
- 	  console module. This mechanism gives a window in which the users can
 
- 	  organize input message if CONFIG_PM is enabled.
 
- config UART_CONSOLE_INPUT_EXPIRED_TIMEOUT
 
- 	int "Fixed amount of time to keep the UART console in use flag true"
 
- 	default 15000
 
- 	depends on UART_CONSOLE_INPUT_EXPIRED
 
- 	help
 
- 	  Fixed amount of time which unit is milliseconds to keep the UART
 
- 	  console in use flag true.
 
- config USB_UART_CONSOLE
 
- 	bool "Use USB port for console outputs"
 
- 	select UART_CONSOLE
 
- 	select USB_CDC_ACM
 
- 	help
 
- 	  Enable this option to use the USB CDC ACM class for console.
 
- 	  As for the console driver, this option only changes the initialization
 
- 	  level.
 
- config DC5V_UART_CONSOLE
 
- 	bool "Use dc5v port for console outputs"
 
- 	select UART_DMA_DRIVEN
 
- 	default n
 
- 	help
 
- 	  Enable this option to use the dc5v UART for console output. The output
 
- config RAM_CONSOLE
 
- 	bool "Use RAM console"
 
- 	select CONSOLE_HAS_DRIVER
 
- 	help
 
- 	  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.
 
- config RAM_CONSOLE_BUFFER_SIZE
 
- 	int "Ram Console buffer size"
 
- 	default 1024
 
- 	depends on RAM_CONSOLE
 
- 	help
 
- 	  Size of the RAM console buffer. Messages will wrap around if the
 
- 	  length is exceeded.
 
- config RTT_CONSOLE
 
- 	bool "Use RTT console"
 
- 	depends on USE_SEGGER_RTT
 
- 	select CONSOLE_HAS_DRIVER
 
- 	help
 
- 	  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.
 
- 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
 
- config IPM_CONSOLE_SENDER
 
- 	bool "Inter-processor Mailbox console sender"
 
- 	select CONSOLE_HAS_DRIVER
 
- 	help
 
- 	  Enable the sending side of IPM console
 
- config IPM_CONSOLE_RECEIVER
 
- 	bool "Inter-processor Mailbox console receiver"
 
- 	select RING_BUFFER
 
- 	help
 
- 	  Enable the receiving side of IPM console
 
- config IPM_CONSOLE_STACK_SIZE
 
- 	int "Stack size for IPM console receiver thread"
 
- 	depends on IPM_CONSOLE_RECEIVER
 
- 	default 2048 if COVERAGE
 
- 	default 512
 
- 	help
 
- 	  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.
 
- config IPM_CONSOLE
 
- 	bool "Inter-processor Mailbox console"
 
- 	depends on IPM
 
- 	select CONSOLE_HAS_DRIVER
 
- 	help
 
- 	  Enable console over Inter-processor Mailbox.
 
- # Workaround for not being able to have commas in macro arguments
 
- DT_CHOSEN_Z_IPM_CONSOLE := zephyr,console
 
- config IPM_CONSOLE_ON_DEV_NAME
 
- 	string "IPM device name used by console"
 
- 	default "$(dt_chosen_label,$(DT_CHOSEN_Z_IPM_CONSOLE))" if HAS_DTS
 
- 	default "IPM_0"
 
- 	depends on IPM_CONSOLE
 
- 	help
 
- 	  IPM device name used by IPM console driver.
 
- config IPM_CONSOLE_LINE_BUF_LEN
 
- 	int "IPM console line buffer length"
 
- 	default 128
 
- 	depends on IPM_CONSOLE
 
- 	help
 
- 	  IPM console line buffer length specify amount of the buffer
 
- 	  where characters are stored before sending the whole line.
 
- config UART_PIPE
 
- 	bool "Enable pipe UART driver"
 
- 	select UART_INTERRUPT_DRIVEN
 
- 	help
 
- 	  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.
 
- # Workaround for not being able to have commas in macro arguments
 
- DT_CHOSEN_Z_UART_PIPE := zephyr,uart-pipe
 
- config UART_PIPE_ON_DEV_NAME
 
- 	string "Device Name of UART Device for pipe UART"
 
- 	default "$(dt_chosen_label,$(DT_CHOSEN_Z_UART_PIPE))" if HAS_DTS
 
- 	default "UART_0"
 
- 	depends on UART_PIPE
 
- 	help
 
- 	  This option specifies the name of UART device to be used
 
- 	  for pipe UART.
 
- config UART_MCUMGR
 
- 	bool "Enable mcumgr UART driver"
 
- 	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
 
- config UART_MCUMGR_RX_BUF_SIZE
 
- 	int "Size of receive buffer for mcumgr fragments received over UART, in bytes"
 
- 	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
 
- 	int "Number of receive buffers for mcumgr fragments received over UART"
 
- 	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
 
- config XTENSA_SIM_CONSOLE
 
- 	bool "Use Xtensa simulator console"
 
- 	depends on SIMULATOR_XTENSA
 
- 	select CONSOLE_HAS_DRIVER
 
- 	default y
 
- 	help
 
- 	  Use simulator console to print messages.
 
- config NATIVE_POSIX_CONSOLE
 
- 	bool "Use the host terminal for console"
 
- 	depends on ARCH_POSIX
 
- 	select CONSOLE_HAS_DRIVER
 
- 	help
 
- 	  Use the host terminal (where the native_posix binary was launched) for the
 
- 	  Zephyr console
 
- config NATIVE_POSIX_STDIN_CONSOLE
 
- 	bool "Use the host terminal stdin"
 
- 	depends on NATIVE_POSIX_CONSOLE
 
- 	help
 
- 	  No current use. Kept only as there is plans to start using these
 
- 	  drivers with the shell
 
- config NATIVE_STDIN_POLL_PERIOD
 
- 	int "Polling period for stdin"
 
- 	depends on NATIVE_POSIX_STDIN_CONSOLE
 
- 	default 20
 
- 	help
 
- 	  In ms, polling period for stdin
 
- config NATIVE_POSIX_STDOUT_CONSOLE
 
- 	bool "Print to the host terminal stdout"
 
- 	depends on NATIVE_POSIX_CONSOLE
 
- 	default y
 
- 	help
 
- 	  Zephyr's printk messages will be directed to the host terminal stdout.
 
- config XTENSA_CONSOLE_INIT_PRIORITY
 
- 	int "Init priority"
 
- 	default 60
 
- 	depends on XTENSA_SIM_CONSOLE
 
- 	help
 
- 	  Device driver initialization priority.
 
- config NATIVE_POSIX_CONSOLE_INIT_PRIORITY
 
- 	int "Init priority"
 
- 	default 99
 
- 	depends on NATIVE_POSIX_CONSOLE
 
- 	help
 
- 	  Device driver initialization priority.
 
- config SEMIHOST_CONSOLE
 
- 	bool "Use semihosting for console"
 
- 	select CONSOLE_HAS_DRIVER
 
- 	depends on CPU_CORTEX_M || ARM64
 
- 	help
 
- 	  Enable this option to use semihosting for console.
 
- 	  Semihosting is a mechanism that enables code running on an ARM target
 
- 	  to communicate and use the Input/Output facilities on a host computer
 
- 	  that is running a debugger.
 
- 	  Additional information can be found in:
 
- 	  https://developer.arm.com/docs/dui0471/k/what-is-semihosting/what-is-semihosting
 
- 	  This option is compatible with hardware and with QEMU, through the
 
- 	  (automatic) use of the -semihosting-config switch when invoking it.
 
- module = UART_CONSOLE
 
- module-str = UART console
 
- source "subsys/logging/Kconfig.template.log_config"
 
- endif # CONSOLE
 
 
  |