blob: c93e832efba23a1c02e1436c950882fd5b994400 [file]
#
# Copyright (c) 2026 Project CHIP Authors
# All rights reserved.
#
# 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.
#
# Description:
# Optional overlay that trades WiFi throughput and the debug shell for
# heap headroom. Concurrent BLE + WiFi + software P-256 during
# commissioning can exhaust internal RAM on single-SRAM SoCs such as
# ESP32-C3 (see issue #74665).
#
# Usage:
# idf.py -D SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.optimized" set-target <target> build
#
# Matter commissioning only needs the peripheral/broadcaster BLE roles.
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
CONFIG_BT_NIMBLE_ROLE_OBSERVER=n
# Default WiFi buffer pools (10 static RX, 32/32 dynamic RX/TX) are sized for
# throughput; a lighting device does not need them.
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=6
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=16
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=16
# Place WiFi and heap code in flash instead of IRAM. On SoCs with unified
# SRAM (ESP32-C2/C3/C6) the freed IRAM directly increases the heap.
# CONFIG_ESP_WIFI_IRAM_OPT is not set
# CONFIG_ESP_WIFI_RX_IRAM_OPT is not set
CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH=y
# Disable chip shell (task stack + line buffers).
CONFIG_ENABLE_CHIP_SHELL=n
# Shrink lwIP mailboxes.
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=16
CONFIG_LWIP_TCP_RECVMBOX_SIZE=8