viewtopic.php?f=5&t=433
=================================================================
Update on 2015.04.18
fix bug: Some types of flash require longer erase time, cause a erase time out in this tool.
Update on 2015.04.14
1.fix error when downloading a binary that is not aligned.
2.fix error when loading default settings
NOTE:(IMPORTANT!)
The spi settings in the flash download tool will overwrite the setting during the compile procedure(at first serveral bytes from 0x0).
Make sure the settings are accord with the compile procedure.
The original binary will not be changed.
You can find the configured binaries in FLASH_DOWNLOAD_TOOLS/bin_tmp after the download is finished.
Especially for bootvxx.bin, it will not change and keep default settings for spi mode.
Also , you can press "CombineBin" button to get a combined binary which is already set to the mode you choose.
The flash mode are defined in the 2nd and 3rd( count from 0) byte at flash address 0x0.
Bootloader will read this bytes out and changed spi mode and size mode immediately. So this is very important for your production.
Definition:
# write flash bin header
#============================
# SPI FLASH PARAMS
#-------------------
#flash_mode=
# 0: QIO
# 1: QOUT
# 2: DIO
# 3: DOUT
#-------------------
#flash_clk_div=
# 0 : 80m / 2
# 1 : 80m / 3
# 2 : 80m / 4
# 0xf: 80m / 1
#-------------------
#flash_size=
# 0 : 512 KB
# 1 : 256 KB
# 2 : 1024 KB
# 3 : 2048 KB
# 4 : 4096 KB
#-------------------
# END OF SPI FLASH PARAMS
#============================
byte2=int(flash_mode)&0xff
byte3=(((int(flash_size)<<4)| int(flash_clk_div))&0xff)
===========================================================================
Updated on 2014.11.18
add windows exe version
error list:
1. 0x0 address bin read error.
Code: Select all
ets Jan 8 2013,rst cause:1, boot mode:(3,2)
ets_main.c
2.spi mode error( use quad mode for dual flash)
Code: Select all
ets Jan 8 2013,rst cause:1, boot mode:(3,2)
load 0x40100000, len 612, room 16
tail 4
chksum 0xef
load 0x88888888, len -2004318072, room 4
flash read err, ets_unpack_flash_code
ets_main.c
3.boot load jump error.(user.bin not correct)
Code: Select all
ets Jan 8 2013,rst cause:1, boot mode:(3,2)
load 0x40100000, len 612, room 16
tail 4
chksum 0x12
load 0x3ffe8000, len 788, room 4
tail 0
chksum 0x50
load 0x3ffe8314, len 264, room 8
tail 0
chksum 0x4a
csum 0x4a
2nd boot version : 1.1
SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size : 4Mbit
jump to run user1
user code done
4.dual flash(boot+user.bin mode) ==>use download tool version v0.9.3.1 and above
Code: Select all
ets Jan 8 2013,rst cause:1, boot mode:(3,3)
load 0x40100000, len 612, room 16
tail 4
chksum 0x12
load 0x3ffe8000, len 788, room 4
tail 0
chksum 0x50
load 0x3ffe8314, len 264, room 8
tail 0
chksum 0x4a
csum 0x4a
2nd boot version : 1.1
SPI Speed : 40MHz
SPI Mode : SPI Flash Size : 4Mbit
jump to run user1
Fatal exception (28):
epc1=0x401001a4, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000009c, depc=0x00000000
Fatal exception (28):
epc1=0x401001a4, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000009c, depc=0x00000000
Fatal exception (28):
epc1=0x401001a4, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000009c, depc=0x00000000
===============================================
Updated on 2014.11.18
version: v0.9.3.1
release note:
1.fix the flash erase bug
2.fix the exception for w25x series flash,when using boot loader.
3.change the the download order, from low addr offset to high.
settings :
1.crystal: support 3 freq. 26m 40m 24m,choose the one you use.
2.spi speed:
spi flash read/write clk frequency.
3.spi mode :
1)QIO ,for flash that support quad r/w operation(e.g. W25Q)
2)QOUT,for flash that support quad read operation(e.g. W25Q)
3)DIO,for flash that support dual r/w operation(e.g. W25Q &W25X)
4)DOUT, for flash that support dual read operation(e.g. W25Q &W25X)
4.Flash size: effect the flash operation APIs and bootloader address.
5.combine bine button: generate the bin file of the whole size.
6.ID BIND:just provide a way that write chip id in the flash addr.Need at least 2 sector(2*4096Bytes)
==============================================================
Thanks to Fredrik Ahlberg's outstanding work of esptool.py
esp_init_data_default.bin-->0x7c000
blank.bin ==> 0x7e000
devkey --> 0x3e000
eagle.app.v6.irom0text.bin-->0x40000
eagle.app.v6.flash.bin --> 0x0
CONFIG ITEMS: FRYSTAL FREQUENCY , SPI SPEED ,R/W MODE,SIZE
IF ENABLE ID BIND IS ENABLED , THE MAC ADDR WILL BE WITEN IN TO THE GIVEN ADDR.
WIRTEN IN PYTHON2.6 AND WXPYTHON2.8
THE MAIN LOOP IS IN frame_test.py.
BUG OR ADVICE CAN BE POST HERE.