m1n1/proxyclient/setup.py
Hector Martin 397bfa17c6 proxyclient: new asm/malloc/utils, clean up
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-01-17 00:50:34 +09:00

18 lines
380 B
Python

import serial, os, struct, sys, time
from proxy import *
from tgtypes import *
from utils import *
uartdev = os.environ.get("M1N1DEVICE", "/dev/ttyUSB0")
usbuart = serial.Serial(uartdev, 115200)
iface = UartInterface(usbuart, debug=False)
p = M1N1Proxy(iface, debug=False)
u = ProxyUtils(p)
mon = RegMonitor(u)
p.set_baud(1500000)
iface.nop()
print("Base at: 0x%x" % u.base)