I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.
There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.
The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).
Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.
Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.
Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.
The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.
(Everything above is true for choices, menus, and comments as well.)
Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
93 lines
2.5 KiB
Plaintext
93 lines
2.5 KiB
Plaintext
# mcumgr configuration options
|
|
|
|
# Copyright Runtime.io 2018. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menu "Management"
|
|
|
|
config MCUMGR_SMP_BT
|
|
bool "Bluetooth mcumgr SMP transport"
|
|
select MCUMGR
|
|
select BT
|
|
select BT_PERIPHERAL
|
|
select BT_GATT_DYNAMIC_DB
|
|
help
|
|
Enables handling of SMP commands received over Bluetooth.
|
|
|
|
config MCUMGR_SMP_BT_AUTHEN
|
|
bool "Authenticated requirement for Bluetooth mcumgr SMP transport"
|
|
depends on MCUMGR_SMP_BT
|
|
select BT_SMP
|
|
default y
|
|
help
|
|
Enables encrypted and authenticated connection requirement to
|
|
Bluetooth SMP transport.
|
|
|
|
config MCUMGR_SMP_SHELL
|
|
bool "Shell mcumgr SMP transport"
|
|
select MCUMGR
|
|
select SHELL
|
|
select SHELL_BACKEND_SERIAL
|
|
select BASE64
|
|
help
|
|
Enables handling of SMP commands received over shell. This allows
|
|
the shell to be use for both mcumgr commands and shell commands.
|
|
|
|
config MCUMGR_SMP_SHELL_MTU
|
|
int "Shell SMP MTU"
|
|
default 256
|
|
depends on MCUMGR_SMP_SHELL
|
|
help
|
|
Maximum size of SMP frames sent and received over shell. This value
|
|
must satisfy the following relation:
|
|
MCUMGR_SMP_SHELL_MTU <= MCUMGR_BUF_SIZE + 2
|
|
|
|
config MCUMGR_SMP_UART
|
|
bool "UART mcumgr SMP transport"
|
|
select MCUMGR
|
|
select UART_MCUMGR
|
|
select BASE64
|
|
help
|
|
Enables handling of SMP commands received over UART. This is a
|
|
lightweight alternative to MCUMGR_SMP_SHELL. It allows mcumgr
|
|
commands to be received over UART without requiring an additional
|
|
thread.
|
|
|
|
config MCUMGR_SMP_UART_MTU
|
|
int "UART SMP MTU"
|
|
default 256
|
|
depends on MCUMGR_SMP_UART
|
|
help
|
|
Maximum size of SMP frames sent and received over UART, in bytes.
|
|
This value must satisfy the following relation:
|
|
MCUMGR_SMP_UART_MTU <= MCUMGR_BUF_SIZE + 2
|
|
|
|
source "subsys/mgmt/Kconfig.mcumgr"
|
|
|
|
if MCUMGR
|
|
config MCUMGR_BUF_COUNT
|
|
int "Number of mcumgr buffers"
|
|
default 4
|
|
help
|
|
The number of net_bufs to allocate for mcumgr. These buffers are
|
|
used for both requests and responses.
|
|
|
|
config MCUMGR_BUF_SIZE
|
|
int "Size of each mcumgr buffer"
|
|
default 384
|
|
help
|
|
The size, in bytes, of each mcumgr buffer. This value must satisfy
|
|
the following relation:
|
|
MCUMGR_BUF_SIZE >= transport-specific-MTU + transport-overhead
|
|
|
|
config MCUMGR_BUF_USER_DATA_SIZE
|
|
int "Size of mcumgr buffer user data"
|
|
default 4
|
|
help
|
|
The size, in bytes, of user data to allocate for each mcumgr buffer.
|
|
Different mcumgr transports impose different requirements for this
|
|
setting. A value of 4 is sufficient for UART, shell, and bluetooth.
|
|
|
|
endif # MCUMGR
|
|
endmenu
|