1
import os
import numpy as np
f_out = open("romData.bin","wb")
pad_data = [0xFF for i in range(38400)]
for fileCnt in range(46):
fileCnts = fileCnt
file_name = r"E:\DrDaifiles\zm2\SpiFlash\BinOut\\"+str(fileCnts)+".bin"
if os.path.exists(file_name):
#print(fileCnts,"exists")
f_out.write(open(file_name, "rb").read())
else:
f_out.write(bytearray(pad_data))
f_out.close()
print("OK")
def Test(fileCnts,pad_data):
if fileCnts == 1:
f_out1 = open("romData1.bin","wb")
f_out1.write(bytearray(pad_data))
f_out1.close()