I want a byte that esptool.exe erase_flash does not delete.
Idea?
Put it in EEPROM
This command delete EEPROM.
I am afraid that if you issue a command that deletes the flash then that is what is going to happen. Why do you need to issue the command ?
What do you want to save in this special byte ?
Trial counter...
To be fair, 'Erase_flash' does not actually erase the flash, it deletes the entry point to the program. The next time that you upload 'to the flash' it may or may not overwrite anything you stored. In fact, most times the EEPROM is retained. Using SPIFFS may work for you, as long as when you upload a new sketch, you define the same SPIFFS size.
Unfortunately, the contents of the eeprom do not remain.
there is no easy "indelible" on the ESP8266.
Either a value is fixed - than you can't change it or
it can be changed - than it can be deleted also.
If you are using the EEPROM emulation on the ESP8266, you just persist data to survive the next power down and you can retrive data on next runtime.
If you don't believe - show a short demo program demonstrating your problem.
If you do the sketch upload right, EEPROM data will survive.
if you decide to flash all, either provide also EEPROM data with your upload or don't be surprised that EEPROM is erased too.
User has no Arduino. The user loads binary with the GUI version of esptool.
and if he uploads with erase_flash the flash gets erased.
If the EEPROM gets erased, the content dies. *)
End of story.
*) Nice analogy: Apollo Creed died in the film, but the Actor Carl Weathers is still alive in RL. Like your data.
Yes. I am looking for a solution to this.
Use an external EEPROM.
Not possible.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.