Prototyping Code Using Linker Command Files; Pp-Relative Addressing - Texas Instruments TMS320C80 User Manual

1995 digital signal processing products
Table of Contents

Advertisement

Prototyping Code Using Linker Command Files

3.4 Prototyping Code Using Linker Command Files
Linker command files allow you to put linking information in a file;
these files are useful because they allow you to use MEMORY
and SECTIONS directives to customize memory allocation for
your application. In this case, you can specify the location of the
parameter and data RAMs for the processor you are using to
execute your software. By using linker command files to develop
code for the 'C82 on the 'C80, you do not need to modify your as-
sembly or C code.
This method of emulating the 'C82 on a 'C80 requires that you
use different linker command files for the 'C80 and 'C82. Thus,
although the code is not binary-compatible, it is made compatible
through linking.
The basic procedure for using this method requires three steps:
1) Write your code, taking into account the considerations dis-
2) Link your code with a linker command file for the 'C80 and
3) Link your code with a linker command file for the 'C82 when
The software tools for the 'C80 and 'C82 come with template link-
er command files that you will need to modify according to the re-
quirements of your program.
For a list of linker directives, see Section 13.4, Linker Command
Files , in the TMS320C80 (MVP) Code Generation Tools User's
Guide .

3.4.1 PP-Relative Addressing

One linker command file can be used for linking code so that it
can be executed by all PPs in each device. This is possible be-
cause PP addresses can be specified using offsets.
In order to make this approach work on the PPs, your code must
use PP-relative addressing to access memory.
PP-relative addressing allows the base address for a PP's local
data RAM 0 or local parameter RAM to be used for address gen-
eration. PP-relative addressing is specified with the keyword
dba, pba, or xba, where dba is the base address beginning at
data RAM 0, pba is the base address beginning at the parameter
RAM, and xba is determined to be either dba or pba by the linker.
A typical line of PP-relative code has the following format:
d6 = *(xba+BUF)
3-6
TMS320C80 to TMS320C82 Software Compatibility User's Guide
cussed in this chapter.
then test your code on the 'C80.
you are ready to use that device.
; read a word from memory at BUF

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c82

Table of Contents