1# Shell backends configuration options
2
3# Copyright (c) 2018 Nordic Semiconductor ASA
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig SHELL_BACKENDS
7	bool "Shell backends"
8	default y
9	help
10	  Enable shell backends.
11
12if SHELL_BACKENDS
13
14# Workaround for not being able to have commas in macro arguments
15DT_CHOSEN_Z_SHELL_UART := zephyr,shell-uart
16
17config SHELL_BACKEND_SERIAL
18	bool "Serial backend"
19	default "$(dt_chosen_enabled,$(DT_CHOSEN_Z_SHELL_UART))"
20	select SERIAL
21	select RING_BUFFER
22	help
23	  Enable serial backend.
24
25if SHELL_BACKEND_SERIAL
26
27config SHELL_BACKEND_SERIAL_INIT_PRIORITY
28	int "Initialization priority"
29	default APPLICATION_INIT_PRIORITY
30	range 0 99
31	help
32	  Initialization priority for UART backend. This must be bigger than
33	  the initialization priority of the used serial device.
34
35config SHELL_PROMPT_UART
36	string "Displayed prompt name"
37	default "uart:~$ "
38	help
39	  Displayed prompt name for UART backend. If prompt is set, the shell will
40	  send two newlines during initialization.
41
42config SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
43	bool "Interrupt driven"
44	default y
45	depends on SERIAL_SUPPORT_INTERRUPT
46
47config SHELL_ASYNC_API
48	bool "Asynchronous shell API"
49	default n
50	depends on UART_ASYNC_API
51	help
52	  This option enables asynchronous shell API.
53
54choice SHELL_BACKEND_SERIAL_API
55	prompt "Mode"
56	default SHELL_BACKEND_SERIAL_API_ASYNC if SHELL_ASYNC_API
57	default SHELL_BACKEND_SERIAL_API_INTERRUPT_DRIVEN if SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN
58	default SHELL_BACKEND_SERIAL_API_POLLING
59
60config SHELL_BACKEND_SERIAL_API_POLLING
61	prompt "Polling"
62
63config SHELL_BACKEND_SERIAL_API_INTERRUPT_DRIVEN
64	bool "Interrupt driven"
65	depends on SERIAL_SUPPORT_INTERRUPT
66	select UART_INTERRUPT_DRIVEN
67
68
69config SHELL_BACKEND_SERIAL_API_ASYNC
70	bool "Asynchronous"
71	depends on SERIAL_SUPPORT_ASYNC
72	select UART_ASYNC_RX_HELPER
73
74endchoice
75
76config SHELL_BACKEND_SERIAL_FORCE_TX_BLOCKING_MODE
77	bool "Force blocking mode for TX"
78	help
79	  Force blocking mode for TX.
80
81config SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE
82	int "Set TX ring buffer size"
83	default 8
84	depends on SHELL_BACKEND_SERIAL_API_INTERRUPT_DRIVEN
85	help
86	  If UART is utilizing DMA transfers then increasing ring buffer size
87	  increases transfers length and reduces number of interrupts.
88
89config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE
90	int "Set RX ring buffer size"
91	depends on SHELL_BACKEND_SERIAL_API_INTERRUPT_DRIVEN || SHELL_BACKEND_SERIAL_API_POLLING
92	default 256 if MCUMGR_TRANSPORT_SHELL
93	default 64
94	help
95	  RX ring buffer size impacts accepted latency of handling incoming
96	  bytes by shell. If shell input is coming from the keyboard then it is
97	  usually enough if ring buffer is few bytes (more than one due to
98	  escape sequences). However, if bulk data is transferred it may be
99	  required to increase it.
100
101if SHELL_BACKEND_SERIAL_API_ASYNC
102
103config SHELL_BACKEND_SERIAL_ASYNC_RX_TIMEOUT
104	int "RX inactivity timeout (in microseconds)"
105	default 10000
106	help
107	  Inactivity timeout after which received data is reported.
108
109config SHELL_BACKEND_SERIAL_ASYNC_RX_BUFFER_COUNT
110	int "Number of RX buffers"
111	default 4
112	range 2 64
113	help
114	  Number of RX buffers. Some UART driver implementations changes buffers
115	  on timeout so this number should be big enough to cover handling on
116	  time incoming data. 4 should be enough for almost all the cases unless
117	  CPU load is high and there is very high shell thread latency.
118
119config SHELL_BACKEND_SERIAL_ASYNC_RX_BUFFER_SIZE
120	int "Size of the RX buffer"
121	default 16
122	help
123	  Size of a single RX buffer. Together with buffer count it defines the
124	  space that can hold RX data. It may be decreased if shell input is
125	  slow and may need to be increased if long messages are pasted directly
126	  to the shell prompt.
127
128endif # SHELL_BACKEND_SERIAL_API_ASYNC
129
130config SHELL_BACKEND_SERIAL_RX_POLL_PERIOD
131	int "RX polling period (in milliseconds)"
132	default 10
133	depends on SHELL_BACKEND_SERIAL_API_POLLING
134	help
135	  Determines how often UART is polled for RX byte.
136
137config SHELL_BACKEND_SERIAL_CHECK_DTR
138	bool "Check DTR signal before TX"
139	depends on SHELL_BACKEND_SERIAL_API_INTERRUPT_DRIVEN
140	depends on UART_LINE_CTRL
141	help
142	  Check DTR signal before TX.
143
144module = SHELL_BACKEND_SERIAL
145default-timeout = 100
146source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
147
148default-size = 512
149source "subsys/shell/Kconfig.template.shell_log_queue_size"
150
151choice
152	prompt "Initial log level limit"
153	default SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
154
155config SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
156	bool "System limit (LOG_MAX_LEVEL)"
157
158config SHELL_BACKEND_SERIAL_LOG_LEVEL_DBG
159	bool "Debug"
160
161config SHELL_BACKEND_SERIAL_LOG_LEVEL_INF
162	bool "Info"
163
164config SHELL_BACKEND_SERIAL_LOG_LEVEL_WRN
165	bool "Warning"
166
167config SHELL_BACKEND_SERIAL_LOG_LEVEL_ERR
168	bool "Error"
169
170config SHELL_BACKEND_SERIAL_LOG_LEVEL_NONE
171	bool "None"
172
173endchoice
174
175config SHELL_BACKEND_SERIAL_LOG_LEVEL
176	int
177	default 0 if SHELL_BACKEND_SERIAL_LOG_LEVEL_NONE
178	default 1 if SHELL_BACKEND_SERIAL_LOG_LEVEL_ERR
179	default 2 if SHELL_BACKEND_SERIAL_LOG_LEVEL_WRN
180	default 3 if SHELL_BACKEND_SERIAL_LOG_LEVEL_INF
181	default 4 if SHELL_BACKEND_SERIAL_LOG_LEVEL_DBG
182	default 5 if SHELL_BACKEND_SERIAL_LOG_LEVEL_DEFAULT
183
184endif # SHELL_BACKEND_SERIAL
185
186config SHELL_BACKEND_RTT
187	bool "RTT backend"
188	select CONSOLE
189	select RTT_CONSOLE
190	select SEGGER_RTT_CUSTOM_LOCKING
191	depends on USE_SEGGER_RTT
192	# RTT backend can only be called from thread context.
193	depends on !(SHELL_LOG_BACKEND && LOG_MODE_IMMEDIATE)
194	help
195	  Enable RTT backend.
196
197if SHELL_BACKEND_RTT
198
199config SHELL_PROMPT_RTT
200	string "Displayed prompt name"
201	default "rtt:~$ "
202	help
203	  Displayed prompt name for RTT backend. If prompt is set, the shell will
204	  send two newlines during initialization.
205
206config SHELL_BACKEND_RTT_BUFFER
207	int "Buffer number used for shell input and output."
208	range 0 SEGGER_RTT_MAX_NUM_UP_BUFFERS
209	default 0
210	help
211	  Select index of up-buffer used for shell output, by default it uses
212	  terminal up-buffer and its settings.
213
214config SHELL_BACKEND_RTT_RETRY_CNT
215	int "Number of retries"
216	default 4
217	help
218	  Number of TX retries before dropping the data and assuming that
219	  RTT session is inactive.
220
221config SHELL_BACKEND_RTT_RETRY_DELAY_MS
222	int "Delay between TX retries in milliseconds"
223	default 5
224	help
225	  Sleep period between TX retry attempts. During RTT session, host pulls
226	  data periodically. Period starts from 1-2 milliseconds and can be
227	  increased if traffic on RTT increases (also from host to device). In
228	  case of heavy traffic data can be lost and it may be necessary to
229	  increase delay or number of retries.
230
231config SHELL_RTT_RX_POLL_PERIOD
232	int "RX polling period (in milliseconds)"
233	default 10
234	help
235	  Determines how often RTT is polled for RX byte.
236
237module = SHELL_BACKEND_RTT
238default-timeout = 100
239source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
240
241default-size = 512
242source "subsys/shell/Kconfig.template.shell_log_queue_size"
243
244choice
245	prompt "Initial log level limit"
246	default SHELL_RTT_INIT_LOG_LEVEL_DEFAULT
247
248config SHELL_RTT_INIT_LOG_LEVEL_DEFAULT
249	bool "System limit (LOG_MAX_LEVEL)"
250
251config SHELL_RTT_INIT_LOG_LEVEL_DBG
252	bool "Debug"
253
254config SHELL_RTT_INIT_LOG_LEVEL_INF
255	bool "Info"
256
257config SHELL_RTT_INIT_LOG_LEVEL_WRN
258	bool "Warning"
259
260config SHELL_RTT_INIT_LOG_LEVEL_ERR
261	bool "Error"
262
263config SHELL_RTT_INIT_LOG_LEVEL_NONE
264	bool "None"
265
266endchoice
267
268config SHELL_RTT_INIT_LOG_LEVEL
269	int
270	default 0 if SHELL_RTT_INIT_LOG_LEVEL_NONE
271	default 1 if SHELL_RTT_INIT_LOG_LEVEL_ERR
272	default 2 if SHELL_RTT_INIT_LOG_LEVEL_WRN
273	default 3 if SHELL_RTT_INIT_LOG_LEVEL_INF
274	default 4 if SHELL_RTT_INIT_LOG_LEVEL_DBG
275	default 5 if SHELL_RTT_INIT_LOG_LEVEL_DEFAULT
276
277module = SHELL_RTT
278module-str = RTT shell backend
279source "subsys/logging/Kconfig.template.log_config"
280
281endif # SHELL_BACKEND_RTT
282
283config SHELL_BACKEND_MQTT
284	bool "MQTT backend"
285	depends on NET_TCP
286	depends on NET_IPV4
287	depends on NETWORKING
288	select DNS_RESOLVER
289	select HWINFO
290	select MQTT_LIB
291	select NET_MGMT
292	select NET_MGMT_EVENT
293	help
294	  Enable MQTT backend.
295
296if SHELL_BACKEND_MQTT
297
298config SHELL_MQTT_SERVER_ADDR
299	string "MQTT server address"
300	default "192.168.0.100"
301	help
302	  MQTT server address.
303
304config SHELL_MQTT_SERVER_PORT
305	int "MQTT server port"
306	default 1883
307	help
308	  MQTT server port.
309
310config SHELL_MQTT_SERVER_USERNAME
311	string "MQTT server username"
312	help
313	  MQTT server username.
314
315config SHELL_MQTT_SERVER_PASSWORD
316	string "MQTT server password"
317	help
318	  MQTT server password.
319
320config SHELL_MQTT_RX_BUF_SIZE
321	int "RX buffer size"
322	default 256
323	help
324	  Buffer size for the MQTT data reception.
325
326config SHELL_MQTT_TX_BUF_SIZE
327	int "TX buffer size"
328	range 32 $(UINT16_MAX)
329	default 256
330	help
331	  Buffer size for the MQTT data transmission.
332
333module = SHELL_BACKEND_MQTT
334default-timeout = 100
335source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
336
337default-size = 512
338source "subsys/shell/Kconfig.template.shell_log_queue_size"
339
340choice
341	prompt "Initial log level limit"
342	default SHELL_MQTT_INIT_LOG_LEVEL_DEFAULT
343
344config SHELL_MQTT_INIT_LOG_LEVEL_DEFAULT
345	bool "System limit (LOG_MAX_LEVEL)"
346
347config SHELL_MQTT_INIT_LOG_LEVEL_DBG
348	bool "Debug"
349
350config SHELL_MQTT_INIT_LOG_LEVEL_INF
351	bool "Info"
352
353config SHELL_MQTT_INIT_LOG_LEVEL_WRN
354	bool "Warning"
355
356config SHELL_MQTT_INIT_LOG_LEVEL_ERR
357	bool "Error"
358
359config SHELL_MQTT_INIT_LOG_LEVEL_NONE
360	bool "None"
361
362endchoice # SHELL_MQTT_INIT_LOG_LEVEL
363
364config SHELL_MQTT_INIT_LOG_LEVEL
365	int
366	default 0 if SHELL_MQTT_INIT_LOG_LEVEL_NONE
367	default 1 if SHELL_MQTT_INIT_LOG_LEVEL_ERR
368	default 2 if SHELL_MQTT_INIT_LOG_LEVEL_WRN
369	default 3 if SHELL_MQTT_INIT_LOG_LEVEL_INF
370	default 4 if SHELL_MQTT_INIT_LOG_LEVEL_DBG
371	default 5 if SHELL_MQTT_INIT_LOG_LEVEL_DEFAULT
372
373module = SHELL_MQTT
374module-str = MQTT shell backend
375source "subsys/logging/Kconfig.template.log_config"
376
377endif # SHELL_BACKEND_MQTT
378
379config SHELL_BACKEND_RPMSG
380	bool "RPMsg backend."
381	depends on OPENAMP
382	help
383	  Enable RPMsg backend.
384
385if SHELL_BACKEND_RPMSG
386
387config SHELL_PROMPT_RPMSG
388	string "Displayed prompt name"
389	default "ipc:~$ "
390	help
391	  Displayed prompt name for RPMsg backend. If prompt is set, the shell will
392	  send two newlines during initialization.
393
394config SHELL_RPMSG_SERVICE_NAME
395	string "Service name"
396	default "rpmsg-tty"
397	help
398	  The service name associated with the RPMsg endpoint.
399
400config SHELL_RPMSG_SRC_ADDR
401	hex "Local address"
402	default 0xffffffff # The ANY address
403	help
404	  Local address of the RPMsg endpoint.
405
406config SHELL_RPMSG_DST_ADDR
407	hex "Remote address"
408	default 0xffffffff # The ANY address
409	help
410	  Target address of the RPMsg endpoint.
411
412config SHELL_RPMSG_MAX_RX
413	int "Receive buffer size"
414	default 10
415	help
416	  The maximum number of received messages to be queued.
417
418module = SHELL_BACKEND_RPMSG
419default-timeout = 100
420source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
421
422default-size = 512
423source "subsys/shell/Kconfig.template.shell_log_queue_size"
424
425choice
426	prompt "Initial log level limit"
427	default SHELL_RPMSG_INIT_LOG_LEVEL_DEFAULT
428
429config SHELL_RPMSG_INIT_LOG_LEVEL_DEFAULT
430	bool "System limit (LOG_MAX_LEVEL)"
431
432config SHELL_RPMSG_INIT_LOG_LEVEL_DBG
433	bool "Debug"
434
435config SHELL_RPMSG_INIT_LOG_LEVEL_INF
436	bool "Info"
437
438config SHELL_RPMSG_INIT_LOG_LEVEL_WRN
439	bool "Warning"
440
441config SHELL_RPMSG_INIT_LOG_LEVEL_ERR
442	bool "Error"
443
444config SHELL_RPMSG_INIT_LOG_LEVEL_NONE
445	bool "None"
446
447endchoice # SHELL_RPMSG_INIT_LOG_LEVEL
448
449config SHELL_RPMSG_INIT_LOG_LEVEL
450	int
451	default 0 if SHELL_RPMSG_INIT_LOG_LEVEL_NONE
452	default 1 if SHELL_RPMSG_INIT_LOG_LEVEL_ERR
453	default 2 if SHELL_RPMSG_INIT_LOG_LEVEL_WRN
454	default 3 if SHELL_RPMSG_INIT_LOG_LEVEL_INF
455	default 4 if SHELL_RPMSG_INIT_LOG_LEVEL_DBG
456	default 5 if SHELL_RPMSG_INIT_LOG_LEVEL_DEFAULT
457
458module = SHELL_RPMSG
459module-str = RPMsg shell backend
460source "subsys/logging/Kconfig.template.log_config"
461
462endif # SHELL_BACKEND_RPMSG
463
464config SHELL_BACKEND_TELNET
465	bool "TELNET backend."
466	depends on NET_TCP
467	depends on NET_IPV4 || NET_IPV6
468	select NET_SOCKETS_SERVICE
469	select NET_SOCKETS
470	help
471	  Enable TELNET backend.
472
473if SHELL_BACKEND_TELNET
474
475config SHELL_TELNET_INIT_PRIORITY
476	int "Initialization priority"
477	default 95
478	range 0 99
479	help
480	  Initialization priority for telnet shell backend. This must be higher
481	  than socket service initialization priority, as socket service has to
482	  be initialized earlier.
483
484config SHELL_PROMPT_TELNET
485	string "Displayed prompt name"
486	default "~$ "
487	help
488	  Displayed prompt name for TELNET backend. If prompt is set, the shell will
489	  send two newlines during initialization.
490
491config SHELL_TELNET_PORT
492	int "Telnet port number"
493	default 23
494	help
495	  This option is used to configure on which port telnet is going
496	  to be bound.
497
498config SHELL_TELNET_LINE_BUF_SIZE
499	int "Telnet line buffer size"
500	default 80
501	help
502	  This option can be used to modify the size of the buffer storing
503	  shell output line, prior to sending it through the network.
504	  Of course an output line can be longer than such size, it just
505	  means sending it will start as soon as it reaches this size.
506	  It really depends on what type of output is expected.
507	  A lot of short lines: better reduce this value. On the contrary,
508	  raise it.
509
510config SHELL_TELNET_SEND_TIMEOUT
511	int "Telnet line send timeout"
512	default 100
513	help
514	  This option can be used to modify the duration of the timer that kick
515	  in when a line buffer is not empty but did not yet meet the line feed.
516
517config SHELL_TELNET_SUPPORT_COMMAND
518	bool "Add support for telnet commands (IAC) [EXPERIMENTAL]"
519	select EXPERIMENTAL
520	help
521	  Current support is so limited it's not interesting to enable it.
522	  However, if proven to be needed at some point, it will be possible
523	  to extend such support. It does have support for echo and "character
524	  at a time" mode, which enable the history and line-editing features
525	  of the shell.
526	  IMPORTANT: This will increase network usage as a TCP packet will be
527	  sent each time a character is typed in the telnet client.
528
529module = SHELL_TELNET
530default-timeout = 100
531source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
532
533default-size = 512
534source "subsys/shell/Kconfig.template.shell_log_queue_size"
535
536choice
537	prompt "Initial log level limit"
538	default SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
539
540config SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
541	bool "System limit (LOG_MAX_LEVEL)"
542
543config SHELL_TELNET_INIT_LOG_LEVEL_DBG
544	bool "Debug"
545
546config SHELL_TELNET_INIT_LOG_LEVEL_INF
547	bool "Info"
548
549config SHELL_TELNET_INIT_LOG_LEVEL_WRN
550	bool "Warning"
551
552config SHELL_TELNET_INIT_LOG_LEVEL_ERR
553	bool "Error"
554
555config SHELL_TELNET_INIT_LOG_LEVEL_NONE
556	bool "None"
557
558endchoice
559
560config SHELL_TELNET_INIT_LOG_LEVEL
561	int
562	default 0 if SHELL_TELNET_INIT_LOG_LEVEL_NONE
563	default 1 if SHELL_TELNET_INIT_LOG_LEVEL_ERR
564	default 2 if SHELL_TELNET_INIT_LOG_LEVEL_WRN
565	default 3 if SHELL_TELNET_INIT_LOG_LEVEL_INF
566	default 4 if SHELL_TELNET_INIT_LOG_LEVEL_DBG
567	default 5 if SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
568
569module = SHELL_TELNET
570module-str = TELNET shell backend
571source "subsys/logging/Kconfig.template.log_config"
572
573endif # SHELL_TELNET_BACKEND
574
575config SHELL_BACKEND_WEBSOCKET
576	bool "Websocket backend."
577	depends on HTTP_SERVER_WEBSOCKET
578	depends on NET_NATIVE_IP
579	select NET_SOCKETS_SERVICE
580	select NET_SOCKETS
581	help
582	  Enable Websocket backend.
583
584if SHELL_BACKEND_WEBSOCKET
585
586config SHELL_WEBSOCKET_BACKEND_COUNT
587	int "How many Webconsole sessions are supported"
588	default 2
589	range 1 8
590	help
591	  Each connection consumes memory so select the value according to your
592	  needs. Also note that each console session needs unique HTTP endpoint
593	  configured.
594	  Note that if you have only one HTTP endpoint for the websocket console,
595	  setting the this value to 2, allows latter console session to kick out
596	  the previous one. If set this value to 1, then the latter connecting
597	  webconsole session will fail. If you have multiple HTTP endpoints, then
598	  This value should be increased accordingly.
599
600config SHELL_WEBSOCKET_PROMPT
601	string "Displayed prompt name"
602	default ""
603	help
604	  Displayed prompt name for Websocket backend. If prompt is set, the shell will
605	  send two newlines during initialization.
606
607config SHELL_WEBSOCKET_ENDPOINT_URL
608	string "Websocket endpoint URL"
609	default "console"
610	help
611	  What is the HTTP endpoint URL where the client should connect to.
612
613config SHELL_WEBSOCKET_IP_ADDR
614	string "Websocket IP listen address"
615	default ""
616	help
617	  This option is used to configure on which IP address and network interface
618	  the HTTP server is listening. If left empty, then all network interfaces are
619	  listened.
620
621config SHELL_WEBSOCKET_PORT
622	int "Websocket port number"
623	default 443 if NET_SOCKETS_SOCKOPT_TLS
624	default 80
625	help
626	  This option is used to configure on which port websocket is going
627	  to be bound.
628
629config SHELL_WEBSOCKET_LINE_BUF_SIZE
630	int "Websocket line buffer size"
631	default 100
632	help
633	  This option can be used to modify the size of the buffer storing
634	  shell output line, prior to sending it through the network.
635	  Of course an output line can be longer than such size, it just
636	  means sending it will start as soon as it reaches this size.
637	  It really depends on what type of output is expected.
638	  A lot of short lines: better reduce this value. On the contrary,
639	  raise it.
640
641config SHELL_WEBSOCKET_SEND_TIMEOUT
642	int "Websocket line send timeout"
643	default 100
644	help
645	  This option can be used to modify the duration of the timer that kick
646	  in when a line buffer is not empty but did not yet meet the line feed.
647
648module = SHELL_WEBSOCKET
649default-timeout = 100
650source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
651
652default-size = 512
653source "subsys/shell/Kconfig.template.shell_log_queue_size"
654
655choice
656	prompt "Initial log level limit"
657	default SHELL_WEBSOCKET_INIT_LOG_LEVEL_DEFAULT
658
659config SHELL_WEBSOCKET_INIT_LOG_LEVEL_DEFAULT
660	bool "System limit (LOG_MAX_LEVEL)"
661
662config SHELL_WEBSOCKET_INIT_LOG_LEVEL_DBG
663	bool "Debug"
664
665config SHELL_WEBSOCKET_INIT_LOG_LEVEL_INF
666	bool "Info"
667
668config SHELL_WEBSOCKET_INIT_LOG_LEVEL_WRN
669	bool "Warning"
670
671config SHELL_WEBSOCKET_INIT_LOG_LEVEL_ERR
672	bool "Error"
673
674config SHELL_WEBSOCKET_INIT_LOG_LEVEL_NONE
675	bool "None"
676
677endchoice
678
679config SHELL_WEBSOCKET_INIT_LOG_LEVEL
680	int
681	default 0 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_NONE
682	default 1 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_ERR
683	default 2 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_WRN
684	default 3 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_INF
685	default 4 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_DBG
686	default 5 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_DEFAULT
687
688module = SHELL_WEBSOCKET
689module-str = Websocket shell backend
690source "subsys/logging/Kconfig.template.log_config"
691
692endif # SHELL_WEBSOCKET_BACKEND
693
694config SHELL_BACKEND_DUMMY
695	bool "Dummy backend."
696	help
697	  Enable dummy backend which can be used to execute commands with no
698	  need for physical transport interface.
699
700if SHELL_BACKEND_DUMMY
701
702config SHELL_PROMPT_DUMMY
703	string "Displayed prompt name"
704	default "~$ "
705	help
706	  Displayed prompt name for DUMMY backend. If prompt is set, the shell will
707	  send two newlines during initialization.
708
709config SHELL_BACKEND_DUMMY_BUF_SIZE
710	int "Size of dummy buffer size"
711	default 400 if LOG_PRINTK
712	default 300
713	help
714	  This is size of output buffer that will be used by dummy backend, this limits number of
715	  characters that will be captured from command output.
716
717choice
718	prompt "Initial log level limit"
719	default SHELL_DUMMY_INIT_LOG_LEVEL_INF
720
721config SHELL_DUMMY_INIT_LOG_LEVEL_DEFAULT
722	bool "System limit (LOG_MAX_LEVEL)"
723
724config SHELL_DUMMY_INIT_LOG_LEVEL_DBG
725	bool "Debug"
726
727config SHELL_DUMMY_INIT_LOG_LEVEL_INF
728	bool "Info"
729
730config SHELL_DUMMY_INIT_LOG_LEVEL_WRN
731	bool "Warning"
732
733config SHELL_DUMMY_INIT_LOG_LEVEL_ERR
734	bool "Error"
735
736config SHELL_DUMMY_INIT_LOG_LEVEL_NONE
737	bool "None"
738
739endchoice
740
741config SHELL_DUMMY_INIT_LOG_LEVEL
742	int
743	default 0 if SHELL_DUMMY_INIT_LOG_LEVEL_NONE
744	default 1 if SHELL_DUMMY_INIT_LOG_LEVEL_ERR
745	default 2 if SHELL_DUMMY_INIT_LOG_LEVEL_WRN
746	default 3 if SHELL_DUMMY_INIT_LOG_LEVEL_INF
747	default 4 if SHELL_DUMMY_INIT_LOG_LEVEL_DBG
748	default 5 if SHELL_DUMMY_INIT_LOG_LEVEL_DEFAULT
749
750endif # SHELL_BACKEND_DUMMY
751
752config SHELL_BACKEND_ADSP_MEMORY_WINDOW
753	bool "Shell backend implemented over mapped memory window."
754	depends on SOC_FAMILY_INTEL_ADSP
755	help
756	  Enable ADSP memory window backend which can be used to execute commands
757	  from remote host processor that has access to the same memory window.
758
759if SHELL_BACKEND_ADSP_MEMORY_WINDOW
760
761config SHELL_BACKEND_ADSP_MEMORY_WINDOW_PROMPT
762	string "Displayed prompt name"
763	default "~$ "
764	help
765	  Displayed prompt name for ADSP memory window backend. If prompt is set,
766	  the shell will send two newlines during initialization.
767
768config SHELL_BACKEND_ADSP_MEMORY_WINDOW_POLL_INTERVAL
769	int "Poll interval (in microseconds)"
770	default 100
771	help
772	  This option can be used to modify the poll interval the backend uses
773	  to check for new commands.
774
775endif # SHELL_BACKEND_ADSP_MEMORY_WINDOW
776
777endif # SHELL_BACKENDS
778