mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
fix(l2): WiFi fails to start or join - big statics and task stacks to PSRAM
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>
This commit is contained in:
@@ -25,3 +25,10 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user