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 if !UART_NATIVE_PTY
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
333config SHELL_MQTT_CONNECT_TIMEOUT_MS
334	int "MQTT connect timeout [ms]"
335	default 2000
336	help
337	  Time to await MQTT connect acknowlegde in milliseconds.
338
339config SHELL_MQTT_WORK_DELAY_MS
340	int "MQTT work delay [ms]"
341	default 1000
342	help
343	  Period between MQTT work in milliseconds.
344
345config SHELL_MQTT_LISTEN_TIMEOUT_MS
346	int "MQTT listen timeout [ms]"
347	default 500
348	help
349	  Time to listen for incoming packets in milliseconds.
350
351module = SHELL_BACKEND_MQTT
352default-timeout = 100
353source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
354
355default-size = 512
356source "subsys/shell/Kconfig.template.shell_log_queue_size"
357
358choice
359	prompt "Initial log level limit"
360	default SHELL_MQTT_INIT_LOG_LEVEL_DEFAULT
361
362config SHELL_MQTT_INIT_LOG_LEVEL_DEFAULT
363	bool "System limit (LOG_MAX_LEVEL)"
364
365config SHELL_MQTT_INIT_LOG_LEVEL_DBG
366	bool "Debug"
367
368config SHELL_MQTT_INIT_LOG_LEVEL_INF
369	bool "Info"
370
371config SHELL_MQTT_INIT_LOG_LEVEL_WRN
372	bool "Warning"
373
374config SHELL_MQTT_INIT_LOG_LEVEL_ERR
375	bool "Error"
376
377config SHELL_MQTT_INIT_LOG_LEVEL_NONE
378	bool "None"
379
380endchoice # SHELL_MQTT_INIT_LOG_LEVEL
381
382config SHELL_MQTT_INIT_LOG_LEVEL
383	int
384	default 0 if SHELL_MQTT_INIT_LOG_LEVEL_NONE
385	default 1 if SHELL_MQTT_INIT_LOG_LEVEL_ERR
386	default 2 if SHELL_MQTT_INIT_LOG_LEVEL_WRN
387	default 3 if SHELL_MQTT_INIT_LOG_LEVEL_INF
388	default 4 if SHELL_MQTT_INIT_LOG_LEVEL_DBG
389	default 5 if SHELL_MQTT_INIT_LOG_LEVEL_DEFAULT
390
391module = SHELL_MQTT
392module-str = MQTT shell backend
393source "subsys/logging/Kconfig.template.log_config"
394
395endif # SHELL_BACKEND_MQTT
396
397config SHELL_BACKEND_RPMSG
398	bool "RPMsg backend."
399	depends on OPENAMP
400	help
401	  Enable RPMsg backend.
402
403if SHELL_BACKEND_RPMSG
404
405config SHELL_PROMPT_RPMSG
406	string "Displayed prompt name"
407	default "ipc:~$ "
408	help
409	  Displayed prompt name for RPMsg backend. If prompt is set, the shell will
410	  send two newlines during initialization.
411
412config SHELL_RPMSG_SERVICE_NAME
413	string "Service name"
414	default "rpmsg-tty"
415	help
416	  The service name associated with the RPMsg endpoint.
417
418config SHELL_RPMSG_SRC_ADDR
419	hex "Local address"
420	default 0xffffffff # The ANY address
421	help
422	  Local address of the RPMsg endpoint.
423
424config SHELL_RPMSG_DST_ADDR
425	hex "Remote address"
426	default 0xffffffff # The ANY address
427	help
428	  Target address of the RPMsg endpoint.
429
430config SHELL_RPMSG_MAX_RX
431	int "Receive buffer size"
432	default 10
433	help
434	  The maximum number of received messages to be queued.
435
436module = SHELL_BACKEND_RPMSG
437default-timeout = 100
438source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
439
440default-size = 512
441source "subsys/shell/Kconfig.template.shell_log_queue_size"
442
443choice
444	prompt "Initial log level limit"
445	default SHELL_RPMSG_INIT_LOG_LEVEL_DEFAULT
446
447config SHELL_RPMSG_INIT_LOG_LEVEL_DEFAULT
448	bool "System limit (LOG_MAX_LEVEL)"
449
450config SHELL_RPMSG_INIT_LOG_LEVEL_DBG
451	bool "Debug"
452
453config SHELL_RPMSG_INIT_LOG_LEVEL_INF
454	bool "Info"
455
456config SHELL_RPMSG_INIT_LOG_LEVEL_WRN
457	bool "Warning"
458
459config SHELL_RPMSG_INIT_LOG_LEVEL_ERR
460	bool "Error"
461
462config SHELL_RPMSG_INIT_LOG_LEVEL_NONE
463	bool "None"
464
465endchoice # SHELL_RPMSG_INIT_LOG_LEVEL
466
467config SHELL_RPMSG_INIT_LOG_LEVEL
468	int
469	default 0 if SHELL_RPMSG_INIT_LOG_LEVEL_NONE
470	default 1 if SHELL_RPMSG_INIT_LOG_LEVEL_ERR
471	default 2 if SHELL_RPMSG_INIT_LOG_LEVEL_WRN
472	default 3 if SHELL_RPMSG_INIT_LOG_LEVEL_INF
473	default 4 if SHELL_RPMSG_INIT_LOG_LEVEL_DBG
474	default 5 if SHELL_RPMSG_INIT_LOG_LEVEL_DEFAULT
475
476module = SHELL_RPMSG
477module-str = RPMsg shell backend
478source "subsys/logging/Kconfig.template.log_config"
479
480endif # SHELL_BACKEND_RPMSG
481
482config SHELL_BACKEND_TELNET
483	bool "TELNET backend."
484	depends on NET_TCP
485	depends on NET_IPV4 || NET_IPV6
486	select NET_SOCKETS_SERVICE
487	select NET_SOCKETS
488	help
489	  Enable TELNET backend.
490
491if SHELL_BACKEND_TELNET
492
493config SHELL_TELNET_INIT_PRIORITY
494	int "Initialization priority"
495	default 95
496	range 0 99
497	help
498	  Initialization priority for telnet shell backend. This must be higher
499	  than socket service initialization priority, as socket service has to
500	  be initialized earlier.
501
502config SHELL_PROMPT_TELNET
503	string "Displayed prompt name"
504	default "~$ "
505	help
506	  Displayed prompt name for TELNET backend. If prompt is set, the shell will
507	  send two newlines during initialization.
508
509config SHELL_TELNET_PORT
510	int "Telnet port number"
511	default 23
512	help
513	  This option is used to configure on which port telnet is going
514	  to be bound.
515
516config SHELL_TELNET_LINE_BUF_SIZE
517	int "Telnet line buffer size"
518	default 80
519	help
520	  This option can be used to modify the size of the buffer storing
521	  shell output line, prior to sending it through the network.
522	  Of course an output line can be longer than such size, it just
523	  means sending it will start as soon as it reaches this size.
524	  It really depends on what type of output is expected.
525	  A lot of short lines: better reduce this value. On the contrary,
526	  raise it.
527
528config SHELL_TELNET_SEND_TIMEOUT
529	int "Telnet line send timeout"
530	default 100
531	help
532	  This option can be used to modify the duration of the timer that kick
533	  in when a line buffer is not empty but did not yet meet the line feed.
534
535config SHELL_TELNET_SUPPORT_COMMAND
536	bool "Add support for telnet commands (IAC) [EXPERIMENTAL]"
537	select EXPERIMENTAL
538	help
539	  Current support is so limited it's not interesting to enable it.
540	  However, if proven to be needed at some point, it will be possible
541	  to extend such support. It does have support for echo and "character
542	  at a time" mode, which enable the history and line-editing features
543	  of the shell.
544	  IMPORTANT: This will increase network usage as a TCP packet will be
545	  sent each time a character is typed in the telnet client.
546
547module = SHELL_TELNET
548default-timeout = 100
549source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
550
551default-size = 512
552source "subsys/shell/Kconfig.template.shell_log_queue_size"
553
554choice
555	prompt "Initial log level limit"
556	default SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
557
558config SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
559	bool "System limit (LOG_MAX_LEVEL)"
560
561config SHELL_TELNET_INIT_LOG_LEVEL_DBG
562	bool "Debug"
563
564config SHELL_TELNET_INIT_LOG_LEVEL_INF
565	bool "Info"
566
567config SHELL_TELNET_INIT_LOG_LEVEL_WRN
568	bool "Warning"
569
570config SHELL_TELNET_INIT_LOG_LEVEL_ERR
571	bool "Error"
572
573config SHELL_TELNET_INIT_LOG_LEVEL_NONE
574	bool "None"
575
576endchoice
577
578config SHELL_TELNET_INIT_LOG_LEVEL
579	int
580	default 0 if SHELL_TELNET_INIT_LOG_LEVEL_NONE
581	default 1 if SHELL_TELNET_INIT_LOG_LEVEL_ERR
582	default 2 if SHELL_TELNET_INIT_LOG_LEVEL_WRN
583	default 3 if SHELL_TELNET_INIT_LOG_LEVEL_INF
584	default 4 if SHELL_TELNET_INIT_LOG_LEVEL_DBG
585	default 5 if SHELL_TELNET_INIT_LOG_LEVEL_DEFAULT
586
587module = SHELL_TELNET
588module-str = TELNET shell backend
589source "subsys/logging/Kconfig.template.log_config"
590
591endif # SHELL_TELNET_BACKEND
592
593config SHELL_BACKEND_WEBSOCKET
594	bool "Websocket backend."
595	depends on HTTP_SERVER_WEBSOCKET
596	depends on NET_NATIVE_IP
597	select NET_SOCKETS_SERVICE
598	select NET_SOCKETS
599	help
600	  Enable Websocket backend.
601
602if SHELL_BACKEND_WEBSOCKET
603
604config SHELL_WEBSOCKET_BACKEND_COUNT
605	int "How many Webconsole sessions are supported"
606	default 2
607	range 1 8
608	help
609	  Each connection consumes memory so select the value according to your
610	  needs. Also note that each console session needs unique HTTP endpoint
611	  configured.
612	  Note that if you have only one HTTP endpoint for the websocket console,
613	  setting the this value to 2, allows latter console session to kick out
614	  the previous one. If set this value to 1, then the latter connecting
615	  webconsole session will fail. If you have multiple HTTP endpoints, then
616	  This value should be increased accordingly.
617
618config SHELL_WEBSOCKET_PROMPT
619	string "Displayed prompt name"
620	default ""
621	help
622	  Displayed prompt name for Websocket backend. If prompt is set, the shell will
623	  send two newlines during initialization.
624
625config SHELL_WEBSOCKET_ENDPOINT_URL
626	string "Websocket endpoint URL"
627	default "console"
628	help
629	  What is the HTTP endpoint URL where the client should connect to.
630
631config SHELL_WEBSOCKET_IP_ADDR
632	string "Websocket IP listen address"
633	default ""
634	help
635	  This option is used to configure on which IP address and network interface
636	  the HTTP server is listening. If left empty, then all network interfaces are
637	  listened.
638
639config SHELL_WEBSOCKET_PORT
640	int "Websocket port number"
641	default 443 if NET_SOCKETS_SOCKOPT_TLS
642	default 80
643	help
644	  This option is used to configure on which port websocket is going
645	  to be bound.
646
647config SHELL_WEBSOCKET_LINE_BUF_SIZE
648	int "Websocket line buffer size"
649	default 100
650	help
651	  This option can be used to modify the size of the buffer storing
652	  shell output line, prior to sending it through the network.
653	  Of course an output line can be longer than such size, it just
654	  means sending it will start as soon as it reaches this size.
655	  It really depends on what type of output is expected.
656	  A lot of short lines: better reduce this value. On the contrary,
657	  raise it.
658
659config SHELL_WEBSOCKET_SEND_TIMEOUT
660	int "Websocket line send timeout"
661	default 100
662	help
663	  This option can be used to modify the duration of the timer that kick
664	  in when a line buffer is not empty but did not yet meet the line feed.
665
666module = SHELL_WEBSOCKET
667default-timeout = 100
668source "subsys/shell/Kconfig.template.shell_log_queue_timeout"
669
670default-size = 512
671source "subsys/shell/Kconfig.template.shell_log_queue_size"
672
673choice
674	prompt "Initial log level limit"
675	default SHELL_WEBSOCKET_INIT_LOG_LEVEL_DEFAULT
676
677config SHELL_WEBSOCKET_INIT_LOG_LEVEL_DEFAULT
678	bool "System limit (LOG_MAX_LEVEL)"
679
680config SHELL_WEBSOCKET_INIT_LOG_LEVEL_DBG
681	bool "Debug"
682
683config SHELL_WEBSOCKET_INIT_LOG_LEVEL_INF
684	bool "Info"
685
686config SHELL_WEBSOCKET_INIT_LOG_LEVEL_WRN
687	bool "Warning"
688
689config SHELL_WEBSOCKET_INIT_LOG_LEVEL_ERR
690	bool "Error"
691
692config SHELL_WEBSOCKET_INIT_LOG_LEVEL_NONE
693	bool "None"
694
695endchoice
696
697config SHELL_WEBSOCKET_INIT_LOG_LEVEL
698	int
699	default 0 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_NONE
700	default 1 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_ERR
701	default 2 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_WRN
702	default 3 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_INF
703	default 4 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_DBG
704	default 5 if SHELL_WEBSOCKET_INIT_LOG_LEVEL_DEFAULT
705
706module = SHELL_WEBSOCKET
707module-str = Websocket shell backend
708source "subsys/logging/Kconfig.template.log_config"
709
710endif # SHELL_WEBSOCKET_BACKEND
711
712config SHELL_BACKEND_DUMMY
713	bool "Dummy backend."
714	help
715	  Enable dummy backend which can be used to execute commands with no
716	  need for physical transport interface.
717
718if SHELL_BACKEND_DUMMY
719
720config SHELL_PROMPT_DUMMY
721	string "Displayed prompt name"
722	default "~$ "
723	help
724	  Displayed prompt name for DUMMY backend. If prompt is set, the shell will
725	  send two newlines during initialization.
726
727config SHELL_BACKEND_DUMMY_BUF_SIZE
728	int "Size of dummy buffer size"
729	default 400 if LOG_PRINTK
730	default 300
731	help
732	  This is size of output buffer that will be used by dummy backend, this limits number of
733	  characters that will be captured from command output.
734
735choice
736	prompt "Initial log level limit"
737	default SHELL_DUMMY_INIT_LOG_LEVEL_INF
738
739config SHELL_DUMMY_INIT_LOG_LEVEL_DEFAULT
740	bool "System limit (LOG_MAX_LEVEL)"
741
742config SHELL_DUMMY_INIT_LOG_LEVEL_DBG
743	bool "Debug"
744
745config SHELL_DUMMY_INIT_LOG_LEVEL_INF
746	bool "Info"
747
748config SHELL_DUMMY_INIT_LOG_LEVEL_WRN
749	bool "Warning"
750
751config SHELL_DUMMY_INIT_LOG_LEVEL_ERR
752	bool "Error"
753
754config SHELL_DUMMY_INIT_LOG_LEVEL_NONE
755	bool "None"
756
757endchoice
758
759config SHELL_DUMMY_INIT_LOG_LEVEL
760	int
761	default 0 if SHELL_DUMMY_INIT_LOG_LEVEL_NONE
762	default 1 if SHELL_DUMMY_INIT_LOG_LEVEL_ERR
763	default 2 if SHELL_DUMMY_INIT_LOG_LEVEL_WRN
764	default 3 if SHELL_DUMMY_INIT_LOG_LEVEL_INF
765	default 4 if SHELL_DUMMY_INIT_LOG_LEVEL_DBG
766	default 5 if SHELL_DUMMY_INIT_LOG_LEVEL_DEFAULT
767
768endif # SHELL_BACKEND_DUMMY
769
770config SHELL_BACKEND_ADSP_MEMORY_WINDOW
771	bool "Shell backend implemented over mapped memory window."
772	depends on SOC_FAMILY_INTEL_ADSP
773	help
774	  Enable ADSP memory window backend which can be used to execute commands
775	  from remote host processor that has access to the same memory window.
776
777if SHELL_BACKEND_ADSP_MEMORY_WINDOW
778
779config SHELL_BACKEND_ADSP_MEMORY_WINDOW_PROMPT
780	string "Displayed prompt name"
781	default "~$ "
782	help
783	  Displayed prompt name for ADSP memory window backend. If prompt is set,
784	  the shell will send two newlines during initialization.
785
786config SHELL_BACKEND_ADSP_MEMORY_WINDOW_POLL_INTERVAL
787	int "Poll interval (in microseconds)"
788	default 100
789	help
790	  This option can be used to modify the poll interval the backend uses
791	  to check for new commands.
792
793endif # SHELL_BACKEND_ADSP_MEMORY_WINDOW
794
795endif # SHELL_BACKENDS
796