mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-01 10:21:59 +00:00
WiFi starts and joins on internal RAM: ~42 KB the first time, ~25 KB after, more for WPA. Free internal RAM had shrunk to ~20 KB after opening the map (the tile decoder's 12 KB stack, the 32 KB I-cache, the DMA draw buffers, UI statics), so a scan failed at once (esp_wifi_init: no memory) and a join during a tile download timed out (AUTH_EXPIRE). - ESP-IDF: CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY, and the esp_timer task stack 8 -> 4 KB (it uses ~0.4 KB). Rebuild the framework libs: pio run -e Wio_Tracker_L2_idf_libs. - PSRAM_BSS (EXT_RAM_BSS_ATTR) on the UI's big statics: QR codes, map state, charts, lists. .dram0.bss 115 -> 66 KB. - The tile decoder's and fetcher's task stacks in PSRAM. Free internal RAM, idle: 48 -> 105 KB; WiFi up: 57 KB, 29 KB at the lowest while downloading tiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
# ESP-IDF options for the L2's LVGL firmware, over the Arduino framework's own
|
|
# (custom_sdkconfig in solo/wio-tracker-l2/platformio.ini; changing this file
|
|
# means rebuilding the framework libs: pio run -e Wio_Tracker_L2_idf_libs).
|
|
|
|
# The reason for all this: a 32 KB instruction cache (the framework ships
|
|
# 16 KB) and 64-byte data cache lines. LVGL runs from flash and draws into
|
|
# PSRAM; frames draw ~35% faster. Costs 16 KB internal RAM.
|
|
CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB=y
|
|
CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y
|
|
|
|
# ...won back, and more: TLS (map downloads, live tiles, OTA) and the BLE
|
|
# host keep their buffers in PSRAM.
|
|
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
|
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL=y
|
|
|
|
# What the framework's own build sets for octal-PSRAM boards, which a rebuild
|
|
# from its generic config would lose: PSRAM up before global constructors
|
|
# (MESH_IN_PSRAM needs it), WiFi TX buffers allocated as needed.
|
|
CONFIG_SPIRAM_BOOT_HW_INIT=y
|
|
CONFIG_SPIRAM_BOOT_INIT=y
|
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
|
CONFIG_SPIRAM_PRE_CONFIGURE_MEMORY_PROTECTION=y
|
|
# CONFIG_SPIRAM_MEMTEST is not set
|
|
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER=y
|
|
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=32
|
|
CONFIG_ESP_WIFI_RX_BA_WIN=6
|
|
CONFIG_LWIP_TCP_OOSEQ_MAX_PBUFS=4
|
|
|
|
# Internal RAM is what WiFi starts and joins on (~25 KB, more for WPA): big
|
|
# zero-initialised statics marked EXT_RAM_BSS_ATTR (QR codes, map state,
|
|
# charts...) go to PSRAM instead.
|
|
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
|
|
# Its callbacks are short (~0.4 KB of stack used): half the framework's 8 KB.
|
|
CONFIG_ESP_TIMER_TASK_STACK_SIZE=4096
|