Feature: Added support for boards with 16MB flash and PSRAM

This commit is contained in:
Thomas Basler 2024-02-02 20:33:42 +01:00
parent e81a280b87
commit 7e2064e264
10 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000
otadata, data, ota, 0xE000, 0x2000
app0, app, ota_0, 0x10000, 0x7E0000
app1, app, ota_1, 0x7F0000, 0x7E0000
spiffs, data, spiffs, 0xFD0000, 0x30000
1 # Name, Type, SubType, Offset, Size, Flags
2 nvs, data, nvs, 0x9000, 0x5000
3 otadata, data, ota, 0xE000, 0x2000
4 app0, app, ota_0, 0x10000, 0x7E0000
5 app1, app, ota_1, 0x7F0000, 0x7E0000
6 spiffs, data, spiffs, 0xFD0000, 0x30000

View File

@ -49,7 +49,7 @@ extra_scripts =
pre:pio-scripts/patch_apply.py
post:pio-scripts/create_factory_bin.py
board_build.partitions = partitions_custom.csv
board_build.partitions = partitions_custom_4mb.csv
board_build.filesystem = littlefs
board_build.embed_files =
webapp_dist/index.html.gz
@ -75,6 +75,16 @@ board = esp32dev
build_flags = ${env.build_flags}
[env:generic_esp32_16mb_psram]
board = esp32dev
board_build.flash_mode = qio
board_build.partitions = partitions_custom_16mb.csv
board_upload.flash_size = 16MB
build_flags = ${env.build_flags}
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
[env:generic_esp32c3]
board = esp32-c3-devkitc-02
custom_patches = ${env.custom_patches},esp32c3

View File

@ -41,6 +41,8 @@ void WebApiSysstatusClass::onSystemStatus(AsyncWebServerRequest* request)
root["heap_used"] = ESP.getHeapSize() - ESP.getFreeHeap();
root["heap_max_block"] = ESP.getMaxAllocHeap();
root["heap_min_free"] = ESP.getMinFreeHeap();
root["psram_total"] = ESP.getPsramSize();
root["psram_used"] = ESP.getPsramSize() - ESP.getFreePsram();
root["sketch_total"] = ESP.getFreeSketchSpace();
root["sketch_used"] = ESP.getSketchSize();
root["littlefs_total"] = LittleFS.totalBytes();

View File

@ -24,9 +24,13 @@
#include <Arduino.h>
#include <LittleFS.h>
#include <TaskScheduler.h>
#include <esp_heap_caps.h>
void setup()
{
// Move all dynamic allocations >512byte to psram (if available)
heap_caps_malloc_extmem_enable(512);
// Initialize serial output
Serial.begin(SERIAL_BAUDRATE);
#if ARDUINO_USB_CDC_ON_BOOT

View File

@ -14,6 +14,8 @@
<tbody>
<FsInfo :name="$t('memoryinfo.Heap')" :total="systemStatus.heap_total"
:used="systemStatus.heap_used" />
<FsInfo :name="$t('memoryinfo.PsRam')" :total="systemStatus.psram_total"
:used="systemStatus.psram_used" />
<FsInfo :name="$t('memoryinfo.LittleFs')" :total="systemStatus.littlefs_total"
:used="systemStatus.littlefs_used" />
<FsInfo :name="$t('memoryinfo.Sketch')" :total="systemStatus.sketch_total"

View File

@ -209,6 +209,7 @@
"Used": "Benutzt",
"Size": "Größe",
"Heap": "Heap",
"PsRam": "PSRAM",
"LittleFs": "LittleFs",
"Sketch": "Sketch"
},

View File

@ -209,6 +209,7 @@
"Used": "Used",
"Size": "Size",
"Heap": "Heap",
"PsRam": "PSRAM",
"LittleFs": "LittleFs",
"Sketch": "Sketch"
},

View File

@ -209,6 +209,7 @@
"Used": "Utilisée",
"Size": "Taille",
"Heap": "Heap",
"PsRam": "PSRAM",
"LittleFs": "LittleFs",
"Sketch": "Sketch"
},

View File

@ -25,6 +25,8 @@ export interface SystemStatus {
heap_min_free: number;
littlefs_total: number;
littlefs_used: number;
psram_total: number;
psram_used: number;
sketch_total: number;
sketch_used: number;
// RadioInfo
@ -33,4 +35,4 @@ export interface SystemStatus {
nrf_pvariant: boolean;
cmt_configured: boolean;
cmt_connected: boolean;
}
}