TMS320C28x Assembly Language
Tools
v17.3.0.STS User's Guide
SPRU513M - REVISED MARCH 2017
Read This First
About This Manual
The TMS320C28x 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 TMS320C28x™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 TMS320C28x 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 TMS320C28x C/C++ compiler. It also provides hex utility examples. 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.).
- 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:
- 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:
- 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.
- Some directives can have a varying number of parameters. For example, the .byte directive can have multiple parameters. This syntax is shown as [, ..., parameter].
Here is a sample of C code:
#include <stdio.h> main()
{ printf("hello world\n");
}
cl2000 [options] [filenames] [--run_linker [link_options] [object files]] |
cl2000 --run_linker {--rom_model | --ram_model} filenames | |
[--output_file=name.out] --library=libraryname |
symbol .usect "section name", size in bytes[, alignment] |
.byteparameter1[, ... , parametern] |
- The TMS320C2800 core is referred to as TMS320C28x or C28x.
- 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:
- Texas Instruments Wiki: Compiler topics
- Texas Instruments E2E Community: Compiler forum
You can use the following books to supplement this user's guide:
-
SPRU514
TMS320C28x Optimizing C/C++ Compiler User's Guide. Describes the TMS320C28x C/C++ compiler. This C/C++ compiler accepts ANSI standard C/C++ source code and produces assembly language source code for the TMS320C28x devices.
-
SPRU127
TMS320C2xx User's Guide. Discusses the hardware aspects of the TMS320C2xx 16-bit fixed-point digital signal processors. It describes the architecture, the instruction set, and the on-chip peripherals.
-
SPRU430
TMS320C28x DSP CPU and Instruction Set Reference Guide. Describes the central processing unit (CPU) and the assembly language instructions of the TMS320C28x fixed-point CPU. It also describes emulation features available on these devices.
-
SPRU566
TMS320x28xx, 28xxx DSP Peripherals Reference Guide. Describes all the peripherals available for TMS320x28xx and TMS320x28xxx devices.
-
SPRUEO2
TMS320C28x Floating Point Unit and Instruction Set Reference Guide. Describes the CPU architecture, pipeline, instruction set, and interrupts of the C28x floating-point DSP.
-
SPRAAO8
Common Object File Format Application Report. Provides supplementary information on the internal format of COFF object files. Much of this information pertains to the symbolic debugging information that is produced by the C compiler.
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.