mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +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:
@@ -876,7 +876,7 @@ void UITask::takeScreenshot() {
|
||||
put32(2, size); put32(10, 54); put32(14, 40); put32(18, W); put32(22, H);
|
||||
hdr[26] = 1; hdr[28] = 24; put32(34, row * H);
|
||||
ok = fwrite(hdr, 1, 54, f) == 54;
|
||||
static uint8_t line[320 * 3]; // not on the loop task's stack
|
||||
static PSRAM_BSS uint8_t line[320 * 3]; // not on the loop task's stack
|
||||
for (int32_t y = H - 1; ok && y >= 0; y--) { // bottom-up, BGR
|
||||
const uint16_t* s = px + y * W;
|
||||
for (int32_t x = 0; x < W && x < 320; x++) {
|
||||
|
||||
Reference in New Issue
Block a user