Update(150414) :Flash download tool , Look over here !

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Update(150414) :Flash download tool , Look over here !

Postby costaud » Tue Nov 04, 2014 1:29 am

Update on 2015.05.08

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.
FLASH_DOWNLOAD_TOOLS_v0.9.6_150419.rar
(7.11 MiB) Downloaded 21430 times



Update on 2015.04.14
FLASH_DOWNLOAD_TOOLS_v0.9.5_150414.rar
(7.18 MiB) Downloaded 2987 times

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
FLASH_DOWNLOAD_TOOLS_v0.9.3.1_141118.rar
(6.14 MiB) Downloaded 7494 times


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.

Fadi
Posts: 13
Joined: Mon Oct 27, 2014 9:48 am

Re: code: Flash download tool based on python2.6 and wxpytho

Postby Fadi » Tue Nov 04, 2014 1:49 am

costaud, thanks for the post.

muris
Posts: 35
Joined: Fri Oct 24, 2014 7:25 pm
Location: Bosnia-Herzegovina
Contact:

Re: code: Flash download tool based on python2.6 and wxpytho

Postby muris » Tue Nov 04, 2014 3:23 pm

Thanks!

reaper7
Posts: 25
Joined: Fri Oct 24, 2014 7:26 pm

Re: code: Flash download tool based on python2.6 and wxpytho

Postby reaper7 » Tue Nov 11, 2014 5:02 am

it is possible to add functionality to control RTS/DTR uart pins,
which in next step controls ESP RESET/GPIO0 pins for automatically enter upload process?
RST LOW->DTR LOW->RST UP->DTR UP

and of course one more hard reset RST LOW->RST UP after programming process for bootup with new firmware

this is mod version of esptool.py
http://www.esp8266.com/viewtopic.php?f=6&t=527
https://github.com/toomasz/esp8266_stuff

tinhead
Posts: 5
Joined: Fri Oct 24, 2014 8:28 pm

Re: code: Flash download tool based on python2.6 and wxpytho

Postby tinhead » Tue Nov 11, 2014 7:12 am

reaper7 wrote:it is possible to add functionality to control RTS/DTR uart pins,
which in next step controls ESP RESET/GPIO0 pins for automatically enter upload process?
RST LOW->DTR LOW->RST UP->DTR UP
and of course one more hard reset RST LOW->RST UP after programming process for bootup with new firmware


no, it is not possible to do it properly for each every available SoC mode and it's electrical specs without external drivers (e.g. two BSS138 + pullups/down per pin).
And any external driver breaks the "universality" in universal flash download tool, if you wish pin toggle feature for your circuit just add few lines of code and recompile the tool.

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Update(141118) :Flash download tool(fix bugs for w25x fl

Postby costaud » Wed Nov 19, 2014 2:39 am

updated!

guan
Posts: 17
Joined: Wed Oct 29, 2014 8:41 am

Re: Update(141119) :Flash download tool(fix bugs for w25x fl

Postby guan » Thu Nov 20, 2014 11:19 pm

Thank you so much for fixing this.

User avatar
rudi
Posts: 197
Joined: Fri Oct 24, 2014 7:55 pm

Re: Update(141119) :Flash download tool(fix bugs for w25x fl

Postby rudi » Sun Dec 28, 2014 9:48 am

hi

>> 6.ID BIND:just provide a way that write chip id in the flash addr.Need at least 2 sector(2*4096Bytes)

what is that mean:
flash download tool write the chip id to flash adress example 0x14000 with a auto routine and the fw is protected by self without any written code by user?
example: guy dump copy to other modul
boot code compare chip id with flash adress 0x14000
if not same boot is broken

do you can give a construction, please?

or mean this:
chip id is written to the flash addr that user given in bind;
user must controll in fw code byself -

txs
best wishes
rudi ;-)

-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

vowstar
Posts: 15
Joined: Fri Oct 24, 2014 7:23 pm

Re: Update(150414) :Flash download tool , Look over here !

Postby vowstar » Tue Apr 14, 2015 9:29 pm

Thanks!

Newtronix
Posts: 1
Joined: Tue Dec 30, 2014 10:11 am

Re: Update(150414) :Flash download tool , Look over here !

Postby Newtronix » Wed May 06, 2015 11:32 pm

Hi, how can I get source code of FLASH_DOWNLOAD_TOOLS_v0.9.6_150419.rar? Thanks in advance.

Who is online

Users browsing this forum: No registered users and 9 guests