-
Notifications
You must be signed in to change notification settings - Fork 0
Boot ROM Loader
M Hightower edited this page Feb 16, 2020
·
23 revisions
While ESP8266 Application Note - Firmware Download Protocol, provides some information on bootloader headers and checksumming it is incomplete. I could not find any detailed documentation on what the Boot ROM Bootloader expects. So I resorted to the empirical method. This is based on that. Maybe this is common knowledge, I just could not find it.
- The Boot ROM loader expects a checksum at the end of the 16-byte alignment that immediately following the last segment's payload.
- When there are multiple segments each segment has a CS. While it is documented that the first checksum calculation is started with
0xEF
, it is not documented that for each additional segment and CS it is calculated starting with zero. - Except for the last segment, each segment payload length is modified to include the 16-byte alignment with CS at the end. This allows the loader to, add segment length to the beginning of the payload, to find the next segment header.
- Because of the size increase to include CS, adjacent segments can overlap. This makes the ordering of those segments in the
.bin
more critical. When the 1st of an adjacent segment is loaded, the padding and checksum are also loaded. Then the adjacent segment begins by overwriting the padding, etc. If they are reversed, some of the previous segment would be overwritten by padding and CS of the 2nd.
As an experiment using these adjustments and updates to elft2bin.py
, I was able to add a strings segment to eboot.
- Keeping the Lights On - how to manage GPIO state across reboots and crashes
- Boot fails when SPI Bus used
- GPIO Drive Strength and Ringing
- LDO Regulators WIP
- ESP8266 Power Considerations This is only a rough outline, needs a lot of development.
- Upgrading Flash Chips, QIO, and DIO
- Dodgy Extra 2K of DRAM or CONT - WIP
- WDTracks - Print last call before WDT
- 5V Tolerant I/O?
Arduino IDE specific
Misc.
- Exception Causes
- ESP8266 will not boot
- Stacks sys and cont
- WIP Boot ROM and SDK Notes
- Multi-segment Boot ROM Loader, notes
- Cache_Read_Enable How to turn off and on instruction cache execution.