1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

flash-size agnostic builds (#6690)

* flash: mapping definition by sketch at runtime depending on flash chip size and user configuration
This commit is contained in:
david gauchard
2022-02-10 18:25:18 +01:00
committed by GitHub
parent 3027acaf11
commit f60defc3d3
22 changed files with 552 additions and 542 deletions

View File

@ -93,7 +93,7 @@ void ESP8266HTTPUpdateServerTemplate<ServerType>::setup(ESP8266WebServerTemplate
if (_serial_output)
Serial.printf("Update: %s\n", upload.filename.c_str());
if (upload.name == "filesystem") {
size_t fsSize = ((size_t) &_FS_end - (size_t) &_FS_start);
size_t fsSize = ((size_t)FS_end - (size_t)FS_start);
close_all_fs();
if (!Update.begin(fsSize, U_FS)){//start with max available size
if (_serial_output) Update.printError(Serial);