summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--host/proto/proto.py4
-rw-r--r--tools/trace/tinter/thost.py7
2 files changed, 10 insertions, 1 deletions
diff --git a/host/proto/proto.py b/host/proto/proto.py
index e5f0af21..8856a584 100644
--- a/host/proto/proto.py
+++ b/host/proto/proto.py
@@ -150,6 +150,10 @@ class Proto:
h = self.handlers[key]
h[0] (*(frame.decode (h[1])))
+ def flush (self):
+ """Drop any pending frames."""
+ self.send_queue = [ ]
+
class Frame:
def __init__ (self, command = None, fmt = '', *args):
diff --git a/tools/trace/tinter/thost.py b/tools/trace/tinter/thost.py
index b5c43c0f..aabde424 100644
--- a/tools/trace/tinter/thost.py
+++ b/tools/trace/tinter/thost.py
@@ -25,8 +25,13 @@ class THost:
def __dump_callback (self, *memory):
"""Callback call on each data reception"""
+ not_ff = False
for i in range(len (memory)):
+ if memory[i] != 0xff:
+ not_ff = True
self.__memory.append (memory[i])
+ if not not_ff:
+ self.__proto.flush ()
sys.stderr.write (".")
def __trace_present (self, val):
@@ -64,7 +69,7 @@ class THost:
i -= FLASH_PAGE
start_addr = i
- end_addr = start_addr + 100 * 16
+ end_addr = start_addr + FLASH_PAGE
print "Dump memory from address : " + hex(start_addr) + " to " + \
hex(end_addr)