Generating and Loading MSP430 Binary Files

From Texas Instruments Wiki
Jump to: navigation, search

This Wiki document gives necessary instructions to (1) generate MSP430 binary files (.txt/.hex files) using both IAR and CCS, and (2) download the binary files onto MSP430 device.

How to Generate MSP430 Binary Files

Using IAR

1. Select the project for which the binary files are to be generated and then Open Project -> Options
2. In the Options window select the category Linker
Under the Output tab, check the box “Allow C-SPY specific extra output file”.
IAR 1.jpg
Next, under the Extra Output tab, check the box “Generate extra output file” and then select the binary file format from the "Output format" drop box. In the figure below, “msp430-txt” option is selected. Selecting this option generates a .txt binary file.
IAR 2.jpg
3. Then click OK to close the Options window.
4. Next select Project -> Rebuild All to generate the binary file. In this case, the .txt file that is generated can be found under the “Output” folder of the project. The file can be located under the folder path: …Project Folder\Debug\Exe\


Using CCS v5.x

1. Select the project for which the binary files are to be generated and then Open Project -> Properties
2. In the Properties window select the category Build.
Under the Build Steps tab, select the binary file format from the drop box next to "Apply Predefined Step". Either the TI-TXT or INTEL-HEX formats can be selected. In the figure below TI-TXT file format is selected. Selecting this option generates a .txt binary file.
CCSv5.png
3. Then click OK to close the Properties window.
4. Next select Project -> Clean.. and Build Project to generate the binary file. In this case, the .txt file that is generated can be found under the “Debug” folder of the project. The file can be located under the folder path: ….Project Folder\Debug\


Using CCS v6.x

1. Open "Project" -> "Properties" -> "Build" -> "MSP430 Hex Utility", check the "Enable MSP430 Hex Utility" option.

Ccs6 gen ti txt ena msp430 hex util.png

2. After enabling the MSP430 Hex Utility, go to Open "Project" -> "Properties" -> "Build" -> "MSP430 Hex Utility" -> "Output Format Options", choose "Output TI-TXT hex format (--ti_txt)" for "Output format".
NOTE: When generating an output file in Intel-hex format, in addition to selecting this format one also needs to set the "Specify data ordering (endianess) (--order, order)" parameter to "MS", and the "Specify rom width (--romwidth, -romwidth)" to "16" in the hex utility's "General Options" configuration screen.

Ccs6 gen ti txt select out format.png

Download Binary files onto the MSP430 device

Hardware Setup

Shown below is the hardware set-up required to load the binary files onto the MSP430 device

HW.jpg


Software Setup

  1. Download the free PC GUI tool from Elprotronic (MSP430 3rd party tools manufacturer). The tool can be downloaded from the following link: Download Now. For downloading the latest tool version, visit www.elprotronic.com/download.html and look for FET-Pro430 Lite Software
  2. The Lite version of the Elprotronic tool supports the following binary file formats:
    Elp formats.jpg
  3. Open the PC GUI and select appropriate micro-controller group and device
  4. Select the binary file that needs to be downloaded onto the device using “Open Code File ->” button.
    ELP 1.jpg
  5. Pressing the AutoProg button on the GUI would download the binary file onto the device.

Note: To change between JTAG and SBW options in the GUI tool, open Setup -> Connection/Device Reset and select between JTAG (4 wires) or Spy Bi Wire (2 wires) options in the Target's Connection/Reset Options window.