flashing 512KB modules with boot_v1.5.bin fails

tvoneicken
Posts: 14
Joined: Sat Dec 19, 2015 3:43 pm

flashing 512KB modules with boot_v1.5.bin fails

Postby tvoneicken » Sun Oct 23, 2016 1:29 pm

When flashing an esp8266 with 512KB flash there is a problem. The very first boot tries to launch user1.bin, but after that it's stuck trying to launch user2.bin. If the user flashes everything in one go then this is OK, but if the user first flashes the bootloader, then resets the device, and then flashes the rest it will not work.
Here is what happens (this was flashed using the esp flash download tool v2,3). On the first boot after flashing the bootloader and blank.bin at 0x7e000 as well as 0x3e000 the bootloader outputs:


Code: Select all

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 4Mbit(256KB+256KB)
jump to run user1 @ 1000

error magic!
first boot failed, reboot to try backup bin


 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 4Mbit(256KB+256KB)
jump to run user2 @ 41000

error magic!
backup boot failed.

user code done


I then reset the esp8266 and here is what happens:

Code: Select all

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 4Mbit(256KB+256KB)
jump to run user2 @ 41000

error magic!
backup boot failed.

user code done


At this point the bootloader will never again try user1 @0x1000. All this works fine with earlier bootloaders (pre 1.5). It also fails with 1.6.

Who is online

Users browsing this forum: No registered users and 59 guests