Code: Select all
ets Jan 8 2013,rst cause:4, boot mode:(3,7)
wdt reset
load 0x40100000, len 1320, room 16
tail 8
chksum 0xb8
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0xd9
load 0x3ffe8308, len 412, room 0
tail 12
chksum 0xb9
csum 0xb9
2nd boot version : 1.3(b3)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size : 4Mbit
jump to run user2
Fatal exception (0):
epc1=0x402406bc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x402406bc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
This fatal exception keeps recurring. After a manual reset the same thing happens:
Code: Select all
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x40100000, len 1320, room 16
tail 8
chksum 0xb8
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0xd9
load 0x3ffe8308, len 412, room 0
tail 12
chksum 0xb9
csum 0xb9
2nd boot version : 1.3(b3)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size : 4Mbit
jump to run user2
Fatal exception (0):
epc1=0x402406bc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x402406bc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x402406bc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
The chip is now irrecoverable except by flashing proper firmware via the serial port. I'm rather disappointed, I was expecting the bootloader to detect the problem and reboot back into user1.bin.
It seems to me that you need to add a step to your upgrade protocol: after booting into the new partition the new code should be required to make a "confirm" call to lock-in the switch to the new firmware. At the next reset, if the confirm call hasn't been made the bootloader should revert to the old firmware. This way the new code can do an overall sanity check and call confirm. It could even be user-driven, i.e. the user could be required to click on a button on a web interface. It's really up to the firmware to determine this.