Microchip MPFS160TL handleiding
Handleiding
Je bekijkt pagina 28 van 61

FlashPro Express User Guide
27
Running Tcl Scripts from the Command Line
You can run Tcl scripts from your Windows or Linux command line.
To execute a Tcl script file in the FlashPro Express software from a shell command line:
1.
At the prompt, type the path to the Microsemi software followed by the word "SCRIPT" and a colon, and then
the name of the script file as follows:
<location of Microsemi software>/bin/FPExpress.exe SCRIPT:<filename>
The example below executes in batch mode the script foo.tcl:
<location of Microsemi software>/bin/FPExpress.exe script:foo.tcl
The example below executes in batch mode the script foo.tcl and exports the log in the file foo.txt:
<location of Microsemi software>/bin/FPExpress.exe script:foo.tcl logfile:foo.txt
The example below executes in batch mode the script foo.tcl, creates a console where the log is
displayed briefly, and exports the log in the file foo.txt:
<location of Microsemi software>/bin/FPExpress.exe script:foo.tcl console_mode:brief
logfile:foo.txt
If you leave console_mode unspecified or set it to 'hide' FlashPro Express executes without a console
window. If you want to leave the console window open you can run the script with the console_mode
parameter set to 'show', as in the following example:
<location of Microsemi software>/bin/FPExpress.exe script:foo.tcl console_mode:show
logfile:foo.txt
2.
If you want to pass arguments to the Tcl script from the command line, then use the "SCRIPT_ARGS"
variable as follows:
<location of Microsemi software>/bin/FPExpress.exe SCRIPT:<filename> SCRIPT_ARGS:"param1
param2 param3"
Arguments passed to a Tcl script can be accessed through the Tcl variables argc and argv. The example
below demonstrates how a Tcl script accesses these arguments:
puts "Script name: $argv0"
puts "Number of arguments: $argc"
set i 0
foreach arg $argv {
puts "Arg $i : $arg"
incr i
}
Note: Script names can contain spaces if the script name is protected with double quotes:
FPExpress script:"FPExpress tcl/foo 1.tcl"
Exporting Tcl Scripts from within FlashPro Express
To export a set of Tcl commands from the FlashPro Express history:
1.
From the File menu, choose Export Script File.
2.
Enter the filename and click Save. The Export Script Options dialog appears (as shown in the figure below).
Bekijk gratis de handleiding van Microchip MPFS160TL, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.
Productinformatie
Merk | Microchip |
Model | MPFS160TL |
Categorie | Niet gecategoriseerd |
Taal | Nederlands |
Grootte | 10235 MB |