SLAU358Q September 2011 – October 2019
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:
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.
IF condition operation – Test condition and if true then perform operation. The condition can be one of the following:
The operation can be one of the following:
F_LOADCFGFILE filename – Load configuration file. Provide a full path and filename.
F_LOADCODEFILE filename – Load code file. Provide a full path and filename.
F_APPENDCODEFILE filename – Append code file. Provide a full path and file name.
F_VCCOFF – Turn VCC OFF from programming adapter to target device.
F_VCCON – Turn VCC ON from programming adapter to target device.
NOTE
VCC from FPA must be enabled first using configuration file.
F_VCCINMV – Set VCC in mV, between 1800 to 3600 in steps of 100 mV.
F_RESET – Perform RESET function from main dialog screen.
F_GO – Perform GO function from main dialog screen.
F_ERASEFLASH – Perform ERASE FLASH function from main dialog screen.
F_BLANKCHECK – Perform BLANK CHECK function from main dialog screen.
F_WRITEFLASH – Perform WRITE FLASH function from main dialog screen.
F_VERIFYFLASH – Perform VERIFY FLASH function from main dialog screen.
F_BLOWFUSE – Perform BLOW FUSE function from main dialog screen.
NOTE
Blows fuse regardless of enable option.
If the BLOW FUSE command is used, then the security fuse is blown even if the Blow Security Fuse enable option is disabled.
F_SETIMAGENUMBER number – Choose image number between 1 and 96 from MSP Gang Programmer internal memory.
F_INTERACTIVEMODE – Switch to Interactive mode.
NOTE
The execution result can be saved in the result file. Contents of the file can be used by the application software if required. The result can be saved in the new file or append to the existing file. Following script line commands can be used for specifying the result file:
F_NEWRESULTFILENAME – Provide a full path and name of the result file.
F_APPENDRESULTFILENAME – Provide a full path and name of the file where the result should be appended.
F_COMMENTTOFILE – Add a comment at the beginning of the result stream.
F_RESULTTOFILE – Save result to the result file specified by F_NEWRESULTFILENAME or F_APPENDRESULTFILENAME. The following data is saved:
Finished task mask: HHHH (16 bits task mask)
Cumulative target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Requested target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Connected target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Erased target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Blank Check target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Programmed target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Verified target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Secured target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
error_no: error number
VTIO in mV: VTio in mV
Vcc Error target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Vcc Cumulative Err mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
JTAG Init target mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Already Secured mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
Wrong MCU ID mask: HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8);
TRACEOFF – Disable tracing.
TRACEON – Enable tracing and log to the Trace-Scr.txt file in the current working directory. This option is useful for debugging. The trace file contains the sequence of all executed commands from the script file annotated with line numbers. Line numbers are counted without empty lines and without lines containing only comments.
END – End of script.
The following example script executes this sequence of commands:
;=====================================================
; Script file - demo program
;-----------------------------------------------------
>START
F_VCCOFF
MESSAGEBOX OKCANCEL
"VCC if OFF now. Connect the test board."
"When ready press the button:"
" "
"OK - to test the board"
"CANCEL - to exit from program"
IF BUTTONCANCEL GOTO finish
; use file name and FULL PATH or relative path to MSP-Gang.dll file location
F_LOADCFGFILE Examples\Script\test.mspgangproj
MESSAGEBOX OK
"Press OK to download the test program."
F_GO
MESSAGEBOX YESNO
"Press YES when the test finished successfully."
"Press NO when the test failed."
IF BUTTONNO GOTO START
; use file name and FULL PATH or relative path to MSP-Gang.dll file location
F_LOADCFGFILE Examples\Script\finalcode.mspgangproj
F_GO
; wait min 0.5 s before turning Vcc ON again
SLEEP 500
F_VCCON
SLEEP 10000
GOTO START
>finish
END
;=======================================================