Analog Devices, Inc. reserves the right to change this product without
prior notice. Information furnished by Analog Devices is believed to be
accurate and reliable. However, no responsibility is assumed by Analog
Devices for its use; nor for any infringement of patents or other rights of
third parties which may result from its use. No license is granted by implication or otherwise under the patent rights of Analog Devices, Inc.
Trademark and Service Mark Notice
The Analog Devices logo, VisualDSP++, the VisualDSP++ logo, Blackfin,
and the Blackfin logo are registered trademarks of Analog Devices, Inc.
All other brand and product names are trademarks or service marks of
their respective owners.
CONTENTS
PREFACE
Purpose of This Manual .................................................................. xv
Intended Audience ......................................................................... xvi
Manual Contents ........................................................................... xvi
What’s New in This Manual .......................................................... xvii
Technical or Customer Support .................................................... xviii
Supported Processors ...................................................................... xix
Product Information ....................................................................... xx
MyAnalog.com .......................................................................... xx
DSP Product Information .......................................................... xx
Related Documents .................................................................. xxi
Linking for a Single-Processor System ........................................... C-2
Linking Large Uninitialized or Zero-initialized Variables ............... C-4
VisualDSP++ 3.5 Linker and Utilities Manual xiii
for 16-Bit Processors
Linking for Assembly Source File .................................................. C-6
Linking for C Source File – Example 1 .......................................... C-8
Linking for Complex C Source File – Example 2 ......................... C-11
Linking for Overlay Memory ...................................................... C-17
LDF PROGRAMMING EXAMPLES FOR ADSP-21XX DSPS
Linking for a Single-Processor ADSP-219x System ....................... D-3
Linking Large Uninitialized or Zero-initialized Variables ............... D-5
Linking an Assembly Source File .................................................. D-7
Linking a Simple C-Based Source File .......................................... D-9
Linking Overlay Memory for an ADSP-2191 System .................. D-16
Linking an ADSP-219x MP System With Shared Memory .......... D-19
Overlays Used With ADSP-218x DSPs ...................................... D-23
INDEX
xivVisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
PREFACE
Thank you for purchasing Analog Devices development software for digital signal processors (DSPs).
Purpose of This Manual
The VisualDSP++ 3.5 Linker and Utilities Manual for 16-Bit Processors
contains information about the linker and utilities programs for 16-bit
fixed-point Blackfin® processors and ADSP-21xx DSPs.
The Blackfin processors are 16-bit fixed-point embedded processors that
support a Media Instruction Set Computing (MISC) architecture. This
architecture is the natural merging of RISC, media functions, and digital
signal processing (DSP) characteristics towards delivering signal processing performance in a microprocessor-like environment.
The ADSP-218x and ADSP-219x DSPs are low-cost 16-bit fixed-point
DSPs for use in computing, communications, and consumer applications.
This manual provides information on the linking process and describes
the syntax for the linker’s command language—a scripting language that
the linker reads from the linker description file. The manual leads you
through using the linker, archiver, and loader to produce DSP programs
and provides reference information on the file utility software.
VisualDSP++ 3.5 Linker and Utilities Manual xv
for 16-Bit Processors
Intended Audience
Intended Audience
The manual is primarily intended for programmers who are familiar with
Analog Devices embedded processors and DSPs. This manual assumes
that the audience has a working knowledge of the appropriate device
architecture and instruction set. Programmers who are unfamiliar with
Analog Devices DSPs can use this manual but should supplement it with
other texts, such as Hardware Reference and Instruction Set Reference manuals, that describe your target architecture.
Manual Contents
The manual contains:
•Chapter 1, “Introduction”
This chapter provides an overview of the linker and utilities.
•Chapter 2, “Linker”
This chapter describes how to combine object files into reusable
library files to link routines referenced by other object files.
•Chapter 3, “Linker Description File”
This chapter describes how to write an .LDF file to define the
target.
•Chapter 4, “Expert Linker”
This chapter describes Expert Linker, which is an interactive
graphical tool to set up and map DSP memory.
•Chapter 5, “Memory Overlays and Advanced LDF Commands”
This chapter describes how overlays and advanced LDF commands
are used for memory management.
xviVisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
Preface
•Chapter 6 “Archiver”
This chapter describes the elfar archiver utility used to combine
object files into library files, which serve as reusable resources for
code development.
•Appendix A, “File Formats”
This appendix lists and describes the file formats that the development tools use as inputs or produce as outputs.
•Appendix B, “Utilities”
This appendix describes the utilities that provide legacy and file
conversion support.
•Appendix C, “LDF Programming Examples for Blackfin
Processors”
This appendix provides code examples of .LDF files used with
Blackfin processors.
• Appendix D, “LDF Programming Examples for ADSP-21xx
DSPs”
This appendix provides code examples of .LDF files used with
ADSP-21xx DSPs.
What’s New in This Manual
This is a new manual that documents support for 16-bit fixed-point
Blackfin processors and ADSP-21xx DSPs.
This manual now combines linker-related information for all ADI 16-bit
fixed-point processors. The manual provides information for Blackfin
processors, ADSP-218x DSPs and ADSP-219x DSPs.
Loader/splitter information is now available in separate Loader manuals
for appropriate target processor families.
Refer to VisualDSP++ 3.5 Product Bulletin for 16-Bit Processors for information on all new and updated features and other release information.
VisualDSP++ 3.5 Linker and Utilities Manual xvii
for 16-Bit Processors
Technical or Customer Support
Technical or Customer Support
You can reach DSP Tools Support in the following ways:
•Contact your ADI local sales office or authorized distributor
•Send questions by mail to:
Analog Devices, Inc.
One Technology Way
P.O. Box 9106
Norwood, MA 02062-9106
USA
xviiiVisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
Preface
Supported Processors
Blackfin Processors
The name “Blackfin” refers to a family of Analog Devices 16-bit,
fixed-point embedded processors. VisualDSP++ currently supports the
following processors:
•ADSP-BF532 (formerly ADSP-21532)
•ADSP-BF535 (formerly ADSP-21535)
•ADSP-BF531
•ADSP-BF533
•ADSP-BF561
•AD6532
•AD90747
The ADSP-BF531 and ADSP-BF533 processors are memory variants of
the ADSP-BF532 processor as well as a dual-core ADSP-BF561 processor.
ADSP-218x and ADSP-219x DSPs
The name “ADSP-21xx” refers to two families of Analog Devices 16-bit,
fixed-point processors. VisualDSP++ currently supports the following
processors:
•ADSP-219x DSPs: ADSP-2191, ADSP-2192-12, ADSP-2195,
ADSP-2196, ADSP-21990, ADSP-21991, and ADSP-21992
VisualDSP++ 3.5 Linker and Utilities Manual xix
for 16-Bit Processors
Product Information
Product Information
You can obtain product information from the Analog Devices website,
from the product CD-ROM, or from the printed publications (manuals).
Analog Devices is online atwww.analog.com. Our website provides information about a broad range of products—analog integrated circuits,
amplifiers, converters, and digital signal processors.
MyAnalog.com
MyAnalog.com is a free feature of the Analog Devices website that allows
customization of a webpage to display only the latest information on
products you are interested in. You can also choose to receive weekly
e-mail notification containing updates to the webpages that meet your
interests. MyAnalog.com provides access to books, application notes, data
sheets, code examples, and more.
Registration:
Visit www.myanalog.com to sign up. Click Register to use MyAnalog.com.
Registration takes about five minutes and serves as means for you to select
the information you want to receive.
If you are already a registered user, simply log on. Your user name is your
e-mail address.
DSP Product Information
For information on digital signal processors, visit our website at
www.analog.com/dsp, which provides access to technical publications, data
sheets, application notes, product overviews, and product announcements.
You may also obtain additional information about Analog Devices and its
products in any of the following ways.
xxVisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
Preface
•Email questions or requests for information to
dsp.support@analog.com
•Fax questions or requests for information to
1-781-461-3010 (North America)
089/76 903-557 (Europe)
•Access the Digital Signal Processing Division’s FTP website at
ftp ftp.analog.com or ftp 137.71.23.21
ftp://ftp.analog.com
Related Documents
For information on product related development software, see the following publications:
VisualDSP++ 3.5 Getting Started Guide for 16-Bit Processors
VisualDSP++ 3.5 User’s Guide for 16-Bit Processors
VisualDSP++ 3.5 Assembler and Preprocessor Manual for Blackfin Processors
VisualDSP++ 3.5 C Compiler and Library Manual for Blackfin Processors
VisualDSP++ 3.5 Product Bulletin for 16-Bit Processors
VisualDSP++ 3.5 Assembler and Preprocessor Manual for ADSP-21xx DSPs
VisualDSP++ 3.5 C Compiler and Library Manual for ADSP-218x DSPs
VisualDSP++ 3.5 C/C++ Compiler and Library Manual for ADSP-219x DSPs
VisualDSP++ 3.5 Loader Manual for 16-Bit Processors
For hardware information, refer to your DSP’s Hardware Reference manual
and datasheet.
VisualDSP++ 3.5 Linker and Utilities Manual xxi
for 16-Bit Processors
Product Information
Online Technical Documentation
Online documentation comprises VisualDSP++ Help system and tools
manuals, Dinkum Abridged C++ library and FlexLM network license
manager software documentation. You can easily search across the entire
VisualDSP++ documentation set for any topic of interest. For easy printing, supplementary
A description of each documentation file type is as follows.
File Description
.CHMHelp system files and VisualDSP++ tools manuals.
.HTMLDinkum Abridged C++ library and FlexLM network license manager software doc-
umentation. Viewing and printing the
net Explorer 4.0 (or higher).
.PDFVisualDSP++ tools manuals in Portable Documentation Format, one .PDF file for
each manual. Viewing and printing the
Adobe Acrobat Reader (4.0 or higher).
.PDF files for the tools manuals are also provided.
.HTML files require a browser, such as Inter-
.PDF files require a PDF reader, such as
If documentation is not installed on your system as part of the software
installation, you can add it from the VisualDSP++ CD-ROM at any time.
Access the online documentation from the VisualDSP++ environment,
Windows® Explorer, or Analog Devices website.
From VisualDSP++
•Access VisualDSP++ online Help from the Help menu’s Contents,
Search, and Index commands.
•Open online Help from context-sensitive user interface items (toolbar buttons, menu commands, and windows).
xxiiVisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
Preface
From Windows
In addition to any shortcuts you may have constructed, there are many
ways to open VisualDSP++ online Help or the supplementary documentation from Windows.
Help system files (.CHM files) are located in the Help folder, and .PDF files
are located in the Docs folder of your VisualDSP++ installation. The Docs
folder also contains the Dinkum Abridged C++ library and FlexLM network license manager software documentation.
Using Windows Explorer
•Double-click any file that is part of the VisualDSP++ documentation set.
•Double-click the vdsp-help.chm file, which is the master Help system, to access all the other .CHM files.
Using the Windows Start Button
•Access the VisualDSP++ online Help by clicking the Start button
and choosing Programs, Analog Devices, VisualDSP++, and
VisualDSP++ Documentation.
•Access the .PDF files by clicking the Start button and choosing
Programs, Analog Devices,, VisualDSP++, Documentation for
Printing, and the name of the book.
From the Web
To download the tools manuals, point your browser at
Select a DSP family and book title. Download archive (.ZIP) files, one for
each manual. Use any archive management software, such as WinZip, to
decompress downloaded files.
VisualDSP++ 3.5 Linker and Utilities Manual xxiii
for 16-Bit Processors
Product Information
Printed Manuals
For general questions regarding literature ordering, call the Literature
Center at 1-800-ANALOGD (1-800-262-5643) and follow the prompts.
VisualDSP++ Documentation Set
VisualDSP++ manuals may be purchased through Analog Devices Customer Service at 1-781-329-4700; ask for a Customer Service
representative. The manuals can be purchased only as a kit. For additional
information, call 1-603-883-2430.
If you do not have an account with Analog Devices, you will be referred to
Analog Devices distributors. To get information on our distributors, log
onto http://www.analog.com/salesdir/continent.asp.
Hardware Manuals
Hardware reference and instruction set reference manuals can be ordered
through the Literature Center or downloaded from the Analog Devices
website. The phone number is 1-800-ANALOGD (1-800-262-5643).
The manuals can be ordered by a title or by product number located on
the back cover of each manual.
Data Sheets
All data sheets can be downloaded from the Analog Devices website. As a
general rule, any data sheet with a letter suffix (L, M, N) can be obtained
from the Literature Center at 1-800-ANALOGD (1-800-262-5643) or
downloaded from the website. Data sheets without the suffix can be
downloaded from the website only—no hard copies are available. You can
ask for the data sheet by a part name or by product number.
xxivVisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
Preface
If you want to have a data sheet faxed to you, the fax number for that
service is 1-800-446-6212. Follow the prompts and a list of data sheet
code numbers will be faxed to you. Call the Literature Center first to find
out if requested data sheets are available.
Contacting DSP Publications
Please send your comments and recommendation on how to improve our
manuals and online Help. You can contact us @
dsp.techpubs@analog.com
Notation Conventions
The following table identifies and describes text conventions used in this
manual.
.
ExampleDescription
Close command
(File menu)
{this | that}Alternative required items in syntax descriptions appear within curly
[this | that]Optional items in syntax descriptions appear within brackets and sepa-
[this,…]Optional item lists in syntax descriptions appear within brackets
.SECTIONCommands, directives, keywords, and feature names are in text with
filenameNon-keyword placeholders appear in text with italic style format.
appear throughout this document.
Tex t in bold style indicates the location of an item within the
VisualDSP++ environment’s menu system. For example, the Close
command appears on the File menu.
brackets and separated by vertical bars; read the example as
that.
rated by vertical bars; read the example as an optional
delimited by commas and terminated with an ellipsis; read the example
as an optional comma-separated list of
letter gothic font.
this or
this or that.
this.
Additional conventions, which apply only to specific chapters, may
VisualDSP++ 3.5 Linker and Utilities Manual xxv
for 16-Bit Processors
Notation Conventions
ExampleDescription
A note, providing information of special interest or identifying a
related topic. In the online version of this book, the word Note appears
instead of this symbol.
A caution, providing information about critical design or programming issues that influence operation of a product. In the online version
of this book, the word Caution appears instead of this symbol.
xxviVisualDSP++ 3.5 Linker and Utilities Manual
for 16-Bit Processors
1INTRODUCTION
This chapter provides an overview of VisualDSP++ development tools and
their use in DSP project development process.
This chapter includes:
•“Software Development Flow” on page 1-2
Shows how linking, loading, and splitting fit into the DSP project
development process.
•“Compiling and Assembling” on page 1-3
Shows how compiling and assembling the code fits into the DSP
project development process.
•“Linking” on page 1-6
Shows how linking fits into the DSP project development process.
•“Loading and Splitting” on page 1-8
Shows how loading and splitting fit into the DSP project development process.
VisualDSP++ 3.5 Linker and Utilities Manual 1-1
for 16-Bit Processors
Software Development Flow
Software Development Flow
The majority of this manual describes linking, a critical stage in the
program development process for embedded applications.
The linker tool (linker.exe) consumes object and library files to produce
executable files, which can be loaded onto a simulator or target processor.
The linker also produces map files and other output that contain information used by the debugger. Debug information is embedded in the
executable file.
After running the linker, you test the output with a simulator or emulator.
Refer to the VisualDSP++ User’s Guide of your target processors and
online Help for information about debugging.
Finally, you process the debugged executable file(s) through the loader or
splitter to create output for use on the actual processor. The output file
may reside on another processor (host) or may be burned into a PROM.
Separate Loader Manual for 16-Bit Processors describes loader/splitter functionality for the target processors.
The processor software development flow can be split into three phases:
1. Compiling and Assembling – Input source files C (.C), C++ (.CPP),
and assembly (.ASM) yield object files (.DOJ)
2. Linking – Under the direction of the Linker Description File
.LDF), a linker command line, and VisualDSP++ Project Options
(
dialog box settings, the linker utility consumes object files (.DOJ)
to yield an executable (.DXE) file. If specified, shared memory (.SM)
and overlay (
3. Loading or splitting – The executable (.DXE), as well as shared
memory (.SM) and overlay (.OVL) files, are processed to yield
output file(s). For Blackfin processors, these are boot-loadable
(LDR) files or non-bootable PROM image files, which execute from
the processor’s external memory.
1-2VisualDSP++ 3.5 Linker and Utilities Manual
.OVL) files are also produced.
for 16-Bit Processors
Introduction
Compiling and Assembling
The process starts with source files written in C, C++, or assembly. The
compiler (or a code developer who writes assembly code) organizes each
distinct sequence of instructions or data into named sections, which
become the main components acted upon by the linker.
Inputs – C/C++ and Assembly Sources
The first step towards producing an executable file is to compile or assemble C, C++, or assembly source files into object files. The VisualDSP++
development software assigns a .DOJ extension to object files (Figure 1-1).
Source Files
(.C, .CPP, .ASM)
Compiler and
Assembler
Object Files
(.DOJ)
Figure 1-1. Compiling and Assembling
Object files produced by the compiler (via the assembler) and by the
assembler itself consist of input sections. Each input section contains
a particular type of compiled/assembled source code. For example, an
input section may consist of program opcodes or data, such as variables
of various widths.
Some input sections may contain information to enable source-level
debugging and other VisualDSP++ features. The linker maps each input
section (via a corresponding output section in the executable) to a memory segment, a contiguous range of memory addresses on the target system.
VisualDSP++ 3.5 Linker and Utilities Manual 1-3
for 16-Bit Processors
Compiling and Assembling
Each input section in the .LDF file requires a unique name, as specified in
the source code. Depending on whether the source is C, C++, or assembly,
different conventions are used to name an input section (see Chapter 3,
“Linker Description File”).
Input Section Directives in Assembly Code
A .SECTION directive defines a section in assembly source. This directive
must precede its code or data.
R0 = ABS R0;/* Take absolute value of input */
RTS;
_abc.end
In this example, the assembler places the global symbol/label _abs and the
code after the label into the input section Library_Code_Space, as it processes this file into object code.
Input Section Directives in C/C++ Source Files
Typically, C/C++ code does not specify an input section name, so the
compiler uses a default name. By default, the input section names program
(for code) and
are defined in
In C/C++ source files, you can use the optional section(“name”) C lan-
guage extension to define sections.
Example 1
While processing the following code, the compiler stores the temp variable
in the ext_data input section of the .DOJ file and also stores the code generated from
1-4VisualDSP++ 3.5 Linker and Utilities Manual
data1 (for data) are used. Additional input section names
.LDF files.
func1 in an input section named extern.
for 16-Bit Processors
Loading...
+ 308 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.