Merge pull request #162 from antonblanchard/bin2hex-removal

rust_lib_demo: Remove bin2hex.py
jtag-port
Anton Blanchard 5 years ago committed by GitHub
commit 2b11c81b18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,17 +0,0 @@
#!/usr/bin/python3

import sys
import subprocess
import struct

with open(sys.argv[1], "rb") as f:
while True:
word = f.read(8)
if len(word) == 8:
print("%016x" % struct.unpack('Q', word));
elif len(word) == 4:
print("00000000%08x" % struct.unpack('I', word));
elif len(word) == 0:
exit(0);
else:
raise Exception("Bad length")
Loading…
Cancel
Save