Replies: 5 comments 9 replies
-
The bootloader,
Probably, but it's just a comment and not used or defined anywhere so it's a no-op.
OTA image before flashing by eboot lives in the empty space. See the online docs, there is a flash memory map with more detail. |
Beta Was this translation helpful? Give feedback.
-
It's simplest to think of OTA as just an(the) app that the on-chip ROM jumps to on power-up. Eboot here will check for a flag saying "copy new code". If the flag is not set, Eboot will just jump to a fixed flash address to start the real application. If the flag is set, it will copy the staged data (located after end of prior app and before the beginning of a filesystem) to the main app address and then jump to it to start. As for the rboot stuff, sorry but I never really looked into it. You might have better luck putting this question in their repo. If they're doing some magic with the on-chip XIP cache you may be limited to 512K boundaries by the HW itself. If it's via SW, then theoretically it doesn't matter and you could have any setup you wanted (practically, though, they may only have 8 slots or something they track). |
Beta Was this translation helpful? Give feedback.
-
@earlephilhower thanks bery much for your response. That helps me understand it a bit better. When you refer to eboot, is this the implementation you speak of? Arduino/cores/esp8266/Updater.cpp Line 344 in 8b33e2e
Thanks again |
Beta Was this translation helpful? Give feedback.
-
Not quite. That bit just writes the copy into the space between the end of the current app and the beginning of the FS, sets the "copy some data" flag, and reboots. Eboot proper is here: https://github.com/esp8266/Arduino/tree/master/bootloaders/eboot . That's the bit that does the actual OTA overwrite of the app. |
Beta Was this translation helpful? Give feedback.
-
@trullock
Single binary image contains bootloader, code segment and filesystem, 2040KB in total. Each of those partitions have their corresponding OTA_* counterpart. How it works in my case:
Also make sure to check out the eboot and OTA* implementations. @earlephilhower please correct me if I'm wrong |
Beta Was this translation helpful? Give feedback.
-
Got a question regarding the following linker script bundled with Arduino core:
Why
irom0_0_seg
is defined asorg = 0x40201010, len = 0xfeff0
but notorg = 0x40200000, len = 0x100000
? Why the offset of0x1010
? Also shouldn'tempty
start from0x40300000
?An extra question - why the FS region isn't defined right after the irom?
Beta Was this translation helpful? Give feedback.
All reactions