In OTA enabled SPI Flash memory map ( https://github.com/esp8266/esp8266-wiki/wiki/Memory-Map ) there're 4 slots:
- User application, slot 1
- SDK libraries, slot 1
- User application, slot 2
- SDK libraries, slot 2
The questions are:
1. How bootloader boot.bin knows which slot (1 or 2) it should load & run during the boot ?
2. When user application runs - how it may know from which slot it runs? (for example, to download OTA upgrade code to another slot)
3. Maybe for custom application it's not necessary to use slots, but just download OTA upgrade data and rewrite it directly to SPI Flash? is it possible? (my suggestion: if app runs from RAM, then it may rewrite itself in SPI Flash with a new code)
Did anybody try to implement custom FW upgrades (User app + SDK libraries in SPI Flash) using Over-The-Air approach? (from custom web server, for example)