Erase all Flash contents on sketch upload

espforuandme
Posts: 2
Joined: Tue Apr 27, 2021 6:49 pm

Erase all Flash contents on sketch upload

Postby espforuandme » Tue Apr 27, 2021 7:27 pm

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

michikite
Posts: 16
Joined: Thu Oct 22, 2020 1:35 am

Re: Erase all Flash contents on sketch upload

Postby michikite » Thu Apr 29, 2021 1:34 am

Not sure if there is a more convenient way (maybe platformIO), but you could use:
https://github.com/espressif/esptool

daxliniere
Posts: 7
Joined: Mon Nov 15, 2021 12:23 am

Re: Erase all Flash contents on sketch upload

Postby daxliniere » Tue Nov 16, 2021 11:00 pm

Seems like this hasn't yet been addressed.

Any news from ESP devs on this?

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Erase all Flash contents on sketch upload

Postby ESP_Sprite » Wed Nov 17, 2021 4:41 am

Suggest you post it as an issue on the arduino-esp32 repo.

daxliniere
Posts: 7
Joined: Mon Nov 15, 2021 12:23 am

Re: Erase all Flash contents on sketch upload

Postby daxliniere » Wed Nov 17, 2021 11:30 pm


Who is online

Users browsing this forum: No registered users and 61 guests