I discovered the above function for OTA sketch updates from inside a running system. Looking through it, it appears to do all the great stuff that the Updater.* functions do, all wrapped in one happy place.
However, the function constantly fails because my existing software uses 71% of the available space, and the updateSketch method REQUIRES that the flash space be large enough to hold both the existing and the new incoming sketch, which totally makes sense.
However, even a bare-bones ESP sketch takes 63% of the space, so replacing one with another from a running system appears to be flat-out impossible.
So, this leaves me with a few options which I need help with:
1. Is there a way to get my sketches below the magical 50% mark? Are there unused libraries linked in by default that can be trimmed away, perhaps?
2. Has anyone heard of a little bootstrap sketch that is below 30% in size, and does nothing but mount SPIFFS, read in a new sketch from a file, flash it, and restart? If not, do you know the trick to making one?
3. Is there an existing way to tell the Updater to perhaps push its own little bootstrapper high up in the flash, and, running from THAT code, re-flash the rest with my new sketch?
Thanks for any responses!