mirror of
https://github.com/espressif/esptool.git
synced 2025-10-15 04:14:48 +08:00
fix(write_flash): Skip flash_size checks if we can't read flash size
Closes https://github.com/espressif/esptool/issues/1045
This commit is contained in:
@@ -495,7 +495,7 @@ def write_flash(esp, args):
|
||||
else: # Check against real flash chip size if not in SDM
|
||||
flash_end_str = detect_flash_size(esp)
|
||||
flash_end = flash_size_bytes(flash_end_str)
|
||||
if set_flash_size and set_flash_size > flash_end:
|
||||
if set_flash_size and flash_end and set_flash_size > flash_end:
|
||||
print(
|
||||
f"WARNING: Set --flash_size {args.flash_size} "
|
||||
f"is larger than the available flash size of {flash_end_str}."
|
||||
|
Reference in New Issue
Block a user