1
0
mirror of https://github.com/antonblanchard/chiselwatt.git synced 2026-01-20 18:07:28 +00:00
Carlos de Paula 4f1d3e5ae7 Add hello_world sample sources and Makefile targets
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>
2020-04-28 13:50:50 -03:00

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")