blob: 481b36de897076de2725ade0c2377079df53891a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/env python
import subprocess, time
qemu = subprocess.Popen(
'qemu-system-arm -machine lm3s6965evb -nographic -serial null -semihosting -kernel demo.elf -S'.split(),
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE,
)
qemu.stdin.write('cont\n')
start = time.time();
while 1:
line = qemu.stderr.readline()
t = time.time()
if not line:
break
print '[%11.6f] %s' % (t - start, line.strip())
|