First byte is not the magic 0xE9 for OTA binaries

Pato
Posts: 32
Joined: Sat Mar 24, 2018 12:52 am

First byte is not the magic 0xE9 for OTA binaries

Postby Pato » Fri Aug 17, 2018 5:13 pm

Hey all,

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.

Her Majesty
Posts: 349
Joined: Mon Oct 27, 2014 11:09 am

Re: First byte is not the magic 0xE9 for OTA binaries

Postby Her Majesty » Fri Oct 12, 2018 8:45 pm

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

Pato
Posts: 32
Joined: Sat Mar 24, 2018 12:52 am

Re: First byte is not the magic 0xE9 for OTA binaries

Postby Pato » Thu Nov 15, 2018 4:46 pm

Thank for the suggestion, but for sure I won't update the SDK :)
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 :)

Who is online

Users browsing this forum: Google [Bot] and 5 guests