net: openthread: Simplify openthread enabling
Currently user needs to specify quite much additional options to enable OpenThread support. He also needs to set ip address count, heap size, etc depending on features enabled. Nade changes to automatically select/set some of the options on enabling OpenThread Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
This commit is contained in:
parent
9c65a17743
commit
81e0a05285
3 changed files with 22 additions and 7 deletions
|
@ -111,6 +111,7 @@ config MBEDTLS_ENABLE_HEAP
|
||||||
|
|
||||||
config MBEDTLS_HEAP_SIZE
|
config MBEDTLS_HEAP_SIZE
|
||||||
int "Heap size for mbed TLS"
|
int "Heap size for mbed TLS"
|
||||||
|
default 10240 if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER
|
||||||
default 512
|
default 512
|
||||||
depends on MBEDTLS_ENABLE_HEAP
|
depends on MBEDTLS_ENABLE_HEAP
|
||||||
help
|
help
|
||||||
|
|
|
@ -23,10 +23,12 @@ config NET_IF_MAX_IPV6_COUNT
|
||||||
|
|
||||||
config NET_IF_UNICAST_IPV6_ADDR_COUNT
|
config NET_IF_UNICAST_IPV6_ADDR_COUNT
|
||||||
int "Max number of unicast IPv6 addresses per network interface"
|
int "Max number of unicast IPv6 addresses per network interface"
|
||||||
|
default 6 if NET_L2_OPENTHREAD
|
||||||
default 2
|
default 2
|
||||||
|
|
||||||
config NET_IF_MCAST_IPV6_ADDR_COUNT
|
config NET_IF_MCAST_IPV6_ADDR_COUNT
|
||||||
int "Max number of multicast IPv6 addresses per network interface"
|
int "Max number of multicast IPv6 addresses per network interface"
|
||||||
|
default 8 if NET_L2_OPENTHREAD
|
||||||
default 3
|
default 3
|
||||||
|
|
||||||
config NET_IF_IPV6_PREFIX_COUNT
|
config NET_IF_IPV6_PREFIX_COUNT
|
||||||
|
|
|
@ -8,12 +8,20 @@
|
||||||
#
|
#
|
||||||
menuconfig NET_L2_OPENTHREAD
|
menuconfig NET_L2_OPENTHREAD
|
||||||
bool "OpenThread L2"
|
bool "OpenThread L2"
|
||||||
depends on FLASH
|
depends on NETWORKING
|
||||||
depends on FLASH_PAGE_LAYOUT
|
|
||||||
depends on CPLUSPLUS
|
select SETTINGS
|
||||||
depends on REBOOT
|
select FLASH
|
||||||
depends on SETTINGS
|
select FLASH_PAGE_LAYOUT
|
||||||
|
select FLASH_MAP
|
||||||
|
select MPU_ALLOW_FLASH_WRITE
|
||||||
|
select NVS
|
||||||
|
|
||||||
select OPENTHREAD_PLAT
|
select OPENTHREAD_PLAT
|
||||||
|
select CPLUSPLUS
|
||||||
|
select REBOOT
|
||||||
|
select ENTROPY_GENERATOR
|
||||||
|
|
||||||
select MBEDTLS
|
select MBEDTLS
|
||||||
select MBEDTLS_ENABLE_HEAP
|
select MBEDTLS_ENABLE_HEAP
|
||||||
select MBEDTLS_CIPHER_AES_ENABLED
|
select MBEDTLS_CIPHER_AES_ENABLED
|
||||||
|
@ -24,6 +32,10 @@ menuconfig NET_L2_OPENTHREAD
|
||||||
select MBEDTLS_CIPHER
|
select MBEDTLS_CIPHER
|
||||||
select MBEDTLS_MD
|
select MBEDTLS_MD
|
||||||
|
|
||||||
|
imply NET_UDP
|
||||||
|
imply NET_IPV6
|
||||||
|
imply NET_CONFIG_NEED_IPV6
|
||||||
|
|
||||||
if NET_L2_OPENTHREAD
|
if NET_L2_OPENTHREAD
|
||||||
|
|
||||||
config OPENTHREAD_DTLS
|
config OPENTHREAD_DTLS
|
||||||
|
@ -187,7 +199,7 @@ config OPENTHREAD_COMMISSIONER
|
||||||
Enable commissioner capability in OpenThread stack. Note, that DTLS
|
Enable commissioner capability in OpenThread stack. Note, that DTLS
|
||||||
handshake used in the commissioning procedure requires a larger
|
handshake used in the commissioning procedure requires a larger
|
||||||
mbedTLS heap than the default value. A minimum recommended value of
|
mbedTLS heap than the default value. A minimum recommended value of
|
||||||
CONFIG_MBEDTLS_HEAP_SIZE for the commissioning is 8KB.
|
CONFIG_MBEDTLS_HEAP_SIZE for the commissioning is 10KB.
|
||||||
|
|
||||||
config OPENTHREAD_JOINER
|
config OPENTHREAD_JOINER
|
||||||
bool "Joiner functions support"
|
bool "Joiner functions support"
|
||||||
|
@ -196,7 +208,7 @@ config OPENTHREAD_JOINER
|
||||||
Enable joiner capability in OpenThread stack. Note, that DTLS
|
Enable joiner capability in OpenThread stack. Note, that DTLS
|
||||||
handshake used in the commissioning procedure requires a larger
|
handshake used in the commissioning procedure requires a larger
|
||||||
mbedTLS heap than the default value. A minimum recommended value of
|
mbedTLS heap than the default value. A minimum recommended value of
|
||||||
CONFIG_MBEDTLS_HEAP_SIZE for the commissioning is 8KB.
|
CONFIG_MBEDTLS_HEAP_SIZE for the commissioning is 10KB.
|
||||||
|
|
||||||
config OPENTHREAD_JOINER_AUTOSTART
|
config OPENTHREAD_JOINER_AUTOSTART
|
||||||
bool "Support for automatic joiner start"
|
bool "Support for automatic joiner start"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue