mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-26 06:25:20 +00:00
14 lines
284 B
Python
14 lines
284 B
Python
|
#!/usr/bin/python3
|
||
|
|
||
|
asciiBinFile = 'ram.txt'
|
||
|
binFile = 'ram.bin'
|
||
|
|
||
|
asciiBinFP = open(asciiBinFile, 'r')
|
||
|
binFP = open (binFile, 'wb')
|
||
|
|
||
|
for line in asciiBinFP.readlines():
|
||
|
binFP.write(int(line, 16).to_bytes(8, byteorder='little', signed=False))
|
||
|
|
||
|
asciiBinFP.close()
|
||
|
binFP.close()
|