khcnz / Espressif2Arduino

Allows for OTA updates from an Espressif ESP8266 V2 OTA image to an Arduino image by replacing the bootloader and dynamically patching the binary memory offsets
25 stars 13 forks source link

"only supports the ESP8266 with 1MB of flash and QIO Flash mode" #1

Closed mirko closed 7 years ago

mirko commented 7 years ago

Why does it only work for ESP8266 and QIO flash mode? If I build those images for ESP8285 and DOUT flashing mode, shouldn't they work on my ESP8285 devices and if not, what's the exact issue? It would be a pity if the Sonoff Touch and Sonoff 4ch (and possibly others) would be excluded from this method.

khcnz commented 7 years ago

QIO/DIO: Was primarily a problem while i was trying to build the dynamic re-linker. This should be fine for DIO builds as long as all three images (User1/User2 & Sonoff) where all compiled in DIO mode.

1MB Flash - currently the flash size is hardcoded to be 0x0-8000 and 0x8000-100000.

Both of these should be trivial to fix to remove these limitations 1) There is just a byte that needs updating in the start of the bootloader section to indicate DI/QIO mode and the flash size 2) Need to dynamically calculate the sectors that need erasing and the start/end of where to write flash to.

mirko commented 7 years ago

Nice, works like a charm for my Sonoff Touch. Only thing was, the device didn't open the "ITEAD-XXXXXX" WiFi when pressing the button for ~5-7 seconds, so couldn't connect to it provision it via the the SonOTA script, but had to use the EwLink app. Once done, Espressif2Arduino successfully picked up the WiFi credentials (with which the device got provisioned by EwLink before) and fetched the final image from 192.168.1.1. Thanks!!

khcnz commented 7 years ago

And OTA worked for subsequent sonoff upgrades I presume?