Page 1 of 1

Erase all Flash contents on sketch upload

Posted: Tue Apr 27, 2021 7:27 pm
by espforuandme
Hi,

since now i only used ESP8266.
When uploading a sketch via Arduino, you've got the options

Erase flash --> Only Sketch
Erase flash --> Sketch and WiFi Settings
Erase flash --> All flash contents (means also SPIFFS-Filesystem is cleaned)

When choosing ESP32 from Board-List this option is missing.
Is there something similar?

Primary i want the SPIFFS-Filesystem to be erased completely when uploading a new sketch (means a kind of "factory reset" of the ESP everytime i upload a new sketch.

Is this possible?

Best wishes
Daniel

Re: Erase all Flash contents on sketch upload

Posted: Thu Apr 29, 2021 1:34 am
by michikite
Not sure if there is a more convenient way (maybe platformIO), but you could use:
https://github.com/espressif/esptool

Re: Erase all Flash contents on sketch upload

Posted: Tue Nov 16, 2021 11:00 pm
by daxliniere
Seems like this hasn't yet been addressed.

Any news from ESP devs on this?

Re: Erase all Flash contents on sketch upload

Posted: Wed Nov 17, 2021 4:41 am
by ESP_Sprite
Suggest you post it as an issue on the arduino-esp32 repo.

Re: Erase all Flash contents on sketch upload

Posted: Wed Nov 17, 2021 11:30 pm
by daxliniere