shell: Enable backends via Kconfig file
Added functionality to enable active shell backends via Kconfig file. When there will be more backends implemented user will have an option to select only required ones. It is no longer needed to select SERIAL in prj.conf. Fixes #10190 Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
parent
dc8bbce357
commit
bc6da1c34a
4 changed files with 30 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
CONFIG_PRINTK=y
|
||||
CONFIG_SHELL=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_LOG=y
|
||||
CONFIG_LOG_BACKEND_UART=n
|
||||
CONFIG_KERNEL_SHELL=y
|
||||
|
|
|
@ -16,6 +16,10 @@ zephyr_sources_ifdef(
|
|||
shell_fprintf.c
|
||||
shell_utils.c
|
||||
shell_ops.c
|
||||
)
|
||||
|
||||
zephyr_sources_ifdef(
|
||||
CONFIG_SHELL_BACKEND_SERIAL
|
||||
shell_uart.c
|
||||
)
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ menuconfig SHELL
|
|||
bool "Enable shell"
|
||||
select LOG_RUNTIME_FILTERING
|
||||
select POLL
|
||||
depends on SERIAL
|
||||
|
||||
if SHELL
|
||||
|
||||
module = SHELL
|
||||
module-str = Shell
|
||||
source "subsys/logging/Kconfig.template.log_config"
|
||||
source "subsys/shell/Kconfig.backends"
|
||||
|
||||
config SHELL_STACK_SIZE
|
||||
int "Shell thread stack size"
|
||||
|
|
25
subsys/shell/Kconfig.backends
Normal file
25
subsys/shell/Kconfig.backends
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Kconfig.backends - Shell badckends configuration options
|
||||
|
||||
#
|
||||
# Copyright (c) 2018 Nordic Semiconductor ASA
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
menuconfig SHELL_BACKENDS
|
||||
bool "Enable shell backends"
|
||||
default y
|
||||
help
|
||||
Enable shell backends.
|
||||
|
||||
if SHELL_BACKENDS
|
||||
|
||||
config SHELL_BACKEND_SERIAL
|
||||
bool "Enable serial backends."
|
||||
default y
|
||||
select SERIAL
|
||||
help
|
||||
Enable serial backends.
|
||||
|
||||
endif # SHELL_BACKENDS
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue