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
|
pre:pio-scripts/patch_apply.py
|
||||||
post:pio-scripts/create_factory_bin.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.filesystem = littlefs
|
||||||
board_build.embed_files =
|
board_build.embed_files =
|
||||||
webapp_dist/index.html.gz
|
webapp_dist/index.html.gz
|
||||||
@ -75,6 +75,16 @@ board = esp32dev
|
|||||||
build_flags = ${env.build_flags}
|
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]
|
[env:generic_esp32c3]
|
||||||
board = esp32-c3-devkitc-02
|
board = esp32-c3-devkitc-02
|
||||||
custom_patches = ${env.custom_patches},esp32c3
|
custom_patches = ${env.custom_patches},esp32c3
|
||||||
|
|||||||
@ -41,6 +41,8 @@ void WebApiSysstatusClass::onSystemStatus(AsyncWebServerRequest* request)
|
|||||||
root["heap_used"] = ESP.getHeapSize() - ESP.getFreeHeap();
|
root["heap_used"] = ESP.getHeapSize() - ESP.getFreeHeap();
|
||||||
root["heap_max_block"] = ESP.getMaxAllocHeap();
|
root["heap_max_block"] = ESP.getMaxAllocHeap();
|
||||||
root["heap_min_free"] = ESP.getMinFreeHeap();
|
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_total"] = ESP.getFreeSketchSpace();
|
||||||
root["sketch_used"] = ESP.getSketchSize();
|
root["sketch_used"] = ESP.getSketchSize();
|
||||||
root["littlefs_total"] = LittleFS.totalBytes();
|
root["littlefs_total"] = LittleFS.totalBytes();
|
||||||
|
|||||||
@ -24,9 +24,13 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <LittleFS.h>
|
#include <LittleFS.h>
|
||||||
#include <TaskScheduler.h>
|
#include <TaskScheduler.h>
|
||||||
|
#include <esp_heap_caps.h>
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
|
// Move all dynamic allocations >512byte to psram (if available)
|
||||||
|
heap_caps_malloc_extmem_enable(512);
|
||||||
|
|
||||||
// Initialize serial output
|
// Initialize serial output
|
||||||
Serial.begin(SERIAL_BAUDRATE);
|
Serial.begin(SERIAL_BAUDRATE);
|
||||||
#if ARDUINO_USB_CDC_ON_BOOT
|
#if ARDUINO_USB_CDC_ON_BOOT
|
||||||
|
|||||||
@ -14,6 +14,8 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<FsInfo :name="$t('memoryinfo.Heap')" :total="systemStatus.heap_total"
|
<FsInfo :name="$t('memoryinfo.Heap')" :total="systemStatus.heap_total"
|
||||||
:used="systemStatus.heap_used" />
|
: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"
|
<FsInfo :name="$t('memoryinfo.LittleFs')" :total="systemStatus.littlefs_total"
|
||||||
:used="systemStatus.littlefs_used" />
|
:used="systemStatus.littlefs_used" />
|
||||||
<FsInfo :name="$t('memoryinfo.Sketch')" :total="systemStatus.sketch_total"
|
<FsInfo :name="$t('memoryinfo.Sketch')" :total="systemStatus.sketch_total"
|
||||||
|
|||||||
@ -209,6 +209,7 @@
|
|||||||
"Used": "Benutzt",
|
"Used": "Benutzt",
|
||||||
"Size": "Größe",
|
"Size": "Größe",
|
||||||
"Heap": "Heap",
|
"Heap": "Heap",
|
||||||
|
"PsRam": "PSRAM",
|
||||||
"LittleFs": "LittleFs",
|
"LittleFs": "LittleFs",
|
||||||
"Sketch": "Sketch"
|
"Sketch": "Sketch"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -209,6 +209,7 @@
|
|||||||
"Used": "Used",
|
"Used": "Used",
|
||||||
"Size": "Size",
|
"Size": "Size",
|
||||||
"Heap": "Heap",
|
"Heap": "Heap",
|
||||||
|
"PsRam": "PSRAM",
|
||||||
"LittleFs": "LittleFs",
|
"LittleFs": "LittleFs",
|
||||||
"Sketch": "Sketch"
|
"Sketch": "Sketch"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -209,6 +209,7 @@
|
|||||||
"Used": "Utilisée",
|
"Used": "Utilisée",
|
||||||
"Size": "Taille",
|
"Size": "Taille",
|
||||||
"Heap": "Heap",
|
"Heap": "Heap",
|
||||||
|
"PsRam": "PSRAM",
|
||||||
"LittleFs": "LittleFs",
|
"LittleFs": "LittleFs",
|
||||||
"Sketch": "Sketch"
|
"Sketch": "Sketch"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -25,6 +25,8 @@ export interface SystemStatus {
|
|||||||
heap_min_free: number;
|
heap_min_free: number;
|
||||||
littlefs_total: number;
|
littlefs_total: number;
|
||||||
littlefs_used: number;
|
littlefs_used: number;
|
||||||
|
psram_total: number;
|
||||||
|
psram_used: number;
|
||||||
sketch_total: number;
|
sketch_total: number;
|
||||||
sketch_used: number;
|
sketch_used: number;
|
||||||
// RadioInfo
|
// RadioInfo
|
||||||
@ -33,4 +35,4 @@ export interface SystemStatus {
|
|||||||
nrf_pvariant: boolean;
|
nrf_pvariant: boolean;
|
||||||
cmt_configured: boolean;
|
cmt_configured: boolean;
|
||||||
cmt_connected: boolean;
|
cmt_connected: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user