Open ilyakorostelev opened 4 years ago
You can download the firmware as 16Mbit(1024KB+1024KB)
You can download the firmware as 16Mbit(1024KB+1024KB)
16Mbit - this is 1024KB + 1024KB - this is 1Mb + 1Mb. First mb for the user1.bin (flash offset 0x001000). Second mb for the user2.bin (flash offset 0x101000). Am I right? But this schema does not work.
Hello
My configuration: SDK v3.0.4, spi-flash - 64Mbit (8Mb), memory map - FLASH_SIZE_64M_MAP_1024_1024. bootloadev v1.7. User1 image offset: 0x001000, User2 image offset: 0x101000. LD: eagle.app.v6.new.2048.ld
I am trying to update to a new image from user1 to user2. I'm load new firmware from 0x101000 offset, after that call some code:
system_upgrade_flag_set(UPGRADE_FLAG_FINISH); system_upgrade_reboot();
Log output:
reboot to use2 state: 5 -> 0 (0) rm 0 del if0 bcn 0 del if1 usl
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 2592, room 16 tail 0 chksum 0xf3 load 0x3ffe8000, len 764, room 8 tail 4 chksum 0x92 load 0x3ffe82fc, len 676, room 4 tail 0 chksum 0x22 csum 0x22
2nd boot version : 1.7(5d6f877) SPI Speed : 80MHz SPI Mode : QIO SPI Flash Size & Map: 64Mbit(1024KB+1024KB) jump to run user1 @ 1000
And again user1. The same image is loaded. Update failed. But after that system_upgrade_userbin_check() returned 1 - user2 area. Verification with esptool user1 image at 0x001000 and user2 image at 0x101000 - OK.
As I understand, there are 2 variants - bootloader could copy user2 to user1 area, because user1 and user2 compiles with the same addresses. Or bootloader could switch map to the second Mb and run from 0x101000. Which variant is correct?