utils/uf2conv.py: Fix padding with Python3
See: https://github.com/microsoft/uf2/pull/71 Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
@@ -73,7 +73,7 @@ def convert_from_uf2(buf):
|
|||||||
assert False, "Non-word padding size at " + ptr
|
assert False, "Non-word padding size at " + ptr
|
||||||
while padding > 0:
|
while padding > 0:
|
||||||
padding -= 4
|
padding -= 4
|
||||||
outp += b"\x00\x00\x00\x00"
|
outp.append(b"\x00\x00\x00\x00")
|
||||||
if familyid == 0x0 or ((hd[2] & 0x2000) and familyid == hd[7]):
|
if familyid == 0x0 or ((hd[2] & 0x2000) and familyid == hd[7]):
|
||||||
outp.append(block[32 : 32 + datalen])
|
outp.append(block[32 : 32 + datalen])
|
||||||
curraddr = newaddr + datalen
|
curraddr = newaddr + datalen
|
||||||
|
|||||||
Reference in New Issue
Block a user