segger: rtt: disable unsupported shell/log features

The RTT backend of the shell does not support several of the more
advanced terminal features. This commit proposes to inactivate these
features by default when RTT is selected as shell backend.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This commit is contained in:
Florian Grandel 2023-06-05 17:17:40 +02:00 committed by Carles Cufí
commit c88a9ef272
4 changed files with 6 additions and 3 deletions

View file

@ -38,6 +38,7 @@ config SEGGER_RTT_BUFFER_SIZE_UP
config SEGGER_RTT_BUFFER_SIZE_DOWN
int "Size of the buffer for terminal input of target, from host"
default 32 if SHELL_BACKEND_RTT
default 16
config SEGGER_RTT_PRINTF_BUFFER_SIZE

View file

@ -4,7 +4,7 @@
config LOG_BACKEND_UART
bool "UART backend"
depends on UART_CONSOLE
default y if !SHELL_BACKEND_SERIAL
default y if !SHELL_BACKEND_SERIAL && !SHELL_BACKEND_RTT
select LOG_OUTPUT
help
When enabled backend is using UART to output logs.

View file

@ -90,7 +90,7 @@ config SHELL_ARGC_MAX
config SHELL_TAB
bool "The Tab button support in shell"
default y if !SHELL_MINIMAL
default y if !SHELL_MINIMAL && !SHELL_BACKEND_RTT
help
Enable using the Tab button in the shell. The button
can be used for prompting commands, or for autocompletion.
@ -125,7 +125,7 @@ config SHELL_START_OBSCURED
config SHELL_VT100_COMMANDS
bool "VT100 commands in shell"
default y
default y if !SHELL_BACKEND_RTT
help
Enables VT100 commands in shell (e.g. cursor position, clear screen etc.).

View file

@ -16,6 +16,8 @@ DT_CHOSEN_Z_SHELL_UART := zephyr,shell-uart
config SHELL_BACKEND_SERIAL
bool "Serial backend"
# Serial (UART) requires interrupts and the RTT backend cannot be used from an ISR context.
default n if SHELL_BACKEND_RTT
default "$(dt_chosen_enabled,$(DT_CHOSEN_Z_SHELL_UART))" if HAS_DTS
default y if !HAS_DTS
select SERIAL