frontend: always pad to 512 bytes, fill with 0xff
This seems to be the default of STC-ISP, so let's use it for possibly improved compatibility.
This commit is contained in:
parent
366a3a5bd3
commit
6c0af88551
@ -109,9 +109,9 @@ class StcGal:
|
||||
bindata = bindata[0:code_size]
|
||||
bindata += eedata
|
||||
|
||||
# pad to 256 byte boundary
|
||||
if len(bindata) % 256:
|
||||
bindata += bytes(256 - len(bindata) % 256)
|
||||
# pad to 512 byte boundary
|
||||
if len(bindata) % 512:
|
||||
bindata += b'\xff' * (512 - len(bindata) % 512)
|
||||
|
||||
if self.opts.option: self.emit_options(self.opts.option)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user