diff --git a/scripts/imgtool/main.py b/scripts/imgtool/main.py index 9dd033c419..942112de32 100755 --- a/scripts/imgtool/main.py +++ b/scripts/imgtool/main.py @@ -416,7 +416,7 @@ def sign(key, public_key_format, align, version, pad_sig, header_size, pad = True img = image.Image(version=decode_version(version), header_size=header_size, pad_header=pad_header, pad=pad, confirm=confirm, - align=int(align), slot_size=slot_size, + align = int(align) if align else 1, slot_size=slot_size, max_sectors=max_sectors, overwrite_only=overwrite_only, endian=endian, load_addr=load_addr, rom_fixed=rom_fixed, erased_val=erased_val, save_enctlv=save_enctlv,