blob: 92944dbed8616f0bd1b99d7419a386e66109c434 [file] [log] [blame]
#
# Copyright (c) 2021 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.
#
CONFIG_CHIP=y
CONFIG_STD_CPP14=y
# Logging
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_PRINTK=y
CONFIG_ASSERT=y
CONFIG_CBPRINTF_LIBC_SUBSTS=y
CONFIG_MATTER_LOG_LEVEL_DBG=y
# Generic networking options
CONFIG_NETWORKING=y
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=n
# Disable TCP and IPv4 (TCP disabled to avoid heavy traffic)
CONFIG_NET_TCP=n
CONFIG_NET_IPV4=n
CONFIG_NET_CONFIG_NEED_IPV4=n
CONFIG_NET_CONFIG_MY_IPV4_ADDR=""
CONFIG_NET_CONFIG_PEER_IPV4_ADDR=""
# Application stack size
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_INIT_STACKS=y
# Disable certain parts of Zephyr IPv6 stack
CONFIG_NET_IPV6_NBR_CACHE=n
CONFIG_NET_IPV6_MLD=n
CONFIG_NET_MAX_CONN=1
CONFIG_NET_MAX_CONTEXTS=1
# Network buffers
CONFIG_NET_PKT_RX_COUNT=8
CONFIG_NET_PKT_TX_COUNT=8
CONFIG_NET_BUF_RX_COUNT=32
CONFIG_NET_BUF_TX_COUNT=32
# Bluetooth Low Energy configs
CONFIG_BT=n
# L2 OpenThread enabling
CONFIG_NET_L2_OPENTHREAD=y
CONFIG_OPENTHREAD_DEBUG=y
CONFIG_OPENTHREAD_L2_DEBUG=y
CONFIG_OPENTHREAD_L2_LOG_LEVEL_INF=y
CONFIG_NET_CONFIG_IEEE802154_DEV_NAME="IEEE802154"
CONFIG_NET_CONFIG_MY_IPV6_ADDR="fdde:ad00:beef::1"
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="fdde:ad00:beef::2"
# OpenThread configs
CONFIG_OPENTHREAD_SLAAC=y
CONFIG_OPENTHREAD_DHCP6_CLIENT=y
CONFIG_OPENTHREAD_SNTP_CLIENT=y
CONFIG_OPENTHREAD_DNS_CLIENT=y
CONFIG_OPENTHREAD_MTD_NETDIAG=y
CONFIG_OPENTHREAD_ENABLE_SERVICE=y
CONFIG_OPENTHREAD_MANUAL_START=y
CONFIG_OPENTHREAD_THREAD_STACK_SIZE=6144
CONFIG_OPENTHREAD_LOG_LEVEL_DEBG=y
# Enable Thread 1.2 features
CONFIG_OPENTHREAD_THREAD_VERSION_1_2=y
CONFIG_OPENTHREAD_DUA=y
CONFIG_OPENTHREAD_MLR=y
# mbedTLS tweaks
CONFIG_MBEDTLS_DEBUG=y
CONFIG_MBEDTLS_USER_CONFIG_ENABLE=y
CONFIG_MBEDTLS_USER_CONFIG_FILE="telink-mbedtls-config.h"
# TBD: Something wrong with this heap. Need to be investigated. Cirrently just set minimal size
CONFIG_MBEDTLS_HEAP_SIZE=0
CONFIG_OPENTHREAD_EXTERNAL_HEAP=y
# Switch on Telink SDK
CONFIG_TELINK_BLE_LIB=y
# Config dynamic interrupts to have posibility to switch between BLE/Thread radio drivers
CONFIG_DYNAMIC_INTERRUPTS=y
# Set multiplicator of Name Value Storage (NVS) as 8 to reach NVS sector size 2048
# nvs_sector_size = flash_page_size * mult = 256 * 8 = 2048
CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=8
# Shall settings
CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=255