diff --git a/esptool/__init__.py b/esptool/__init__.py index 252f34ace6..bc4d102c73 100644 --- a/esptool/__init__.py +++ b/esptool/__init__.py @@ -496,7 +496,7 @@ def add_spi_flash_subparsers( "quantity. This will make the other segments invisible to the ROM " "loader. Use this argument with care because the ROM loader will load " "only the RAM segments although the other segments being present in " - "the output.", + "the output. Implies --dont-append-digest", action="store_true", default=None, ) diff --git a/esptool/cmds.py b/esptool/cmds.py index b7b483894c..4d9975ea41 100644 --- a/esptool/cmds.py +++ b/esptool/cmds.py @@ -1050,7 +1050,10 @@ def elf2image(args): image.min_rev_full = args.min_rev_full image.max_rev_full = args.max_rev_full image.ram_only_header = args.ram_only_header - image.append_digest = args.append_digest + if image.ram_only_header: + image.append_digest = False + else: + image.append_digest = args.append_digest elif args.version == "1": # ESP8266 image = ESP8266ROMFirmwareImage() elif args.version == "2": @@ -1075,7 +1078,10 @@ def elf2image(args): image.elf_sha256_offset = args.elf_sha256_offset if args.ram_only_header: - print("ROM segments hidden - only RAM segments are visible to the ROM loader!") + print( + "Image has only RAM segments visible. " + "ROM segments are hidden and SHA256 digest is not appended." + ) image.sort_segments() before = len(image.segments)