Skip to content

Commit

Permalink
Add warning for using stub with >16MB flash size
Browse files Browse the repository at this point in the history
  • Loading branch information
radimkarnis committed Oct 27, 2021
1 parent e598c4d commit 95611bb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions esptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4588,6 +4588,13 @@ def add_spi_flash_subparsers(parent, allow_keep, auto_detect):
detect_flash_size(esp, args)
if args.flash_size != 'keep': # TODO: should set this even with 'keep'
esp.flash_set_parameters(flash_size_bytes(args.flash_size))
# Check if stub supports chosen flash size
if esp.IS_STUB and args.flash_size in ('32MB', '64MB', '128MB'):
print("WARNING: Flasher stub doesn't fully support flash size larger than 16MB, in case of failure use --no-stub.")

if esp.IS_STUB and hasattr(args, "address") and hasattr(args, "size"):
if args.address + args.size > 0x1000000:
print("WARNING: Flasher stub doesn't fully support flash size larger than 16MB, in case of failure use --no-stub.")

try:
operation_func(esp, args)
Expand Down

0 comments on commit 95611bb

Please sign in to comment.