slau358q.pdf - 第25页
www.ti.com Programming MSP Flash Devices Using the MSP Gang Programmer 25 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation NOT…

Programming MSP Flash Devices Using the MSP Gang Programmer
www.ti.com
24
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Operation
2.1.3 Programming From Script
Use this option to create a script file to automate more complicated programming procedures. Scripts can
create functions that open message boxes, adjust voltage, target devices, change code files, and any
other sequences of reconfigurations up to a total of 1000 commands. Repeated series of instructions can
be encompassed into functions for easier programming. The stack supports a call depth of up to 50
CALLs (CALL inside CALL inside CALL, and so on), which is sufficient for most nonrecursive programs.
Figure 2-8 shows the main dialog GUI where the From Script option is selected for programming (top left
corner). A script file is selected using the Open Script File button and it specifies all configuration options,
and the code files to be used for programming. A script can be created using any text editor and saved in
a simple text file. Follow these guidelines to create a script.

www.ti.com
Programming MSP Flash Devices Using the MSP Gang Programmer
25
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Operation
NOTE: This figure shows the From Script mode (see the Mode section near the top left corner). A script file is
selected using the Open Script File button and it specifies all configuration options, and the code files to be
used for programming. In addition, the script can call individual functions, such as Program or Verify, in the
order specified by the programmer.
Figure 2-8. Main MSP Gang Programmer Dialog GUI, From Script
2.1.3.1 Script Limitations
• Up to a total of 1000 command lines can be used. Empty lines and comments are ignored.
• The stack supports a call depth of up to 50 CALLs (CALL inside CALL inside CALL, and so on).

Programming MSP Flash Devices Using the MSP Gang Programmer
www.ti.com
26
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Operation
2.1.3.2 Command Syntax
• White spaces before instructions, labels, and comments are ignored.
• ; – Start of a comment. All characters in the same line after the start of a comment are ignored.
NOTE: A comment cannot be placed after a filename.
For example, when specifying a config file to be loaded, a path to a file must be given. This
filename cannot be followed by a comment.
• > – Start of a label. Place the label name after the character with no spaces in between.
NOTE: A line with a label cannot also contain a command or another label.
For example, this would be illegal:
>START VCCOFF
2.1.3.3 Instructions
MESSAGE – Message declaration. Contents must be placed between quotes below a message
declaration. Maximum of 50 content lines. Example:
MESSAGE "Hello." "This is my script."
GUIMSGBOX setting – Enable or disable pop-up message boxes in the GUI (warning and errors). Setting
can be either ENABLE or DISABLE.
IFGUIMSGBOXPRESS option – Apply the option when a message box created by GUI is generated.
Option can be OK or CANCEL.
MESSAGEBOX type – Create a pop-up message box with buttons. Contents must be placed between
quotes below message declaration. Maximum of 50 content lines. Message box types are:
• OK – One button: OK.
• OKCANCEL – Two buttons: OK and CANCEL
• YESNO – Two buttons: YES and NO
• YESNOCANCEL – Three buttons: YES, NO, and CANCEL
Example:
MESSAGE YESNOCANCEL
"You have three choices:"
"Press yes, no, or cancel."
GOTO label – Jump to instruction immediately following the label.
SLEEP number – Pause a number of milliseconds, between 1 and 100000.
F_LOADPASSWORDFILE filename – Load JTAG password file. Provide a full path and filename.
F_FROMIMAGEMODE – Switch to Image mode.
CALL label – Call procedure starting at the instruction immediately following the label. Stack saves return
address.
RETURN – Return from CALL.