From ccbfefb674166ac5cd95d737a019c88d5a20d3a8 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Tue, 23 Jun 2009 21:09:47 +0200 Subject: *tools/trace: * Updating the python tool to use a host program to dump traces too. --- tools/trace/tinter/thost.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tools/trace/tinter/thost.py') diff --git a/tools/trace/tinter/thost.py b/tools/trace/tinter/thost.py index aabde424..f888a242 100644 --- a/tools/trace/tinter/thost.py +++ b/tools/trace/tinter/thost.py @@ -1,7 +1,9 @@ import serial import time import sys -from proto import * +sys.path.append ('../../host/') +from proto.proto import * +from proto.popen_io import * from utils import * FLASH_MEMORY_HIGH = 0x1fffff @@ -18,8 +20,12 @@ def log (x): class THost: """Class to connect to the flash memory.""" - def __init__(self): - self.__proto = Proto (serial.Serial ('/dev/ttyUSB0'), time.time, 0.1) + def __init__(self, prgm): + if prgm[0] == '!': + self.__proto = Proto (PopenIO (prgm[1:]), + time.time, 0.1) + else: + self.__proto = Proto (serial.Serial (prgm), time.time, 0.1) self.__memory = list() self.__traces = [] -- cgit v1.2.3