Skip to content

Commit 88e2f58

Browse files
committed
Updated esptool.py
- Added patch: write_flash: Show actual flash write speed. pfalcon/esptool@205608b
1 parent 934d239 commit 88e2f58

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Espressif/utils/esptool.exe

0 Bytes
Binary file not shown.

Espressif/utils/esptool.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,8 @@ def arg_auto_int(x):
611611
blocks = math.ceil(len(image)/float(esp.ESP_FLASH_BLOCK))
612612
esp.flash_begin(blocks*esp.ESP_FLASH_BLOCK, address)
613613
seq = 0
614+
written = 0
615+
t = time.time()
614616
while len(image) > 0:
615617
print '\rWriting at 0x%08x... (%d %%)' % (address + seq*esp.ESP_FLASH_BLOCK, 100*(seq+1)/blocks),
616618
sys.stdout.flush()
@@ -623,8 +625,10 @@ def arg_auto_int(x):
623625
esp.flash_block(block, seq)
624626
image = image[esp.ESP_FLASH_BLOCK:]
625627
seq += 1
626-
print
627-
print '\nLeaving...'
628+
written += len(block)
629+
t = time.time() - t
630+
print '\nWritten %d bytes in %.2f seconds (%.2f kbit/s)...' % (written, t, written / t * 8 / 1000)
631+
print "\nLeaving..."
628632
esp.flash_finish(False)
629633

630634
elif args.operation == 'run':

Espressif/utils/library.zip

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)