Pm And Dm Compiler Support For Standard C Library Functions; Placement Support Keyword (Section) - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

The following code segment demonstrates how you can redefine the mem-
ory space specifications by redefining the macros
/* Dual Memory Support Keywords & Macros */
#define SPACE1 pm
#define SPACE2 dm
char pm * foo (char dm *)
char pm *x;
char dm y;
x = foo(&y);

PM and DM Compiler Support for Standard C Library Functions

There are a number of functions defined in the standard C library that
take pointer input parameter types. These functions, which include for
example
strlen()
to program memory (PM) or data memory (DM). The different imple-
mentations are called automatically by the compiler because it has specific
in-built knowledge about the standard C functions that require pointer
parameters. The support requires that the normal standard header file, for
example
string.h
and DM variants. The default library function variants are DM should the
include file not be used.

Placement Support Keyword (section)

The
keyword directs the compiler to place an object or function
section
in an assembly
file. You name the assembly
parameter. If you do not specify a
declaration, the compiler uses a default
the linker must also be updated to support the additional named sections.
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
char SPACE1 *x;
char SPACE2 y;
x = foo(&y);
, are implemented differently when the pointer input is
, is included prior to use of the function requiring PM
, in the compiler's intermediate assembly output
.SECTION
.SECTION
SPACE1
char SPACE1 * foo (char SPACE2 *)
with
section()
for an object or function
section()
. The .
section
Compiler
and
.
SPACE2
's string literal
file supplied to
LDF
1-83

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents