Files
esphome-yambms/packages/board/board_options_PSRAM_options.yaml

37 lines
2.0 KiB
YAML

# Updated : 2026.07.30
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
# This file optimizes the use of the ESP32-S3 PSRAM by authorizing or forcing
# certain data to be written to the PSRAM rather than to the internal RAM.
# The configuration presented here already seems stable for several users and
# visibly offers better behavior of the esp when it contains a lot of entities.
# YamBMS default PSRAM options (ESP-IDF 5.5+)
esp32:
framework:
sdkconfig_options:
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY: y # Enables EXT_RAM_BSS_ATTR - pair with the next line
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP: y # Moves LWIP/WiFi statics to PSRAM - frees 12308 B of DRAM
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL: "65536" # (64KB 65536) Reserve this amount of bytes for data that specifically needs to be in DMA or internal memory. Default value: 32768
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL: "4096" # ( 4KB 4096) Maximum malloc() size, in bytes, to always put in internal memory. Default value: 16384
# BLE Bluedroid (this is taken into account ONLY if a BLE component is imported)
CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: y # Bluedroid allocates from PSRAM first
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: y # Bluedroid env dynamic instead of static .bss