Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
#!/usr/bin/env python3
import sys
bindata = bytearray()
if len(sys.argv) < 2:
sys.exit("Usage: packbin output.bin offset1:input1.bin ...")
for input_str in sys.argv[2:]:
offset, fname = input_str.split(":")
offset = int(offset, 0)
newdata = open(fname, "rb").read()
if len(bindata) < offset + len(newdata):
bindata.extend([0] * (offset + len(newdata) - len(bindata)))
bindata[offset:offset + len(newdata)] = newdata
open(sys.argv[1], "wb").write(bindata)
7d2427ddfThis file is pinned to the selected release. Download the original to open it in your design tool.