1# Console driver configuration options 2 3# Copyright (c) 2014-2015 Wind River Systems, Inc. 4# Copyright (c) 2016 Cadence Design Systems, Inc. 5# SPDX-License-Identifier: Apache-2.0 6 7# Setting shared by different subsystems 8 9menuconfig CONSOLE 10 bool "Console drivers" 11 12if CONSOLE 13 14config CONSOLE_INPUT_MAX_LINE_LEN 15 int "Console maximum input line length" 16 default 128 17 help 18 This option can be used to modify the maximum length a console input 19 can be. 20 21config CONSOLE_HAS_DRIVER 22 bool 23 help 24 This is an option to be enabled by console drivers to signal 25 that some kind of console exists. 26 27config CONSOLE_HANDLER 28 bool "Console input handler" 29 depends on UART_CONSOLE && SERIAL_SUPPORT_INTERRUPT 30 select UART_INTERRUPT_DRIVEN 31 help 32 This option enables console input handler allowing to write simple 33 interaction between serial console and the OS. 34 35config CONSOLE_INIT_PRIORITY 36 int "Console init priority" 37 default 95 if UART_MUX 38 default 60 if UART_CONSOLE || XTENSA_SIM_CONSOLE 39 default KERNEL_INIT_PRIORITY_DEFAULT 40 help 41 Console driver device initialization priority. 42 43config UART_CONSOLE 44 bool "Use UART for console" 45 depends on SERIAL && SERIAL_HAS_DRIVER 46 select CONSOLE_HAS_DRIVER 47 help 48 Enable this option to use one UART for console. 49 50config UART_CONSOLE_DEBUG_SERVER_HOOKS 51 bool "Debug server hooks in debug console" 52 depends on UART_CONSOLE 53 help 54 This option allows a debug server agent such as GDB to take over the 55 handling of traffic that goes through the console logic. The debug 56 server looks at characters received and decides to handle them itself if 57 they are some sort of control characters, or let the regular console 58 code handle them if they are of no special significance to it. 59 60config UART_CONSOLE_MCUMGR 61 bool "UART console mcumgr passthrough" 62 depends on UART_CONSOLE 63 help 64 Enables the UART console to receive mcumgr frames for image upgrade 65 and device management. When enabled, the UART console does not 66 process mcumgr frames, but it hands them up to a higher level module 67 (e.g., the shell). If unset, incoming mcumgr frames are dropped. 68 69config UART_CONSOLE_INPUT_EXPIRED 70 bool "Support for UART console input expired mechanism" 71 default y 72 depends on UART_CONSOLE && PM 73 help 74 This option allows a notification to the power management module that 75 the module for UART console is in use now. If the interval of console 76 module doesn't receive any input message exceeds expired timeout, such 77 as UART_CONSOLE_INPUT_EXPIRED_TIMEOUT, the power management module is 78 allowed to enter sleep/deep sleep state and turn off the clock of UART 79 console module. This mechanism gives a window in which the users can 80 organize input message if CONFIG_PM is enabled. 81 82config UART_CONSOLE_INPUT_EXPIRED_TIMEOUT 83 int "Fixed amount of time to keep the UART console in use flag true" 84 default 15000 85 depends on UART_CONSOLE_INPUT_EXPIRED 86 help 87 Fixed amount of time which unit is milliseconds to keep the UART 88 console in use flag true. 89 90config JAILHOUSE_DEBUG_CONSOLE 91 bool "Use JAILHOUSE_DEBUG console" 92 select CONSOLE_HAS_DRIVER 93 depends on ARM64 94 help 95 Emit console messages to a jailhouse hypervisor debug console. 96 Useful in board bring-up if there aren't any working serial 97 drivers. 98 99config RAM_CONSOLE 100 bool "Use RAM console" 101 select CONSOLE_HAS_DRIVER 102 help 103 Emit console messages to a RAM buffer "ram_console" which can 104 be examined at runtime with a debugger. Useful in board bring-up 105 if there aren't any working serial drivers. 106 107config RAM_CONSOLE_BUFFER_SIZE 108 int "Ram Console buffer size" 109 default 1024 110 depends on RAM_CONSOLE 111 help 112 Size of the RAM console buffer. Messages will wrap around if the 113 length is exceeded. 114 115config RTT_CONSOLE 116 bool "Use RTT console" 117 depends on USE_SEGGER_RTT 118 select CONSOLE_HAS_DRIVER 119 help 120 Emit console messages to a RAM buffer that is then read by the 121 Segger J-Link software and displayed on a computer in real-time. 122 Requires support for Segger J-Link on the companion IC onboard. 123 124if RTT_CONSOLE 125 126config RTT_TX_RETRY_CNT 127 int "Number of TX retries" 128 default 2 129 help 130 Number of TX retries before dropping the byte and assuming that 131 RTT session is inactive. 132 133config RTT_TX_RETRY_DELAY_MS 134 int "Delay between TX retries in milliseconds" 135 default 2 136 help 137 Sleep period between TX retry attempts. During RTT session, host pulls data 138 periodically. Period starts from 1-2 milliseconds and can be increased 139 if traffic on RTT increases (also from host to device). In case of 140 heavy traffic data can be lost and it may be necessary to increase 141 delay or number of retries. 142 143config RTT_TX_RETRY_IN_INTERRUPT 144 bool "Busy wait in the interrupt context for TX retry" 145 help 146 If enabled RTT console will busy wait between TX retries when console 147 assumes that RTT session is active. In case of heavy traffic data can 148 be lost and it may be necessary to increase delay or number of 149 retries. 150 151endif 152 153config IPM_CONSOLE_SENDER 154 bool "Inter-processor Mailbox console sender" 155 select CONSOLE_HAS_DRIVER 156 help 157 Enable the sending side of IPM console 158 159config IPM_CONSOLE_RECEIVER 160 bool "Inter-processor Mailbox console receiver" 161 select RING_BUFFER 162 help 163 Enable the receiving side of IPM console 164 165config IPM_CONSOLE_STACK_SIZE 166 int "Stack size for IPM console receiver thread" 167 depends on IPM_CONSOLE_RECEIVER 168 default 2048 if COVERAGE_GCOV 169 default 512 170 help 171 Each instance of the IPM console receiver driver creates a worker 172 thread to print out incoming messages from the remote CPU. Specify the 173 stack size for these threads here. 174 175config IPM_CONSOLE 176 bool "Inter-processor Mailbox console" 177 depends on IPM 178 select CONSOLE_HAS_DRIVER 179 help 180 Enable console over Inter-processor Mailbox. 181 182config IPM_CONSOLE_LINE_BUF_LEN 183 int "IPM console line buffer length" 184 default 128 185 depends on IPM_CONSOLE 186 help 187 IPM console line buffer length specify amount of the buffer 188 where characters are stored before sending the whole line. 189 190config UART_MCUMGR 191 bool "Mcumgr UART driver" 192 select UART_INTERRUPT_DRIVEN 193 help 194 Enable the mcumgr UART driver. This driver allows the application to 195 communicate over UART using the mcumgr protocol for image upgrade and 196 device management. The driver doesn't inspect received data (as 197 contrary to console UART driver) and all aspects of received protocol 198 data are handled by an application provided callback. 199 200if UART_MCUMGR 201 202config UART_MCUMGR_RX_BUF_SIZE 203 int "Size of receive buffer for mcumgr fragments received over UART, in bytes" 204 default 128 205 help 206 Specifies the size of the mcumgr UART receive buffer, in bytes. This 207 value must be large enough to accommodate any line sent by an mcumgr 208 client. 209 210config UART_MCUMGR_RX_BUF_COUNT 211 int "Number of receive buffers for mcumgr fragments received over UART" 212 default 2 213 help 214 Specifies the number of the mcumgr UART receive buffers. Receive 215 buffers hold received mcumgr fragments prior to reassembly. This 216 setting's value must satisfy the following relation: 217 UART_MCUMGR_RX_BUF_COUNT * UART_MCUMGR_RX_BUF_SIZE >= 218 MCUMGR_TRANSPORT_UART_MTU 219 220endif # UART_MCUMGR 221 222config XTENSA_SIM_CONSOLE 223 bool "Use Xtensa simulator console" 224 depends on SIMULATOR_XTENSA 225 select CONSOLE_HAS_DRIVER 226 default y 227 help 228 Use simulator console to print messages. 229 230config POSIX_ARCH_CONSOLE 231 bool "Use the host terminal for console" 232 depends on ARCH_POSIX 233 select CONSOLE_HAS_DRIVER 234 help 235 Zephyr's printk messages will be directed to the host terminal stdout 236 237config POSIX_ARCH_CONSOLE_INIT_PRIORITY 238 int "Init priority" 239 default 99 240 depends on POSIX_ARCH_CONSOLE 241 help 242 Device driver initialization priority. 243 244config SEMIHOST_CONSOLE 245 bool "Use semihosting for console" 246 select CONSOLE_HAS_DRIVER 247 depends on SEMIHOST 248 help 249 Enable this option to use semihosting for console. 250 See SEMIHOST for a more complete description of semihosting. 251 252module = UART_CONSOLE 253module-str = UART console 254source "subsys/logging/Kconfig.template.log_config" 255 256source "drivers/console/Kconfig.gsm_mux" 257 258config UART_MUX 259 bool "[DEPRECATED] UART muxing (GSM 07.10) support [EXPERIMENTAL]" 260 depends on SERIAL_SUPPORT_INTERRUPT && GSM_MUX 261 select UART_INTERRUPT_DRIVEN 262 select EXPERIMENTAL 263 select DEPRECATED 264 help 265 Enable this option to create UART muxer that run over a physical 266 UART. The GSM 07.10 muxing protocol is used to separate the data 267 between these muxed UARTs. 268 269if UART_MUX 270 271config UART_MUX_DEVICE_NAME 272 string "UART mux device name template" 273 default "GSM" 274 help 275 Device name template for the UART mux Devices. First device would 276 have name $(UART_MUX_DEVICE_NAME)_0, etc. User will access muxed 277 UART using this name. 278 279config UART_MUX_RINGBUF_SIZE 280 int "UART mux ring buffer size" 281 default 256 282 help 283 UART mux ring buffer size when passing data from RX ISR to worker 284 thread that will do the unmuxing. 285 286config UART_MUX_TEMP_BUF_SIZE 287 int "Size of the temp buffer when reading data from real UART" 288 default 32 289 help 290 Size of the temporary RX buffer in receiving ISR. 291 292config UART_MUX_DEVICE_COUNT 293 int "Number of UART mux devices (DLCIs)" 294 default GSM_MUX_DLCI_MAX 295 range 1 64 296 help 297 Number of instances of UART muxes. Default value is set by 298 maximum number of DLCIs (Data Link Connection Identifiers) 299 configured in the system. 300 301config UART_MUX_REAL_DEVICE_COUNT 302 int "Number of real UART devices" 303 default 1 304 help 305 Tells how many real UART devices there are. Typically there is 306 only one UART and the muxed UARTs are run on top of that. If you have 307 two modems for example, then you would need to increase this to two. 308 309config UART_MUX_RX_STACK_SIZE 310 int "Size of the stack allocated for receiving data from UART" 311 default 512 312 help 313 Sets the stack size which will be used by the PPP RX workqueue. 314 315config UART_MUX_RX_PRIORITY 316 int "RX workqueue thread priority" 317 default 7 318 help 319 Sets the priority of the RX workqueue thread. 320 321module = UART_MUX 322module-str = UART mux 323source "subsys/logging/Kconfig.template.log_config" 324 325endif # UART_MUX 326 327config UART_MUX_VERBOSE_DEBUG 328 bool "Print hexdump of sent and received packets" 329 depends on UART_MUX_LOG_LEVEL_DBG 330 help 331 As there might be lot of debug output printed, only enable 332 this if really needed. 333 334config EFI_CONSOLE 335 bool "Use EFI console for console output" 336 select CONSOLE_HAS_DRIVER 337 help 338 Enable this option to use EFI console output. 339 340config WINSTREAM_CONSOLE 341 bool "Use Winstream console" 342 depends on WINSTREAM 343 help 344 Use winstream as a console. 345 346 See the WINSTREAM Kconfig help for more information. 347 348endif # CONSOLE 349