Texas MSP Flasher
Texas MSP Flasher
MSP Flasher
MSP Flasher is a user-friendly shell-based interface that provides easy access to MSP devices through
JTAG or Spy-Bi-Wire (SBW) by porting the most common functions of the MSP Debug Stack to the
command line.
Contents
1 Introduction ................................................................................................................... 2
2 Compatibility .................................................................................................................. 2
3 Triggers and Arguments .................................................................................................... 3
4 Exit Specifications ........................................................................................................... 5
5 Firmware Update............................................................................................................. 5
6 Segment Erase ............................................................................................................... 6
7 Example Cases .............................................................................................................. 6
8 Using MSP Flasher on Unix .............................................................................................. 14
9 Error Codes ................................................................................................................. 14
List of Figures
1 Loading and Executing Target Code From a .txt File ................................................................... 7
2 Reading Device Memory.................................................................................................... 8
3 Accessing an L092 Device Without Specifying an Operating Mode .................................................. 9
4 Accessing a L092 Device ................................................................................................. 10
5 Securing the Target device ............................................................................................... 11
6 Trying to Access a Secured Target Device ............................................................................. 12
7 Unlocking a Password-Protected Target Device ....................................................................... 13
List of Tables
1 Available Triggers and Arguments ........................................................................................ 3
2 Available (Combinations of) Exit Specifications ......................................................................... 5
3 Error Codes ................................................................................................................. 14
Trademarks
eZ430, LaunchPad, eZ430-Chronos, MSP430, MSP432, SimpleLink are trademarks of Texas Instruments.
OS X is a registered trademark of Apple Inc.
Ubuntu is a registered trademark of Canonical Ltd.
Windows is a registered trademark of Microsoft Corporation.
All other trademarks are the property of their respective owners.
1 Introduction
The typical MSP Flasher execution flow consists of the following steps. Optional steps can be activated or
deactivated by using special triggers or parameters (see Section 3).
1. Initialize FET debugger
2. Perform FET recovery (if a corrupted FET firmware is detected)
3. Update FET firmware (if a mismatch between firmware and MSP Debug Stack versions is detected)
4. Power up the target MSP device
5. Configure the target MSP for JTAG or SBW communication
6. Connect to the target MSP and display device information
7. Optional: Erase (parts of) the target device memory
8. Optional: Load target code into the device from a TXT or HEX file
9. Optional: Verify target code transfer
10. Optional: Read device memory and write it to a TXT or HEX file
11. Optional: Reset the device
12. Optional: Lock JTAG access
13. Optional: Reset the device
14. Optional: Power down the device
15. Optional: Start target code execution
16. Disconnect from the target MSP device
17. Close the FET connection
Status reports are written to a text file named log.txt. This file is saved in the Log folder under the folder
where the MSP Flasher executable resides. If the Log folder does not exist, it is automatically created.
New instances are appended to the log file, and old logs are never overwritten.
NOTE: For a GUI-based alternative to MSP Flasher, see UniFlash. As of version 4.0, UniFlash
features a command line interface with MSP Flasher compatibility mode.
2 Compatibility
MSP Flasher supports the following operating systems:
• Windows® 7 32 bit or 64 bit
• Windows 8 32 bit or 64 bit
• Windows 10 32 bit or 64 bit
• Ubuntu® 12.04 32 bit or 64 bit
• Ubuntu 14.04 32 bit or 64 bit
• Ubuntu 16.04 32 bit or 64 bit
• OS X® 10.9 or newer
NOTE: MSP Flasher for Linux does not support eZ430™ development tools. This includes the
Value Line LaunchPad™ development kit with eZ430 onboard emulation, eZ430-Chronos™
development tool, and older MSP-EXP430 experimenter boards with eZ430 onboard
emulation.
MSP Flasher requires a hardware interface to communicate with MSP target devices. The following TI
flash emulation tools (FETs) are supported:
• MSP-FET
• MSP-FET430UIF
• eZ-FET and eZ-FET lite
• eZ430 (including LaunchPad development kits)
NOTE: Do not disconnect the JTAG or emulator USB cable while MSP Flasher is running.
Wait until MSP Flasher execution is finished before disconnecting the debugger or target
device.
NOTE: To differentiate between multiple eZ430 tools (for example, two or more Value Line
LaunchPad tools connected to the same host PC), connect each tool individually or use the
unique identifier that is reported by MSP Flasher.
("Found USB FET @ HID0xxx:COMxxx").
Use this identifier with the –I switch whenever more than one eZ430 debugger is connected.
(1)
Omitted mandatory arguments are replaced by the default options if possible, or the user is prompted to provide them later.
4 Exit Specifications
Select the desired state for the device to be set to when MSP Flasher finishes its operation. This can be
done using the trigger -z and passing the arguments [exit_spec,…], where exit_spec is a valid exit
specification shown in Table 2.
NOTE: The specifications are delimited with the ',' (comma) character and enclosed by square
brackets.
5 Firmware Update
During runtime, if MSP Flasher detects a conflict between the firmware version of the debug probe (FET)
and the version of the MSP Debug Stack (MSP430.dll), it prompts the user to let MSP Flasher update the
firmware:
>> The firmware of your FET is outdated.
>> Would you like to update it? (Y/N): _
Type Y to update the firmware of the FET, display status reports, and on success continue execution of
the MSP Flasher routine. Type N to resume the running instance with the outdated firmware. TI
recommends not using MSP Flasher while the FET firmware does not match the version of the
MSP Debug Stack.
If an error is detected during the update, MSP Flasher prompts the user to retry or cancel the update:
>> Update failed. (R)etry/(C)ancel? _
Type R to repeat the attempt to update. Type C to resume the running instance with the outdated
firmware.
NOTE: The -s switch suppresses this user prompt. If there is a mismatch between the FET
firmware version and the MSP Debug Stack version, a firmware update is done
automatically.
NOTE: For fully automated FET firmware updates, run the following command:
MSP430Flasher -n NO_TARGET -s
MSP Flasher updates only the FET firmware and does not attempt to connect to any target
MSP device.
6 Segment Erase
MSP Flasher supports erasure and reprogramming of a single memory segment while the rest of the
device memory is left untouched. To use this feature, use the -e switch with the ERASE_SEGMENT
option.
The user must provide a TI-txt or Intel-hex file that contains the target code in one continuous block. The
start address of this memory block defines the segment that should be erased.
NOTE: The size of the memory block that to program must not exceed the size of the segment in
which it should be programmed. Memory segments are either 256, 512, or 1024 bytes and
have fixed addresses inside the main memory depending on the MSP430 device. Refer to
the device user's guide and data sheet for the segment size and location for a specific target
device.
NOTE: The entire segment will be erased prior to programming, even if the memory block to be
programmed is smaller than the memory segment size.
It is also possible to leave the target memory unchanged before programming by using the -e NO_ERASE
option. Thus, multiple memory blocks can be programmed into the device while leaving the memory
sections in between them unchanged.
NOTE: Check the boundaries of the memory blocks to be programmed carefully when using the
NO_ERASE option. Particularly on target devices with flash memory, writing without erasing
can cause data corruption.
7 Example Cases
NOTE: To load a TI .txt or Intel .hex file, make sure that the file to be loaded is in the same
directory as the executable or that a valid path is specified.
NOTE: Triggers -p and -l are not used, because the device does not require a password. Triggers -i
and -e may be used but are unnecessary, because USB and ERASE_ALL are the default
settings for these parameters, respectively.
Figure 1 shows the console output on entering the previous command line into Windows command prompt
if the selected device is connected through the specified COM port.
MSP Flasher prompts to select the operating mode when the device name is found to be MSP430L092
and no mode has been selected. When C is entered as the device operating mode, the external memory
is not accessed.
Figure 4 shows the console output after running the same command line with an additional -o switch to
specify the operating mode.
MSP430Flasher -n MSP430L092 -o L
The L092 mode was selected from the start, so the user was not prompted for additional input. Note also
that the MSP Flasher wrote to the external memory: "Writing to external memory…"
NOTE: If the -n switch is omitted, MSP Flasher cannot automatically detect whether an activation
code is required and does not prompt the user to enter it.
MSP430Flasher -n MSP430F5438A -f
Figure 5 shows the console output after running the previous command line.
Figure 6 shows the console output after running the following command line to read the device main
memory after securing the target device.
MSP430Flasher -n MSP430F5438A -r [out.txt,MAIN]
9 Error Codes
Table 3 lists the possible error codes and messages.
Revision History
NOTE: Page numbers for previous revisions may differ from page numbers in the current version.
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2022, Texas Instruments Incorporated