I need to have the firmware stored somewhere on the board in order to get back to it after flashing a new firmware.

Is there a way to store a backup of the firmware somewhere, and use a button to erase a newer firmware and get back to the old one, without re-flashing the old firmware again ?

  • you would need to use a device that could store multiple firmware files ... this device would reflash the firmware without the need of a computer .... possibly another arduino
    – jsotola
    Jun 21 '19 at 22:19
  • possible theoretically - I noticed you tagged esp32 - they usually have 4MB flash, and the "standard" size for sketch binary is 1MB, so there's 3MB you could use. However, it's not going to be simple Jun 21 '19 at 22:22

Yes. You need to create a factory partition and upload your bin file to there.

You can read more about ESP32 partitions here

Note that none of the partition schemes in the ESP32 core have factory partitions, so you will need to create a custom one and link it to a menu entry (look at the boards.txt file to see how that is done).

The existing partition files are just .csv files within the ESP32 core. Copy one and modify it, then link that to a menu entry using the new file name.

  • Working on it. Thank you :) Jun 22 '19 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.