mgmt/mcumgr: Move Kconfig options to proper Kconfig files
After Kconfig options got renamed, some of the no longer fit to files they have been defined in. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
d492c0d79a
commit
c7378d0d84
4 changed files with 115 additions and 111 deletions
|
@ -16,107 +16,9 @@ module = MCUMGR
|
||||||
module-str = mcumgr
|
module-str = mcumgr
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
||||||
config MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE
|
|
||||||
int "MCUmgr transport workqueue stack size"
|
|
||||||
default 2048
|
|
||||||
help
|
|
||||||
Stack size of the MCUmgr for transport subsystem work queue.
|
|
||||||
|
|
||||||
config MCUMGR_TRANSPORT_WORKQUEUE_THREAD_PRIO
|
|
||||||
int "MCUmgr transport workqueue thread priority"
|
|
||||||
default 3
|
|
||||||
help
|
|
||||||
Scheduling priority of the MCUmgr transport subsystem work queue.
|
|
||||||
|
|
||||||
rsource "mgmt/Kconfig"
|
rsource "mgmt/Kconfig"
|
||||||
|
|
||||||
config MCUMGR_SMP_CBOR_MAX_MAIN_MAP_ENTRIES
|
rsource "smp/Kconfig"
|
||||||
int "Number of predicted maximum entries to main response map"
|
|
||||||
default 15
|
|
||||||
help
|
|
||||||
This is number of predicted entries in main response map,
|
|
||||||
the one that encapsulates everything within response.
|
|
||||||
This value is used by zcbor to predict needed map encoding,
|
|
||||||
and does not affect memory allocation or usage.
|
|
||||||
Builtin command processors rarely add large amounts of
|
|
||||||
data directly to main map, creating sub-maps instead so
|
|
||||||
the default value works fine with them.
|
|
||||||
If your app directly adds fields to main map, without
|
|
||||||
encapsulating them, you may want to increase this value
|
|
||||||
in case when encoding starts to fail.
|
|
||||||
|
|
||||||
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVELS
|
|
||||||
int
|
|
||||||
help
|
|
||||||
Minimal decoding levels, map/list encapsulation, required
|
|
||||||
to be supported by zcbor decoding of SMP responses
|
|
||||||
is auto genereated from MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_? options.
|
|
||||||
A group or command that adds additional maps/lists above the
|
|
||||||
base map, which is already taken into account, should
|
|
||||||
select one of the MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_?.
|
|
||||||
default 5 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_5
|
|
||||||
default 4 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_4
|
|
||||||
default 3 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_3
|
|
||||||
default 2 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_2
|
|
||||||
default 1 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_1
|
|
||||||
default 0
|
|
||||||
|
|
||||||
|
|
||||||
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_1
|
|
||||||
bool
|
|
||||||
|
|
||||||
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_2
|
|
||||||
bool
|
|
||||||
|
|
||||||
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_3
|
|
||||||
bool
|
|
||||||
|
|
||||||
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_4
|
|
||||||
bool
|
|
||||||
|
|
||||||
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_5
|
|
||||||
bool
|
|
||||||
|
|
||||||
config MCUMGR_SMP_CBOR_MAX_DECODING_LEVELS
|
|
||||||
int "Number of map/list encapsulations allowed by SMP encoding"
|
|
||||||
range MCUMGR_SMP_CBOR_MIN_DECODING_LEVELS 15
|
|
||||||
default MCUMGR_SMP_CBOR_MIN_DECODING_LEVELS
|
|
||||||
help
|
|
||||||
This is a maximum number of levels of maps/lists that will
|
|
||||||
be expected to be decoded within different command groups.
|
|
||||||
SMP commands/groups that provide no CBOR encoded payload
|
|
||||||
have no requirements.
|
|
||||||
Commands that provide CBOR payload require at least 1 level,
|
|
||||||
and additional levels for each map/list encapsulation.
|
|
||||||
For example if command accepts payload of map of parameters
|
|
||||||
it will need 2 levels.
|
|
||||||
This number translates to zcbor backup states, it increases
|
|
||||||
size of cbor_nb_reader structure by zcbor_state_t size per
|
|
||||||
one unit selected here.
|
|
||||||
|
|
||||||
config MCUMGR_MGMT_NOTIFICATION_HOOKS
|
|
||||||
bool "MCUmgr notification hook support"
|
|
||||||
help
|
|
||||||
With this enabled, applications and parts of code can register for MCUmgr event
|
|
||||||
notifications which will result in callbacks when a registered event occurs. Note that
|
|
||||||
this enables the base notification functionality but itself does not enable any
|
|
||||||
notifications, which must be enabled by selecting other Kconfig options.
|
|
||||||
|
|
||||||
To enable notifications in code, mgmt_callback_register() must be called with the
|
|
||||||
callback function and events that want to be received. Multiple handlers can be
|
|
||||||
registered and will all be called when registered events occur.
|
|
||||||
|
|
||||||
Some callbacks support notifying the calling function of a status, in which to accept
|
|
||||||
or decline the current operation, by returning false this will signal to the calling
|
|
||||||
function that the request should be denied, for informal-only notifications or
|
|
||||||
acceptable, true must be returned by all the registered notification handlers.
|
|
||||||
|
|
||||||
config MCUMGR_SMP_COMMAND_STATUS_HOOKS
|
|
||||||
bool "SMP command status hooks"
|
|
||||||
depends on MCUMGR_MGMT_NOTIFICATION_HOOKS
|
|
||||||
help
|
|
||||||
This will enable SMP command status notification hooks for when an SMP message is
|
|
||||||
received or processed.
|
|
||||||
|
|
||||||
config MCUMGR_SMP_LEGACY_RC_BEHAVIOUR
|
config MCUMGR_SMP_LEGACY_RC_BEHAVIOUR
|
||||||
bool "Legacy rc (result code) response behaviour"
|
bool "Legacy rc (result code) response behaviour"
|
||||||
|
@ -142,8 +44,4 @@ rsource "transport/Kconfig"
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
module = MCUMGR_TRANSPORT
|
|
||||||
module-str = mcumgr_transport
|
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
|
||||||
|
|
||||||
endif # MCUMGR
|
endif # MCUMGR
|
||||||
|
|
|
@ -2,12 +2,19 @@
|
||||||
# Copyright Nordic Semiconductor ASA 2020-2022. All rights reserved.
|
# Copyright Nordic Semiconductor ASA 2020-2022. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
config MCUMGR_SMP_VERBOSE_ERR_RESPONSE
|
config MCUMGR_MGMT_NOTIFICATION_HOOKS
|
||||||
bool "Support verbose error response"
|
bool "MCUmgr notification hook support"
|
||||||
help
|
help
|
||||||
Support for encoding "rc" code explanation in form of "rsn"
|
With this enabled, applications and parts of code can register for MCUmgr event
|
||||||
text string. This is useful, when returning MGMT_ERR_EUNKNOWN,
|
notifications which will result in callbacks when a registered event occurs. Note that
|
||||||
to add additional information on the source of an error.
|
this enables the base notification functionality but itself does not enable any
|
||||||
Note that the "rsn" is string additional to "rc" code,
|
notifications, which must be enabled by selecting other Kconfig options.
|
||||||
so MCUMGR_TRANSPORT_NETBUF_SIZE should be large enough to be able
|
|
||||||
to encode both.
|
To enable notifications in code, mgmt_callback_register() must be called with the
|
||||||
|
callback function and events that want to be received. Multiple handlers can be
|
||||||
|
registered and will all be called when registered events occur.
|
||||||
|
|
||||||
|
Some callbacks support notifying the calling function of a status, in which to accept
|
||||||
|
or decline the current operation, by returning false this will signal to the calling
|
||||||
|
function that the request should be denied, for informal-only notifications or
|
||||||
|
acceptable, true must be returned by all the registered notification handlers.
|
||||||
|
|
83
subsys/mgmt/mcumgr/smp/Kconfig
Normal file
83
subsys/mgmt/mcumgr/smp/Kconfig
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
# Copyright Runtime.io 2018. All rights reserved.
|
||||||
|
# Copyright Nordic Semiconductor ASA 2020-2022. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config MCUMGR_SMP_CBOR_MAX_MAIN_MAP_ENTRIES
|
||||||
|
int "Number of predicted maximum entries to main response map"
|
||||||
|
default 15
|
||||||
|
help
|
||||||
|
This is number of predicted entries in main response map,
|
||||||
|
the one that encapsulates everything within response.
|
||||||
|
This value is used by zcbor to predict needed map encoding,
|
||||||
|
and does not affect memory allocation or usage.
|
||||||
|
Builtin command processors rarely add large amounts of
|
||||||
|
data directly to main map, creating sub-maps instead so
|
||||||
|
the default value works fine with them.
|
||||||
|
If your app directly adds fields to main map, without
|
||||||
|
encapsulating them, you may want to increase this value
|
||||||
|
in case when encoding starts to fail.
|
||||||
|
|
||||||
|
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVELS
|
||||||
|
int
|
||||||
|
help
|
||||||
|
Minimal decoding levels, map/list encapsulation, required
|
||||||
|
to be supported by zcbor decoding of SMP responses
|
||||||
|
is auto genereated from MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_? options.
|
||||||
|
A group or command that adds additional maps/lists above the
|
||||||
|
base map, which is already taken into account, should
|
||||||
|
select one of the MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_?.
|
||||||
|
default 5 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_5
|
||||||
|
default 4 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_4
|
||||||
|
default 3 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_3
|
||||||
|
default 2 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_2
|
||||||
|
default 1 if MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_1
|
||||||
|
default 0
|
||||||
|
|
||||||
|
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_1
|
||||||
|
bool
|
||||||
|
|
||||||
|
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_2
|
||||||
|
bool
|
||||||
|
|
||||||
|
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_3
|
||||||
|
bool
|
||||||
|
|
||||||
|
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_4
|
||||||
|
bool
|
||||||
|
|
||||||
|
config MCUMGR_SMP_CBOR_MIN_DECODING_LEVEL_5
|
||||||
|
bool
|
||||||
|
|
||||||
|
config MCUMGR_SMP_CBOR_MAX_DECODING_LEVELS
|
||||||
|
int "Number of map/list encapsulations allowed by SMP encoding"
|
||||||
|
range MCUMGR_SMP_CBOR_MIN_DECODING_LEVELS 15
|
||||||
|
default MCUMGR_SMP_CBOR_MIN_DECODING_LEVELS
|
||||||
|
help
|
||||||
|
This is a maximum number of levels of maps/lists that will
|
||||||
|
be expected to be decoded within different command groups.
|
||||||
|
SMP commands/groups that provide no CBOR encoded payload
|
||||||
|
have no requirements.
|
||||||
|
Commands that provide CBOR payload require at least 1 level,
|
||||||
|
and additional levels for each map/list encapsulation.
|
||||||
|
For example if command accepts payload of map of parameters
|
||||||
|
it will need 2 levels.
|
||||||
|
This number translates to zcbor backup states, it increases
|
||||||
|
size of cbor_nb_reader structure by zcbor_state_t size per
|
||||||
|
one unit selected here.
|
||||||
|
|
||||||
|
config MCUMGR_SMP_COMMAND_STATUS_HOOKS
|
||||||
|
bool "SMP command status hooks"
|
||||||
|
depends on MCUMGR_MGMT_NOTIFICATION_HOOKS
|
||||||
|
help
|
||||||
|
This will enable SMP command status notification hooks for when an SMP message is
|
||||||
|
received or processed.
|
||||||
|
|
||||||
|
config MCUMGR_SMP_VERBOSE_ERR_RESPONSE
|
||||||
|
bool "Support verbose error response"
|
||||||
|
help
|
||||||
|
Support for encoding "rc" code explanation in form of "rsn"
|
||||||
|
text string. This is useful, when returning MGMT_ERR_EUNKNOWN,
|
||||||
|
to add additional information on the source of an error.
|
||||||
|
Note that the "rsn" is string additional to "rc" code,
|
||||||
|
so MCUMGR_TRANSPORT_NETBUF_SIZE should be large enough to be able
|
||||||
|
to encode both.
|
|
@ -2,6 +2,18 @@
|
||||||
# Copyright Nordic Semiconductor ASA 2020-2022. All rights reserved.
|
# Copyright Nordic Semiconductor ASA 2020-2022. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE
|
||||||
|
int "MCUmgr transport workqueue stack size"
|
||||||
|
default 2048
|
||||||
|
help
|
||||||
|
Stack size of the MCUmgr for transport subsystem work queue.
|
||||||
|
|
||||||
|
config MCUMGR_TRANSPORT_WORKQUEUE_THREAD_PRIO
|
||||||
|
int "MCUmgr transport workqueue thread priority"
|
||||||
|
default 3
|
||||||
|
help
|
||||||
|
Scheduling priority of the MCUmgr transport subsystem work queue.
|
||||||
|
|
||||||
config MCUMGR_TRANSPORT_REASSEMBLY
|
config MCUMGR_TRANSPORT_REASSEMBLY
|
||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
|
@ -40,6 +52,10 @@ config MCUMGR_TRANSPORT_NETBUF_USER_DATA_SIZE
|
||||||
is sufficient for Bluetooth. For UDP, the userdata must be large
|
is sufficient for Bluetooth. For UDP, the userdata must be large
|
||||||
enough to hold a IPv4/IPv6 address.
|
enough to hold a IPv4/IPv6 address.
|
||||||
|
|
||||||
|
module = MCUMGR_TRANSPORT
|
||||||
|
module-str = mcumgr_transport
|
||||||
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
||||||
rsource "Kconfig.dummy"
|
rsource "Kconfig.dummy"
|
||||||
|
|
||||||
rsource "Kconfig.bluetooth"
|
rsource "Kconfig.bluetooth"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue