summaryrefslogtreecommitdiff
path: root/tools/trace/tinter
diff options
context:
space:
mode:
authorJérémy Dufour2009-05-18 13:03:55 +0200
committerJérémy Dufour2009-05-18 13:03:55 +0200
commitabb347789ec6bbef3704c3fb7db96d25015b6487 (patch)
treed13581b0df707c03af4708722c05dcd25f5beb84 /tools/trace/tinter
parent734263aa90fa150e1bcfa6bc70d140a35fccdc39 (diff)
* tools/trace:
- find template using script path, - use ttyUSB (dev2) rather than ttyACM (dev), - decode all printf sequence (rather than just %d).
Diffstat (limited to 'tools/trace/tinter')
-rw-r--r--tools/trace/tinter/thost.py2
-rw-r--r--tools/trace/tinter/tinter.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/tools/trace/tinter/thost.py b/tools/trace/tinter/thost.py
index 885fbbb3..cdaef554 100644
--- a/tools/trace/tinter/thost.py
+++ b/tools/trace/tinter/thost.py
@@ -19,7 +19,7 @@ def log (x):
class THost:
"""Class to connect to the flash memory."""
def __init__(self):
- self.__proto = Proto (serial.Serial ('/dev/ttyACM0'), time.time, 0.1)
+ self.__proto = Proto (serial.Serial ('/dev/ttyUSB0'), time.time, 0.1)
self.__memory = list()
self.__traces = []
diff --git a/tools/trace/tinter/tinter.py b/tools/trace/tinter/tinter.py
index 855f97da..c38239ea 100644
--- a/tools/trace/tinter/tinter.py
+++ b/tools/trace/tinter/tinter.py
@@ -29,12 +29,13 @@ class TInter:
if cmd < len(events):
e = events[cmd]
string = e.string_get()
+ vals = [ ]
for i in range (0, e.param_nb()):
p = e.param_get(i)
size = p.length()
- val = get_size (memory, size)
+ vals.append (get_size (memory, size))
memory = memory[size:]
- string = string.replace('%d', str(val), 1)
+ string = string % tuple (vals)
if self.__file == None:
print string[1:len(string)-1]