- Sun Apr 05, 2015 2:47 pm
#13592
Well, that's along the lines of what I did.
The way xpressif does their updates is by flashing the new userbin to a second, nearly identical, half of the flash. They then set a flag for the bootloader that upon reboot should attempt to boot from partition #2 (this is bootloader 1.1 and 1.2, btw). If successful, if changes the bit in the bootloader memory so subsequent boot will use that partition. If it fails, it boots from the original partition, since it is untouched during the flashing operation.
The method I am using polls the device for the active partition then flashes the other partition. When done, the device has to reboot (so we know the flash was successful). If it succeeds, the HTML is flashed over the original userapp in whichever partition it was in.
I intend on eventually offering a forms-based flashing method (much more user friendly). In fact, a good start to it is in my code just not currently exposed. The idea is just as you said, have a static page that will allow you to flash with nothing else, but that page could be overridden by the author to whatever they want (should remain some form of flashing form, though)