blob: ec5f0adb843360c020499da649b1a282f017d0e3 [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 (set CONFIG_SERIAL to 'y' to enable logging and 'n' to disable logging)
CONFIG_SERIAL=y
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_PRINTK=y
# CONFIG_ASSERT=y
CONFIG_CBPRINTF_LIBC_SUBSTS=y
# Set the maximum log level (DEBUG)
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_MATTER_LOG_LEVEL_DBG=y
CONFIG_MCUBOOT_BOOTUTIL_LIB=y
CONFIG_MCUBOOT_UTIL_LOG_LEVEL_DBG=y
CONFIG_NET_LOG=y
CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y
CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_OPENTHREAD_LOG_LEVEL_DEBG=y
CONFIG_OPENTHREAD_L2_LOG_LEVEL_DBG=y
# Set the actual log level
# - 0 OFF, logging is turned off
# - 1 ERROR, maximal level set to LOG_LEVEL_ERR
# - 2 WARNING, maximal level set to LOG_LEVEL_WRN
# - 3 INFO, maximal level set to LOG_LEVEL_INFO
# - 4 DEBUG, maximal level set to LOG_LEVEL_DBG
CONFIG_LOG_MAX_LEVEL=3
# Generic networking options
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=n
CONFIG_NET_CONFIG_INIT_TIMEOUT=0
# 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
CONFIG_IDLE_STACK_SIZE=512
# 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=y
CONFIG_BT_DEBUG_LOG=n
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_MAX_CONN=1
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_GATT_DYNAMIC_DB=y
# CONFIG_BT_DEVICE_NAME_MAX=15
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251
# L2 OpenThread enabling
CONFIG_NET_L2_OPENTHREAD=y
CONFIG_OPENTHREAD_DEBUG=y
CONFIG_OPENTHREAD_L2_DEBUG=y
# OpenThread configs
CONFIG_OPENTHREAD_SLAAC=y
CONFIG_OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE=608
CONFIG_OPENTHREAD_MANUAL_START=y
# mbedTLS tweaks
CONFIG_MBEDTLS_TEST=y
CONFIG_MBEDTLS_PKCS5_C=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
# 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 16 to reach NVS sector size 4096
# nvs_sector_size = flash_page_size * mult = 256 * 16 = 4096
CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=16
# Enable NVS lookup cache
CONFIG_NVS_LOOKUP_CACHE=y
CONFIG_NVS_LOOKUP_CACHE_SIZE=512
# Reboot system when fault happened
CONFIG_TELINK_B91_REBOOT_ON_FAULT=y
# Shell settings
CONFIG_SHELL=n
# BLE MAC address
CONFIG_B91_BLE_CTRL_MAC_FLASH_ADDR=0x1FE000
# getopt version
CONFIG_GETOPT_LONG=y
# flash stream functionality
CONFIG_STREAM_FLASH=y
CONFIG_STREAM_FLASH_ERASE=y
# In current config/zephyr/Kconfig
# next deprecated values are selected
# warning: Deprecated symbol CPLUSPLUS is enabled.
# warning: Deprecated symbol LIB_CPLUSPLUS is enabled.
# new one are:
# CONFIG_CPP
# CONFIG_LIBCPP_IMPLEMENTATION
# See https://docs.zephyrproject.org/latest/releases/release-notes-3.3.html
# Since not only Telink is using Zephyr just suppress warnings
CONFIG_WARN_DEPRECATED=n