MSP430 Assembly Language Tools v17.6.0.STS User's Guide
SLAU131P - REVISED JUNE 2017

Read This First

About This Manual

The MSP430 Assembly Language Tools User's Guide explains how to use the following Texas Instruments Code Generation object file tools:

  • Assembler
  • Archiver
  • Linker
  • Library information archiver
  • Absolute lister
  • Cross-reference lister
  • Disassembler
  • Object file display utility
  • Name utility
  • Strip utility
  • Hex conversion utility

How to Use This Manual

This book helps you learn how to use the Texas Instruments object file and assembly language tools designed specifically for the MSP430™16-bit devices. This book consists of four parts:

  • Introductory information, consisting of Section 1 through Section 3, gives you an overview of the object file and assembly language development tools. Section 2, in particular, explains object modules and how they can be managed to help your MSP430 application load and run. It is highly recommended that developers become familiar with what object modules are and how they are used before using the assembler and linker.
  • Assembler description, consisting of Section 4 through Section 6, contains detailed information about using the assembler. Section 4 and Section 5 explain how to invoke the assembler and discuss source statement format, valid constants and expressions, assembler output, and assembler directives. Section 6 focuses on the macro language.
  • Linker and other object file tools description, consisting of Section 7 through Section 12, describes in detail each of the tools provided with the assembler to help you create executable object files. Section 7 provides details about using the archiver to create object libraries. Section 8 explains how to invoke the linker, how the linker operates, and how to use linker directives. Section 11 provides a brief overview of some of the object file utilities that can be useful in examining the content of object files as well as removing symbol and debug information to reduce the size of a given object file. Section 12 explains how to use the hex conversion utility.
  • Additional Reference material, consisting of Section A through Section A, provides supplementary information including symbolic debugging directives used by the MSP430 C/C++ compiler. A description of the XML link information file and a glossary are also provided.

Notational Conventions

This document uses the following conventions:

  • Program listings, program examples, and interactive displays are shown in a special typeface. Interactive displays use a bold version of the special typeface to distinguish commands that you enter from items that the system displays (such as prompts, command output, error messages, etc.).
  • Here is a sample of C code:

    #include <stdio.h> main() { printf("hello world\n"); }
  • In syntax descriptions, the instruction, command, or directive is in a bold typeface and parameters are in an italic typeface. Portions of a syntax that are in bold should be entered as shown; portions of a syntax that are in italics describe the type of information that should be entered.
  • Square brackets ( [ and ] ) identify an optional parameter. If you use an optional parameter, you specify the information within the brackets. Unless the square brackets are in the bold typeface, do not enter the brackets themselves. The following is an example of a command that has an optional parameter:
  • cl430 [options] [filenames] [--run_linker [link_options] [object files]]
  • Braces ( { and } ) indicate that you must choose one of the parameters within the braces; you do not enter the braces themselves. This is an example of a command with braces that are not included in the actual syntax but indicate that you must specify either the --rom_model or --ram_model option:
  • cl430 --run_linker  {--rom_model | --ram_model} filenames [--output_file=name.out]
    --library=libraryname
  • In assembler syntax statements, The leftmost character position, column 1, is reserved for the first character of a label or symbol. If the label or symbol is optional, it is usually not shown. If it is a required parameter, it is shown starting against the left margin of the box, as in the example below. No instruction, command, directive, or parameter, other than a symbol or label, can begin in column 1.
  • symbol .usect "section name", size in bytes[, alignment]
  • Some directives can have a varying number of parameters. For example, the .byte directive can have multiple parameters. This syntax is shown as [, ..., parameter].
  • .byteparameter1[, ... , parametern]
  • Other symbols and abbreviations used throughout this document include the following:
Symbol Definition
B,b Suffix — binary integer
H, h Suffix — hexadecimal integer
LSB Least significant bit
MSB Most significant bit
0x Prefix — hexadecimal integer
Q, q Suffix — octal integer

Related Documentation From Texas Instruments

See the following resources for further information about the TI Code Generation Tools:

You can use the following books to supplement this user's guide:

    SLAU132 MSP430 Optimizing C/C++ Compiler User's Guide. Describes the MSP430 C/C++ compiler. This C/C++ compiler accepts ANSI standard C/C++ source code and produces assembly language source code for the MSP430 devices.
    SLAU012 MSP430x3xx Family User's Guide. Describes the MSP430x3xx™ CPU architecture, instruction set, pipeline, and interrupts for these ultra-low power microcontrollers.
    SLAU049 MSP430x1xx Family User's Guide. Describes the MSP430x1xx™ CPU architecture, instruction set, pipeline, and interrupts for these ultra-low power microcontrollers.
    SLAU056 MSP430x4xx Family User's Guide. Describes the MSP430x4xx™ CPU architecture, instruction set, pipeline, and interrupts for these ultra-low power microcontrollers.
    SLAU134 MSP430FE42x ESP30CE1 Peripheral Module User's Guide. Describes common peripherals available on the MSP430FE42x and ESP430CE1 ultra-low power microcontrollers. This book includes information on the setup, operation, and registers of the ESP430CE1.
    SLAU144 MSP430x2xx Family User's Guide. Describes the MSP430x2xx™ CPU architecture, instruction set, pipeline, and interrupts for these ultra-low power microcontrollers.
    SLAU208 MSP430x5xx Family User's Guide. Describes the MSP430x5xx™ CPU architecture, instruction set, pipeline, and interrupts for these ultra-low power microcontrollers.
    SLAA534 MSP430 Embedded Application Binary Interface. Provides a specification for the ELF-based Embedded Application Binary Interface (EABI) for the MSP430 family of processors from Texas Instruments. The EABI defines the low-level interface between programs, program components, and the execution environment, including the operating system if one is present.

Trademarks

MSP430 is a trademark of Texas Instruments.

All other trademarks are the property of their respective owners.

Back to Top

Submit Documentation Feedback

Copyright© 2017, Texas Instruments Incorporated. An IMPORTANT NOTICE for this document addresses availability, warranty, changes, use in safety-critical applications, intellectual property matters and other important disclaimers.