scripts: stm32_mem cosmetic changes

Add a newline to avoid overwriting the last "Programming memory..."
message.

Remove inline tabs.
This commit is contained in:
Nicolas Schodet 2022-01-04 09:12:37 +01:00 committed by Piotr Esden-Tempski
parent ad6c1eb11b
commit 946ccab778
1 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ def stm32_scan(args, test):
product = dfudev.handle.getString(dfudev.dev.iProduct, 96).decode('utf8') product = dfudev.handle.getString(dfudev.dev.iProduct, 96).decode('utf8')
serial_no = dfudev.handle.getString(dfudev.dev.iSerialNumber, 30).decode('utf8') serial_no = dfudev.handle.getString(dfudev.dev.iSerialNumber, 30).decode('utf8')
if args.serial_target: if args.serial_target:
if man == "Black Sphere Technologies" and serial_no == args.serial_target: if man == "Black Sphere Technologies" and serial_no == args.serial_target:
break break
else: else:
if man == "Black Sphere Technologies": if man == "Black Sphere Technologies":
@ -236,7 +236,7 @@ if __name__ == "__main__":
bin = file.read() bin = file.read()
len = len(bin) len = len(bin)
addr = start addr = start
print("-") print("\n-")
while bin: while bin:
try: try:
stm32_set_address(dfudev, addr) stm32_set_address(dfudev, addr)
@ -251,7 +251,7 @@ if __name__ == "__main__":
else : else :
size = len size = len
if bin[:size] != bytearray(data[:size]) : if bin[:size] != bytearray(data[:size]) :
print ("\nMitmatch in block at 0x%08X" % addr) print ("\nMismatch in block at 0x%08X" % addr)
break; break;
bin = bin[1024:] bin = bin[1024:]
addr += 1024 addr += 1024