I build my two applications for OTA upgrade user1.bin and user2.bin, one for each flash slot (for addresses 0x01000 and 0x81000 respectively).
The documentation says that the first byte of an application built for the ESP8266 is always 0xE9. This is the "magic byte" (https://www.espressif.com/sites/default ... col_en.pdf).
The first byte of the bootloader is effectively 0xE9.
But when I look at the content of my binaries user1.bin and user2.bin, the firsrt byte is 0xEA in boh cases and not 0xE9.
I can flash them and both work as expected.
If I change the first byte to some random value like 0xEF, I get a "error magic" at boot (ok, seems logical)
If I change it for 0XE9 as in the doc, I got Fatal Exception 29 at boot (duh ?)
Is there a different magic number for OTA firmwares ?
Does this magic byte applies only for the booloader ?
What am I missing ?
Thanks for your help
I'm compiling with esp-open-sdk toolchain, NONOS-SDK_2.2.
We spend too much time fixing, debugging, and above all understanding the use and black magic of the current SDK we use.
Since it has been developped by Espressif I don't trust it at all.
It's worthless to invest time in it, it's not ecomically viable for us to update.
Espressif's guys may be very good at hardware design (great to have a full SOC with WiFi !), but I think the software SDK is badly designed and so is hardly usable for real or industrial projects, it's a black shadow on the ESP (personnal point of view).
For thos intersested in OTA, maybe check rboot, an alternative and open bootloader for the ESP
Her Majesty wrote:ESP8266 RTOS SDK changes to be ESP-IDF style recently, and the OTA updates too. Maybe use RTOS SDK is a better choice..https://github.com/espressif/ESP8266_RTOS_SDK
Thanks, it was usefull.
Who is online
Users browsing this forum: No registered users and 0 guests
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!