Texas Instruments TMS320 User Manual page 42

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

Configuring DSP/BIOS Applications Statically
2.3.3
Referencing Statically Created DSP/BIOS Objects
2.3.3.1 Small and Large Model Issues for C6000
2-12
❏ If you want to use standard code editing tools. For example, to merge
changes from multiple developers, compare application configurations,
and cut and paste between program configurations.
❏ If you want to use UNIX.
DSP/BIOS configurations should not be confused with other items used for
configuration within Code Composer Studio.
Statically-created objects that you reference in a program need to be
declared as extern variables outside all function bodies. For example, the
following declarations make the PIP_Obj object visible in all functions that
follow its definition in the program.
extern far
PIP_Obj inputObj;
or
extern
PIP_Obj inputObj;
The configuration generates a file that contains these declarations. The file
has a name of the form *cfg.h, where * is the name of your program. This file
can be #included in C files that reference DSP/BIOS objects.
Although DSP/BIOS itself is compiled using the small model, you can compile
DSP/BIOS applications using either the C6000 compiler's small model or any
variation of the large model. (See the TMS320C6000 Optimizing Compiler
User's Guide .) In fact, you can mix compilation models within the application
code provided all global data that is accessed by using a displacement
relative to B14 is placed no more than 32K bytes away from the beginning of
the .bss section.
DSP/BIOS uses the .bss section to store global data. However, objects
configured statically are not placed in the .bss section. This maximizes your
flexibility in the placement of application data. For example, the frequently
accessed .bss can be placed in on-device memory while larger, less
frequently accessed objects can be stored in external memory.
The small model makes assumptions about the placement of global data in
order to reduce the number of instruction cycles. If you are using the small
model (the default compilation mode) to optimize global data access, your
code can be modified to make sure that it references statically-created
objects correctly.
/* C6000 devices
/* C5000 and C2800 devices */
*/

Advertisement

Table of Contents
loading

Table of Contents