ANALOG DEVICES EE-202 Service Manual

Engineer-to-Engineer Note EE-202
a
Technical notes on using Analog Devices DSPs, processors and development tools
Contact our technical support at processor.support@analog.com and dsptools.support@analog.com Or vi sit our o n-li ne r esou rces htt p:/ /www.analog.com/ee-notes and http://www.analog.com/processors
Using the Expert Linker for Multiprocessor LDFs
Contributed by Maikel Kokaly-Bannourah Rev 3 – May 9, 2005

Introduction

This EE-Note explains the use of the Expert Linker (EL) for creating Linker Description Files (LDFs) for multiprocessor (MP) systems.
Although, this concept applies to VisualDSP++® for all SHARC® processor families (ADSP­21x6x and ADSP-TSxxx), the examples shown throughout this document are for the ADSP­TS101S TigerSHARC® processor.
The example code used for this note is based on
Introduction to TigerSHARC Multiprocessor Systems Using VisualDSP++ (EE-167)
[4]
and it was written using VisualDSP++ for TigerSHARC Processors, release 4.0.

Expert Linker Overview

general description on the LDF, and EE-167 (for an explanation on the different multiprocessor linker commands).

Expert Linker LDF Wizard

The Expert Linker (EL) wizard is used to generate an LDF for new VisualDSP++ projects. However, the Expert Linker can also be used to view or modify an already existing LDF.
Open the project (MP TS101.dpj) attached to this note. The source code comes with no LDF, which will be created, step-by-step, through this note.
Please note that an MPTS101_orig_ldf.txt containing an already created LDF file is available as a reference.
The Expert Linker is a graphical tool that simplifies complex tasks such as memory map manipulation, code and data placement, overlay and shared memory creation, and C stack/heap
Let’s now get started with the creation of the LDF. First of all, to invoke the Expert Linker wizard, choose from the pull-down menu as shown in Figure 1.
usage. This tool provides a visualization capability enabling new users to take immediate advantage of the powerful LDF format flexibility in a very user-friendly way.
This note assumes a basic understanding of the Linker Description File as well as the way the linker utility ( information on this utility as well as the LDF, please use the VisualDSP++ on-line help. Also,
linker.exe) operates. For detailed
Figure 1. Invoking the Expert Linker Wizard
refer to the VisualDSP++ 4.0 Linker and Utilities Manual Linker Description Files (LDFs) (EE-69)
Copyright 2005, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer product design or the use or application of customers’ products or for any infringements of patents or rights of others which may result from Analog Devices assistance. All trademarks and logos are property of their respective holders. Information furnished by Analog Devices Applications and Development Tools Engineers is believed to be accurate and reliable, however no responsibility is assumed by Analog Devices regarding technical accuracy and topicality of the content provided in Analog Devices Engineer-to-Engineer Notes.
[2]
and Understanding and Using
[3]
for a
Figure 2 shows the start up window when first
invoking the EL wizard.
a
Figure 2. Expert Linker Wizard Start-up Window
Click Next.

Project type

At this stage, the user needs to specify the project information corresponding to the project type for which the LDF is being generated. As shown in
Figure 3, the type can be C, C++, Assembly or
VDK. Note that in case a mix of assembly and C files
or any other combination is used, the most abstract programming language should be selected. For example, for a project with C and assembly files, a C LDF should be selected. Similarly, for a C++ and C project the C++ LDF should be selected.
In this particular example, the files source code is assembly, and therefore the selected project type is also
The LDF name is specified here as well, which by default uses the same as the project name.
Assembly.
Figure 3. Project Type
Click Next.

Selecting an MP LDF

By default, the LDF is for single processors. Choose the Multiprocessor box for MP support (Figure 4).
Figure 4. Multiprocessor LDF selection
Note that if an LDF file already exists, the user will be prompted whether to replace the existing file.
Using the Expert Linker for Multiprocessor LDFs (EE-202) Page 2 of 10
Determining the Number of Processors and MP Memory Offset Values
Right click on the Processor Properties box to add the desired number of processors to be included in the LDF. For this particular example, a dual processor system is selected. Therefore, a second processor (P1) needs to be added to the list.
a
Figure 5. Processors and MMS Offset
As it can be seen in the Processor window (Figure 5), the multiprocessor memory space (MMS) offset value is automatically added in by the EL. This helps the user to avoid having to worry about specific MP addresses and memory offsets, making the use of MP commands much easier. This is an automatic replacement for the linker command MPMEMORY used in the LDF source file.

Linking Processors Executables

In the Output File box, the user can specify the name of the executable file for each processor in the system. By default, the EL selects the same name for the
.dxe file as for the processor name.
In this case, P0.dxe and P1.dxe are selected as the names for the DSP executable files and are placed in the
Debug folder within the project
folder.
Figure 6. Executables to Link Against
As it would be done in the LDF source file with the LINK_AGAINST command, the EL allows the user to resolve symbols declared within MP space. This is done by simply specifying for each processor to which DSP to link against.
In this example, symbols referenced in P0, but declared in P1 can be resolved by the linker by adding $COMMAND_LINE_OUTPUT_DIRECTORY/
P1.dxe
to the Executable to Link Against
box (Figure 6) for P0. Similarly, $COMMAND_LINE_OUTPUT_DIRECTORY/
P0.dxe
is added for P1. In cases where more than one .dxe is added to this box, commas or spaces can be used as separators.
Now that an MP LDF has been selected, the processors have been added to the list, and the relevant linker commands have been specified, the LDF is ready for completion.
Next.
Click Note that in the case where shared external
memory is used ( need to be added to the
shared.sm), this would also
link against command
box. This is automatically handled by the EL and will be explained later on.
Using the Expert Linker for Multiprocessor LDFs (EE-202) Page 3 of 10
Loading...
+ 7 hidden pages