| # |
| # Copyright (c) 2022 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| # The purpose of this file is to define new default values of settings used when building Matter samples. |
| # This file only changes defaults and thus all symbols here must be promptless |
| # and safeguarded so that they only are applied when building Matter. |
| |
| if CHIP |
| |
| config LOG |
| default y |
| |
| if LOG |
| |
| choice LOG_MODE |
| default LOG_MODE_MINIMAL |
| endchoice |
| |
| choice MATTER_LOG_LEVEL_CHOICE |
| default MATTER_LOG_LEVEL_DBG |
| endchoice |
| |
| config CHIP_APP_LOG_LEVEL |
| default 4 # debug |
| |
| config LOG_DEFAULT_LEVEL |
| default 1 # error |
| |
| config CHIP_LOG_SIZE_OPTIMIZATION |
| default y |
| |
| endif |
| |
| config PRINTK_SYNC |
| default y |
| |
| config ASSERT |
| default y |
| |
| config ASSERT_NO_COND_INFO |
| default y |
| |
| config ASSERT_NO_MSG_INFO |
| default y |
| |
| config HW_STACK_PROTECTION |
| default y |
| |
| config FPU |
| default y |
| |
| config SHELL |
| default y |
| |
| config SHELL_MINIMAL |
| default y |
| |
| # Enable getting reboot reasons information |
| config HWINFO |
| bool |
| default y |
| |
| config HWINFO_SHELL |
| bool |
| default n |
| |
| config PTHREAD_IPC |
| bool |
| default n |
| |
| config POSIX_MAX_FDS |
| int |
| default 16 |
| |
| # Application stack size |
| config MAIN_STACK_SIZE |
| default 6144 |
| |
| config INIT_STACKS |
| default y |
| |
| config NET_IPV6_MLD |
| default y |
| |
| config NET_IF_MCAST_IPV6_ADDR_COUNT |
| default 14 |
| |
| # Network buffers |
| config NET_PKT_RX_COUNT |
| default 8 |
| |
| config NET_PKT_TX_COUNT |
| default 8 |
| |
| config NET_BUF_RX_COUNT |
| default 16 |
| |
| config NET_BUF_TX_COUNT |
| default 16 |
| |
| # Bluetooth Low Energy configs |
| |
| config BT |
| default y |
| |
| config BT_PERIPHERAL |
| default y |
| |
| config BT_PERIPHERAL_PREF_MIN_INT |
| default 36 |
| |
| config BT_PERIPHERAL_PREF_MAX_INT |
| default 36 |
| |
| # Increase BT timeout to 5 s to improve connection reliability and avoid fast drop outs. |
| config BT_PERIPHERAL_PREF_TIMEOUT |
| default 500 |
| |
| config BT_GAP_AUTO_UPDATE_CONN_PARAMS |
| default y |
| |
| # Decrease connection parameters update time, as some Matter controllers request |
| # enabling IP networking faster than BT connection parameters are updated, what may result |
| # in commissioning instabilities. |
| config BT_CONN_PARAM_UPDATE_TIMEOUT |
| default 1000 |
| |
| config BT_GATT_DYNAMIC_DB |
| default y |
| |
| config BT_DEVICE_NAME_DYNAMIC |
| default y |
| |
| config BT_DEVICE_NAME_MAX |
| default 15 |
| |
| config BT_MAX_CONN |
| default 1 |
| |
| config BT_L2CAP_TX_MTU |
| default 247 |
| |
| config BT_BUF_ACL_RX_SIZE |
| default 251 |
| |
| config BT_BUF_ACL_TX_SIZE |
| default 251 |
| |
| config BT_RX_STACK_SIZE |
| default 1200 |
| |
| config BT_CTLR_ECDH |
| bool |
| default n |
| |
| config BT_CTLR_LE_ENC |
| bool |
| default n |
| |
| config BT_DEVICE_NAME_GATT_WRITABLE |
| bool |
| default n |
| |
| config BT_GATT_CACHING |
| bool |
| default n |
| |
| # Disable 2M PHY due to interoperability issues. |
| config BT_CTLR_PHY_2M |
| default n |
| |
| # Enable NFC support |
| |
| config CHIP_NFC_COMMISSIONING |
| default y |
| |
| # Disable not needed NFC callback to save flash |
| config NFC_THREAD_CALLBACK |
| bool |
| default n |
| |
| config CHIP_OTA_REQUESTOR |
| default y |
| |
| # All boards besides nRF7002DK use QSPI NOR external flash |
| if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 |
| |
| config CHIP_QSPI_NOR |
| default y |
| |
| endif # BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 |
| |
| # nRF7002DK uses SPI NOR external flash |
| |
| if BOARD_NRF7002DK_NRF5340_CPUAPP |
| |
| config CHIP_SPI_NOR |
| default y |
| |
| endif # BOARD_NRF7002DK_NRF5340_CPUAPP |
| |
| # Enable extended discovery |
| config CHIP_EXTENDED_DISCOVERY |
| default n |
| |
| config NVS_LOOKUP_CACHE_SIZE |
| default 512 |
| |
| # Enable OpenThread |
| |
| config NET_L2_OPENTHREAD |
| default y if !WIFI_NRF700X |
| |
| if NET_L2_OPENTHREAD |
| |
| # Disable OpenThread shell |
| config OPENTHREAD_SHELL |
| default n |
| |
| # Disable certain parts of Zephyr IPv6 stack |
| config NET_IPV6_NBR_CACHE |
| bool |
| default n |
| |
| # Increase the default RX stack size |
| config IEEE802154_NRF5_RX_STACK_SIZE |
| default 1024 |
| |
| config OPENTHREAD_THREAD_STACK_SIZE |
| default 4096 |
| |
| endif |
| |
| if CHIP_WIFI |
| |
| choice WPA_SUPP_LOG_LEVEL_CHOICE |
| default WPA_SUPP_LOG_LEVEL_ERR |
| endchoice |
| |
| # increase the prefixes limit to match |
| # maximum number of IPv6 addresses per interface |
| config NET_IF_IPV6_PREFIX_COUNT |
| default 6 |
| |
| # it saves us 20kB of FLASH |
| config WPA_SUPP_NO_DEBUG |
| default y |
| |
| config NRF700X_LOG_VERBOSE |
| default n |
| |
| choice WIFI_NRF700X_LOG_LEVEL_CHOICE |
| default WIFI_NRF700X_LOG_LEVEL_OFF |
| endchoice |
| |
| config NRF_WIFI_LOW_POWER |
| default n |
| |
| config NRF700X_RX_NUM_BUFS |
| default 16 |
| |
| config NRF700X_TX_MAX_DATA_SIZE |
| default 1280 |
| |
| config NRF700X_RX_MAX_DATA_SIZE |
| default 1280 |
| |
| config NRF700X_MAX_TX_TOKENS |
| default 10 |
| |
| config NRF700X_MAX_TX_AGGREGATION |
| default 1 |
| |
| config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG |
| default n |
| |
| config SYSTEM_WORKQUEUE_STACK_SIZE |
| default 2560 |
| |
| # align these numbers to match the OpenThread config |
| config NET_IF_UNICAST_IPV6_ADDR_COUNT |
| default 6 |
| |
| config NET_IF_MCAST_IPV6_ADDR_COUNT |
| default 8 |
| |
| config NET_SOCKETS_POLL_MAX |
| default 6 |
| |
| config MBEDTLS_SSL_OUT_CONTENT_LEN |
| default 900 |
| |
| # options managed by IP4/IP6 simultaneous support |
| # aligned here to match OpenThread config |
| config NET_MAX_ROUTERS |
| default 1 |
| |
| config NET_MAX_CONN |
| default 4 |
| |
| config SHELL_STACK_SIZE |
| default 2616 |
| |
| config HEAP_MEM_POOL_SIZE |
| default 80000 |
| |
| endif |
| |
| config CHIP_MALLOC_SYS_HEAP_SIZE |
| default 28672 if CHIP_WIFI |
| default 8192 if NET_L2_OPENTHREAD |
| |
| # Enable mbedTLS from nrf_security library |
| |
| choice OPENTHREAD_SECURITY |
| default OPENTHREAD_NRF_SECURITY_CHOICE |
| endchoice |
| |
| config PSA_CRYPTO_DRIVER_CC3XX |
| default n |
| |
| config OBERON_BACKEND |
| default y |
| |
| config MBEDTLS_ENABLE_HEAP |
| default y |
| |
| config MBEDTLS_HEAP_SIZE |
| default 8192 |
| |
| config NRF_SECURITY_ADVANCED |
| default y |
| |
| config MBEDTLS_AES_C |
| default y |
| |
| config MBEDTLS_ECP_C |
| default y |
| |
| config MBEDTLS_ECP_DP_SECP256R1_ENABLED |
| default y |
| |
| config MBEDTLS_CTR_DRBG_C |
| default y |
| |
| config MBEDTLS_CIPHER_MODE_CTR |
| default y |
| |
| config MBEDTLS_SHA256_C |
| default y |
| |
| config MBEDTLS_PK_C |
| default y |
| |
| config MBEDTLS_PK_WRITE_C |
| default y |
| |
| config MBEDTLS_X509_CREATE_C |
| default y if !CHIP_CRYPTO_PSA |
| |
| config MBEDTLS_X509_CSR_WRITE_C |
| default y if !CHIP_CRYPTO_PSA |
| |
| # Disable unneeded crypto operations |
| |
| config MBEDTLS_SHA384_C |
| default n |
| |
| config MBEDTLS_SHA512_C |
| default n |
| |
| config MBEDTLS_CIPHER_MODE_XTS |
| default n |
| |
| config MBEDTLS_CHACHA20_C |
| default n |
| |
| config MBEDTLS_POLY1305_C |
| default n |
| |
| config MBEDTLS_CHACHAPOLY_C |
| default n |
| |
| config MBEDTLS_GCM_C |
| default n |
| |
| config MBEDTLS_RSA_C |
| default n |
| |
| config MBEDTLS_SSL_SRV_C |
| default n |
| |
| config MBEDTLS_SSL_COOKIE_C |
| default n |
| |
| # Disable not used shell modules |
| |
| config SHELL_WILDCARD |
| default n |
| |
| config SHELL_VT100_COLORS |
| default n |
| |
| config SHELL_STATS |
| default n |
| |
| config KERNEL_SHELL |
| default n |
| |
| config SENSOR_SHELL |
| default n |
| |
| config DEVICE_SHELL |
| default n |
| |
| config DATE_SHELL |
| default n |
| |
| config DEVMEM_SHELL |
| default n |
| |
| config MCUBOOT_SHELL |
| default n |
| |
| config CLOCK_CONTROL_NRF_SHELL |
| default n |
| |
| config FLASH_SHELL |
| default n |
| |
| if MPSL_FEM |
| |
| config MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL |
| default y |
| |
| endif # MPSL_FEM |
| |
| config OPENTHREAD_DEFAULT_TX_POWER |
| default 20 if MPSL_FEM |
| default 3 if SOC_SERIES_NRF53X && !MPSL_FEM |
| default 8 if SOC_SERIES_NRF52X && !MPSL_FEM |
| |
| # SoC series related configuration |
| |
| if SOC_SERIES_NRF52X |
| |
| # Increase maximum data length of PDU supported in the Controller |
| config BT_CTLR_DATA_LENGTH_MAX |
| default 251 |
| |
| endif # SOC_SERIES_NRF52X |
| |
| if SOC_SERIES_NRF53X |
| |
| config BOOT_IMAGE_ACCESS_HOOKS |
| default y |
| |
| config UPDATEABLE_IMAGE_NUMBER |
| default 2 |
| |
| # Generate random numbers using Xoroshiro algorithm instead of direct calls |
| # to the cryptocell library to workaround firmware hangs. |
| choice RNG_GENERATOR_CHOICE |
| default XOROSHIRO_RANDOM_GENERATOR |
| endchoice |
| |
| endif # SOC_SERIES_NRF53X |
| |
| endif |