From ee5a468417fb6810a5bbe4d46617618a9ddb588a Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Thu, 7 May 2009 10:07:49 +0200 Subject: * digital/avr/modules/trace: (See #67) * Adapted the trace module to: * Find the last trace in order to start the new one, trace_i = trace_i-1 + 1 * A quarter of the flash is completely erased on the trace init to be used in the future. * Removed the start code useless from now. * tools/trace: * Update the python scripts to use the new trace implementation. --- tools/trace/trace.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools/trace/trace.py') 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" -- cgit v1.2.3