mirror of https://github.com/ARMmbed/mbed-os.git
Prefixed string to properly be parsed as bytes
parent
36e65d2cb1
commit
8c10cb0b8d
|
@ -427,7 +427,7 @@ class LPC4088Code(object):
|
||||||
# Pad the fist part (internal flash) with 0xFF to 512k
|
# Pad the fist part (internal flash) with 0xFF to 512k
|
||||||
data = partf.read()
|
data = partf.read()
|
||||||
outbin.write(data)
|
outbin.write(data)
|
||||||
outbin.write('\xFF' * (512*1024 - len(data)))
|
outbin.write(b'\xFF' * (512*1024 - len(data)))
|
||||||
partf.close()
|
partf.close()
|
||||||
# Read and append the second part (external flash) in chunks of fixed
|
# Read and append the second part (external flash) in chunks of fixed
|
||||||
# size
|
# size
|
||||||
|
@ -470,7 +470,7 @@ class MTSCode(object):
|
||||||
part = open(loader, 'rb')
|
part = open(loader, 'rb')
|
||||||
data = part.read()
|
data = part.read()
|
||||||
outbin.write(data)
|
outbin.write(data)
|
||||||
outbin.write('\xFF' * (64*1024 - len(data)))
|
outbin.write(b'\xFF' * (64*1024 - len(data)))
|
||||||
part.close()
|
part.close()
|
||||||
part = open(binf, 'rb')
|
part = open(binf, 'rb')
|
||||||
data = part.read()
|
data = part.read()
|
||||||
|
|
Loading…
Reference in New Issue