mirror of
https://github.com/espressif/esptool.git
synced 2025-10-16 14:28:54 +08:00
fix(secure_download_mode): Disable secure boot detection and print more info
This commit is contained in:
@@ -906,6 +906,10 @@ def main(argv=None, esp=None):
|
||||
flash_size = detect_flash_size(esp, args)
|
||||
elif args.flash_size == "keep":
|
||||
flash_size = detect_flash_size(esp, args=None)
|
||||
if not esp.IS_STUB:
|
||||
print(
|
||||
"WARNING: In case of failure, please set a specific --flash_size."
|
||||
)
|
||||
else:
|
||||
flash_size = args.flash_size
|
||||
|
||||
|
@@ -230,7 +230,7 @@ def detect_flash_size(esp, args=None):
|
||||
if flash_size is None:
|
||||
flash_size = "4MB"
|
||||
print(
|
||||
"Warning: Could not auto-detect Flash size "
|
||||
"WARNING: Could not auto-detect Flash size "
|
||||
f"(FlashID={flash_id:#x}, SizeID={size_id:#x}), defaulting to 4MB"
|
||||
)
|
||||
else:
|
||||
@@ -568,11 +568,11 @@ def write_flash(esp, args):
|
||||
print("WARNING: File %s is empty" % argfile.name)
|
||||
continue
|
||||
|
||||
if not esp.get_secure_boot_enabled():
|
||||
if not esp.secure_download_mode and not esp.get_secure_boot_enabled():
|
||||
image = _update_image_flash_params(esp, address, args, image)
|
||||
else:
|
||||
print(
|
||||
"WARNING: Secure boot is enabled, so not changing any flash settings."
|
||||
"WARNING: Security features enabled, so not changing any flash settings."
|
||||
)
|
||||
calcmd5 = hashlib.md5(image).hexdigest()
|
||||
uncsize = len(image)
|
||||
|
Reference in New Issue
Block a user