From 6966b30c7f8a1630c137d92e0af723139831f5fb Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Fri, 15 May 2009 20:45:04 +0200 Subject: * tools/trace: (Closes #67) * Document how to have the options available. * Improve options explanation. --- tools/trace/doc/trace.txt | 17 +---------------- tools/trace/trace.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/tools/trace/doc/trace.txt b/tools/trace/doc/trace.txt index cd14826e..248cdf13 100644 --- a/tools/trace/doc/trace.txt +++ b/tools/trace/doc/trace.txt @@ -12,22 +12,7 @@ Use The trace tool is divided in two parts, the one which generate the enumerator and the one which interpret the memory data to print it on screen. -To generate the enumerator -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -python trace.py create [Options] - -Options: - - * -e : enumerator identifier for the source files. - * -o : The output file to write the enumerator. - -To interpret the memory data -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -python trace.py inter - -The interpreted data is directly print on the std output. +python trace.py -h to have all the possibilities. Trace definition file --------------------- diff --git a/tools/trace/trace.py b/tools/trace/trace.py index b41ef9ef..a6496652 100644 --- a/tools/trace/trace.py +++ b/tools/trace/trace.py @@ -6,21 +6,25 @@ sys.path.append ('../../host/') from tcreator.tcreator import * from tinter.tinter import * +INTER_MODE=" (only available on interpretor mode)." +CREATE_MODE=" (only available on create mode)." + print "Trace System v1.0 by APBTeam\n" parser = OptionParser() parser.add_option("-e", "--enum-name", dest="enum_name", - help="provide the enumerator name", metavar="ENUM") + help="provide the enumerator name" + CREATE_MODE, + metavar="ENUM") parser.add_option("-o", "--output", dest="outfile", - help="Store the eunerator on the output file") + help="Store the enumerator on the output file" + CREATE_MODE) 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.") + help="List the number of the traces" + INTER_MODE) parser.add_option("-n", "--num", type="int", dest="trace", - help="Dump the trace num provided, only used in inter mode.") + help="Dump the trace number provided" + INTER_MODE) [options, args] = parser.parse_args() -- cgit v1.2.3