mirror of
https://github.com/antonblanchard/chiselwatt.git
synced 2026-01-20 18:07:28 +00:00
Added hello_world sources and new Makefile targets for building hello_world and Micropython inside containers. Updated documentation reflecting these changes and moved binaries to ./samples/binaries/. Signed-off-by: Carlos de Paula <me@carlosedp.com>
18 lines
463 B
Python
Executable File
18 lines
463 B
Python
Executable File
#!/usr/bin/env 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")
|