TMS320C28x Assembly Language Tools v17.3.0.STS User's Guide
SPRU513M - REVISED MARCH 2017

Absolute Lister Description

The TMS320C28x absolute lister is a debugging tool that accepts linked object files as input and creates .abs files as output. These .abs files can be assembled to produce a listing that shows the absolute addresses of object code. Manually, this could be a tedious process requiring many operations; however, the absolute lister utility performs these operations automatically.

Producing an Absolute Listing

Figure 9-1 illustrates the steps required to produce an absolute listing.

Figure 9-1 Absolute Lister Development Flow absoflow_tdz076.gif

Invoking the Absolute Lister

The syntax for invoking the absolute lister is:

abs2000 [-options] input file
abs2000 is the command that invokes the absolute lister.
options identifies the absolute lister options that you want to use. Options are not case sensitive and can appear anywhere on the command line following the command. Precede each option with a hyphen (-). The absolute lister options are as follows:
-e enables you to change the default naming conventions for filename extensions on assembly files, C source files, and C header files. The valid options are:

  • ea [.]asmext for assembly files (default is .asm)
  • ec [.]cext for C source files (default is .c)
  • eh [.]hext for C header files (default is .h)
  • ep [.]pext for CPP source files (default is cpp)
The . in the extensions and the space between the option and the extension are optional.
-fs specifies a directory for the output files. For example, to place the .abs file generated by the absolute lister in C:\ABSDIR use this command: abs2000 -fs C:\ABSDIR filename.out

If the -fs option is not specified, the absolute lister generates the .abs files in the current directory.

-q (quiet) suppresses the banner and all progress information.
input file names the linked object file. If you do not supply an extension, the absolute lister assumes that the input file has the default extension .out. If you do not supply an input filename when you invoke the absolute lister, the absolute lister prompts you for one.

The absolute lister produces an output file for each file that was linked. These files are named with the input filenames and an extension of .abs. Header files, however, do not generate a corresponding .abs file.

Assemble these files with the --absolute_listing assembler option as follows to create the absolute listing:

cl2000 --absolute_listing filename .abs

The -e options affect both the interpretation of filenames on the command line and the names of the output files. They should always precede any filename on the command line.

The -e options are useful when the linked object file was created from C files compiled with the debugging option (--symdebug:dwarf compiler option). When the debugging option is set, the resulting linked object file contains the name of the source files used to build it. In this case, the absolute lister does not generate a corresponding .abs file for the C header files. Also, the .abs file corresponding to a C source file uses the assembly file generated from the C source file rather than the C source file itself.

For example, suppose the C source file hello.csr is compiled with the debugging option set; the debugging option generates the assembly file hello.s. The hello.csr file includes hello.hsr. Assuming the executable file created is called hello.out, the following command generates the proper .abs file:

abs2000 -ea s -ec csr -eh hsr hello.out

An .abs file is not created for hello.hsr (the header file), and hello.abs includes the assembly file hello.s, not the C source file hello.csr.

Absolute Lister Example

This example uses three source files. The files module1.asm and module2.asm both include the file globals.def.

module1.asm

.text array .usect ".ebss",100 dflag .usect ".ebss", 2 .copy globals.def MOV ACC, #offset MOV ACC, #dflag

module2.asm

offset .usect ".ebss", 2 .copy globals.def MOV ACC, #offset MOV ACC, #array

globals.def

.global dflag .global array .global offset

The following steps create absolute listings for the files module1.asm and module2.asm:

Step 1: First, assemble module1.asm and module2.asm: cl2000 module1
cl2000 module2

This creates two object files called module1.obj and module2.obj.

Step 2: Next, link module1.obj and module2.obj using the following linker command file, called bttest.cmd:
--output_file=bttest.out --map_file=bttest.map module1.obj module2.obj MEMORY { PAGE 0: ROM: origin=2000h length=2000h PAGE 1: RAM: origin=8000h length=8000h } SECTIONS { .data: >RAM .text: >ROM .ebss: >RAM }
Invoke the linker: cl2000 --run_linker bttest.cmd

This command creates an executable object file called bttest.out; use this file as input for the absolute lister.

Step 3: Now, invoke the absolute lister: abs2000 bttest.out

This command creates two files called module1.abs and module2.abs:



module1.abs:

.nolist array .setsym 000008000h dflag .setsym 000008064h offset .setsym 000008066h .data .setsym 000008000h edata .setsym 000008000h .text .setsym 000002000h etext .setsym 000002008h .usect .setsym 000008000h end .setsym 000008068h .setsect ".text",000002000h .setsect ".data",000008000h .setsect ".ebss",00008000h .list .text .copy "module1.asm"
  module2.abs:
.nolist array .setsym 000008000h dflag .setsym 000008064h offset .setsym 000008066h .data .setsym 000008000h edata .setsym 000008000h .text .setsym 000002000h etext .setsym 000002008h .usect .setsym 000008000h end .setsym 000008068h .setsect ".text",000002004h .setsect ".data",000008000h .setsect ".ebss",00008066h .list .text .copy "module2.asm"
  These files contain the following information that the assembler needs for Step 4:
  • They contain .setsym directives, which equate values to global symbols. Both files contain global equates for the symbol dflag. The symbol dflag was defined in the file globals.def, which was included in module1.asm and module2.asm.
  • They contain .setsect directives, which define the absolute addresses for sections.
  • They contain .copy directives, which defines the assembly language source file to include.

The .setsym and .setsect directives are useful only for creating absolute listings, not normal assembly.

Step 4: Finally, assemble the .abs files created by the absolute lister (remember that you must use the --absolute_listing option when you invoke the assembler): cl2000 --absolute_listing module1.abs
cl2000 --absolute_listing module2.abs

This command sequence creates two listing files called module1.lst and module2.lst; no object code is produced. These listing files are similar to normal listing files; however, the addresses shown are absolute addresses.

The absolute listing files created are module1.lst (see Example 9-1 ) and module2.lst (see Example 9-2).

Example 9-1 module1.lst

module1.abs PAGE 1 15 002000 .text 16 .copy "module1.asm" 1 002000 .text 2 008000 array .usect ".ebss",100 3 008064 dflag .usect ".ebss",2 4 .copy globals.def 1 .global dflag 2 .global array 3 .global offset 5 002000 FF20! MOV ACC,#offset 002001 8066 6 002002 FF20- MOV ACC,#dflag 002003 8064

Example 9-2 module2.lst

module2.abs PAGE 1 15 002004 .text 16 .copy "module2.asm" 1 008066 offset .usect ".ebss",2 2 .copy globals.def 1 .global dflag 2 .global array 3 .global offset 3 002004 FF20- MOV ACC,#offset 002005 8066 4 002006 FF20! MOV ACC,#array 002007 8000
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.