You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have problew with ESP8266 (ESP12) when I try to upload littlefs.bin to the ESP8266 (Littlefs) not spiffs) by my HTTPUpload. Always I get updateError, But I have no problewm with ESP32 using SPIFFS.
voidupdate_file() {
//https://github.com/dx4m/Xbox-EEPROM-Utility/blob/master/xbox_eeprom_utility/xbox_eeprom_utility.ino
HTTPUpload &upload = server.upload();
if (upload.status == UPLOAD_FILE_START) {
String updatefile = upload.filename;
Serial.println("Update started:");
if (updatefile.endsWith("littlefs.bin")) {
#ifdef ESP32
if (!Update.begin(UPDATE_SIZE_UNKNOWN, U_SPIFFS)) {
Serial.println("error");
updateError = true;
}
#else
String fsBlockSizeStr = String((int)&_FS_block);
if(updatefile.indexOf(fsBlockSizeStr) < 0){
Serial.printf("Update Error! Please download and install xeu.%s.littlefs.bin\n", fsBlockSizeStr.c_str());
updateError = true;
return;
}
size_t fsSize = ((size_t) &_FS_end - (size_t) &_FS_start);
close_all_fs();
if (!Update.begin(fsSize, U_FS)) {
Serial.println("error");
updateError = true;
}
#endif
}
else {
#ifdef ESP32
if(updatefile.endsWith("esp32.bin")){
Serial.printf("Trying to flash %s\n", updatefile.c_str());
}
else{
Serial.println(F("Error. Please flash any firmware. Make sure you use the right one."));
updateError = true;
return;
}
#elseif((updatefile.endsWith("firmware.bin")) || (updatefile.endsWith("1M.bin")) || (updatefile.endsWith("2M.bin")) || (updatefile.endsWith("4M.bin")) || (updatefile.endsWith("8M.bin"))){
Serial.printf("Trying to flash %s\n", updatefile.c_str());
}
else{
Serial.println(F("Error. Please flash any firmware.bin to xeu.board.8M.bin. Make sure you use the right one."));
Serial.println(F("When you don't know which one, flash any 1M binary."));
updateError = true;
return;
}
#endifunsignedint maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;
if (!Update.begin(maxSketchSpace, U_FLASH)) {
Serial.println("error");
updateError = true;
}
}
}
elseif (upload.status == UPLOAD_FILE_WRITE && updateError == false) {
if (Update.write(upload.buf, upload.currentSize) != upload.currentSize) {
Serial.println("upload error");
updateError = true;
}
else {
Serial.print(".");
}
}
elseif (upload.status = UPLOAD_FILE_END) {
if (Update.end(true)) {
Serial.println(" Flashing successfully");
Serial.println("Rebooting now");
delay(500);
#ifdef ESP32
ESP.restart();
#else
ESP.reset();
#endif
}
}
}
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Platform
Hardware: [ESP-12|
Core Version: [latest git hash or date]
Development Env: Arduino
Operating System: Windows
Module: Generic ESP8266 Module
Flash Size: 4MB
Problem Description
I have problew with ESP8266 (ESP12) when I try to upload littlefs.bin to the ESP8266 (Littlefs) not spiffs) by my HTTPUpload. Always I get updateError, But I have no problewm with ESP32 using SPIFFS.
The text was updated successfully, but these errors were encountered: