Chat freely about anything...

User avatar
By rojer
#43710 I wrote a new, better flasher for ESP8266. With the right USB-to-serial adapter, you'll be able to flash 512K firmware in just over 5 seconds, reliably. Somewhat slower if your adapter doesn't support higher baud rates (but still much faster than before).
Grab a modified esptool and use the new --flash_baud option to write_flash with higher rate or use Flash ’n Chips and modify the rate in Settings -> Advanced. For the gory details, read the blog post.

Teaser:

Code: Select all$ time ./esptool.py --port /dev/ttyUSB0 write_flash --flash_baud=4000000 0 test.img
Connecting...
Running Cesanta flasher...
Switching to 4000000 baud...
Writing 524288 @ 0x0... 524288 (100 %)
Wrote 524288 bytes at 0x00000000 in 4.8 seconds (882.3 kbit/s)...
Leaving...

real    0m5.286s


Any questions? Feel free to ask here.
User avatar
By wififofum
#43759 Looks good. Stub environment could be useful for manufacturing tests and such. Is there any benefit to using larger buffers or is the flash write cycle time not emptying the buffers fast enough to bother? What about core and spi clock rates?
User avatar
By rojer
#43768 better buffer management does provide some benefit - at lower speeds, where performance can be compared directly, my code is 12-15% faster:

at 230K:

Wrote 524288 bytes at 0x00000000 in 26.2 seconds (160.4 kbit/s)...
vs
Wrote 524288 bytes at 0x00000000 in 23.4 seconds (179.5 kbit/s)...

at 460K:

Wrote 524288 bytes at 0x00000000 in 15.4 seconds (272.0 kbit/s)...
vs
Wrote 524288 bytes at 0x00000000 in 13.5 seconds (309.7 kbit/s)...

i have not tested different flash modes/clock speeds yet.