me-no-dev / arduino-esp32fs-plugin

Arduino plugin for uploading files to ESP32 file system
GNU General Public License v2.0
544 stars 144 forks source link

ESP32 Sketch Data Upload won't upload after a month of uploading #16

Closed GeorgeFlorian closed 5 years ago

GeorgeFlorian commented 5 years ago

I am having the most bizarre issue ever. I've been using this plugin for the past month, but today it stopped working. It won't upload anything. It outputs no error. It just does not upload. One moment it worked, the next it didn't. The flash memory was always formatted using SPIFFS.format().

Now I am trying to upload one simple .txt file, namely inputs.txt and it just doesn't want to upload it.

#include <SPIFFS.h>

void setup() {
  Serial.begin(115200);
  delay(2000);
  if(!SPIFFS.begin(true)){
    Serial.println("Couldn't mount SPIFFS. Formatting... ");
  }
  Serial.println(SPIFFS.exists("/inputs.txt"));
}

void loop() {
  // put your main code here, to run repeatedly:

}

The output of Serial.println(SPIFFS.exists("/inputs.txt")); is 0.

How could it just stop working ?

GeorgeFlorian commented 5 years ago

I am too stupid to breathe ! Apparently I was running the format sketch when uploading and it always formatted the flash memory. So, guys, if you're using different sketches for uploading or formatting, make sure that after you upload the format sketch and the Flash Memory gets formatted, upload another sketch, before using the ESP32 Upload Tool. Don't be stupid like me.

Thank you !