Feature: Added support for boards with 16MB flash and PSRAM
This commit is contained in:
parent
e81a280b87
commit
7e2064e264
6
partitions_custom_16mb.csv
Normal file
6
partitions_custom_16mb.csv
Normal 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
|
||||
|
@ -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
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -209,6 +209,7 @@
|
||||
"Used": "Benutzt",
|
||||
"Size": "Größe",
|
||||
"Heap": "Heap",
|
||||
"PsRam": "PSRAM",
|
||||
"LittleFs": "LittleFs",
|
||||
"Sketch": "Sketch"
|
||||
},
|
||||
|
||||
@ -209,6 +209,7 @@
|
||||
"Used": "Used",
|
||||
"Size": "Size",
|
||||
"Heap": "Heap",
|
||||
"PsRam": "PSRAM",
|
||||
"LittleFs": "LittleFs",
|
||||
"Sketch": "Sketch"
|
||||
},
|
||||
|
||||
@ -209,6 +209,7 @@
|
||||
"Used": "Utilisée",
|
||||
"Size": "Taille",
|
||||
"Heap": "Heap",
|
||||
"PsRam": "PSRAM",
|
||||
"LittleFs": "LittleFs",
|
||||
"Sketch": "Sketch"
|
||||
},
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user