summaryrefslogtreecommitdiffhomepage
path: root/tools/trace/trace.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/trace/trace.py')
-rw-r--r--tools/trace/trace.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/trace/trace.py b/tools/trace/trace.py
index 6850a4cd..b41ef9ef 100644
--- a/tools/trace/trace.py
+++ b/tools/trace/trace.py
@@ -17,6 +17,10 @@ parser.add_option("-i", "--infile", dest="infile",
help="Read the data from the file")
parser.add_option("-t", "--type", dest="type",
help="create to create the enumeration, inter to read the log from the flash.")
+parser.add_option("-l", "--list", dest="list_trace", action="store_true",
+ help="List the number of the traces.")
+parser.add_option("-n", "--num", type="int", dest="trace",
+ help="Dump the trace num provided, only used in inter mode.")
[options, args] = parser.parse_args()
@@ -25,6 +29,11 @@ if options.type == 'create':
cre.create ()
elif options.type == "inter":
inter = TInter (options.infile, options.outfile)
- inter.trace_print()
+ if options.list_trace:
+ inter.available_traces ()
+ elif options.trace:
+ inter.trace_print (options.trace)
+ else:
+ inter.trace_print()
else:
print "see the help\n python trace --help"