Skip to content

Commit 12095b2

Browse files
committed
fix(write_flash): Skip flash_size checks if we can't read flash size
Closes espressif#1045
1 parent 701b956 commit 12095b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

esptool/cmds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def write_flash(esp, args):
495495
else: # Check against real flash chip size if not in SDM
496496
flash_end_str = detect_flash_size(esp)
497497
flash_end = flash_size_bytes(flash_end_str)
498-
if set_flash_size and set_flash_size > flash_end:
498+
if set_flash_size and flash_end and set_flash_size > flash_end:
499499
print(
500500
f"WARNING: Set --flash_size {args.flash_size} "
501501
f"is larger than the available flash size of {flash_end_str}."

0 commit comments

Comments
 (0)