a
a
aa
Phone: (800) ANALOG-D, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com, FTP: ftp.analog.com, WEB: www.analog.com/dsp
Engineer To Engineer Note EE-117
Technical Notes on using Analog Devices’ DSP components and development tools
Preparations:
In-System-Programming (ISP)
of ADSP-2106x boot-images
into FLASH Memories
Before the user can start the on- targetprogramming sequence, a well- tested and valid user
application must be present. Please verify first
proper execution of your UAP source code before
programming it into the FLASH device.
Contributed by HS, last change 17-06-2000
Introduction:
Modern embedded DSP systems are these days
equipped with non-volatile memory devices such as
EEPROM or FLASH memories. This allows in an
easy way a later reprogramming with a new content
either to correct problems of the current firmware or
to enhance capabilities of the system.
All members of the ADSP-2106x SHARC family
can be booted from a single 8bit wide memory
device. The Engineer- to- Engineer Note EE-55
discusses the connection to and access of byteprogrammable FLASH memory components thoroughly. To understand and transfer the content of
this application note to the own system, the user
should be familiar with the content of EE-55.
This Engineer to Engineer Note will describe the
process of generating the required boot image for
the FLASH memory device using the v tools set and
how a first time start-up of the system can be
achieved.
Having passed this first requirement, the user
can continue with the process by generating the boot
image of the user application code (UAB). This is
supported through the ADSP-2106x loader pane in
the v Options dialog, as shown in figure 1.
Declarations and Naming:
Before heading on, it is necessary to define
common terms: the User Application Program (UAP)
is the software written by the user which will later
function on the embedded DSP system as
application software running as the main task or little
operating system. The boot image of this software is
called User Application Boot Image or UAB.
As the ADSP-2106x is the processor which will
program the FLASH device while it is mounted in the
system (in- system- programming or on- targetprogramming), it is necessary to generate a FLASH
Programming Module (FPM) around the UAB
performing this task. As this software is downloaded
to system using one of the available In- CircuitEmulators (EZ-ICE) provided by White Mountain
DSP, there is no need to generate a boot image of it.
Copyright 2000, 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 as sumed by Analog Devices
regarding the technical accuracy of the content provided in all Analog Devices’ Engineer-to-Engineer Notes.
Figure1: Loader Options Pane
As the ADSP-2106x will boot the user application
from FLASH memory, the PROM boot method must
be selected. Now, the user has several options for
his target system, which can be selected by the boot
kernel file, the multi- processor option check box, a
boot image memory offset and finally the type of the
output file. Please be aware that multiple DSP
evaluation systems from Analog Devices have
processor IDs set to “1” and not to “0”. This requires
the multiprocessor option, even for single DSP
systems. For further documentation of the switches,
please consult your v documentation.
The easiest processing of the User Application
Boot image is given when as output file format ASCII
is selected, although the pane defaults to hex. This
will generate a boot stream nicely sorted in 16bit
wide words, where following mapping as shown in
table 1 can be found:
16bit ASCII BOOT IMAGE arrangement
Byte 05 Byte 06 48bit [0x0506 0x0304 0x0102]
Byte 03 Byte 04
project contains a MAIN module, which picks the
data out of the internal memory of the ADSP-2106x
and exercises the FLASH server as discussed in EE-
55. The Linker Description File (LDF) reserves the
complete second memory block as 16bit wide data
area to hold the UAB file.
Byte 01 Byte 02
Byte 11 Byte 12 48bit [0x1112 0x0910 0x0708]
Byte 09 Byte 10
Byte 07 Byte 08
Byte 17 Byte 18 48bit [0x1718 0x1516 0x1314]
Table 1: Byte arrangement in output file
This arrangement of data comes very close to
the placement of the data in the EPROM, where only
the high and low byte must be swapped and
separated into single bytes. For an in depth
explanation of the boot record, please consult the
Engineer- to- Engineer Note called “Tips & Tricks on
the ADSP-2106x EPROM and HOST bootloader”
(EE-56) available from Analog Devices.
Embedding UAB into FPM:
Having generated the User Application Boot
image, the next step can be taken: including the UAB
file into the ADSP-2106x program, which will take
care of burning the data into the FLASH memory
device. As defined before, it is called FLASH
Programming Module (FPM).
Please note: depending on the ADSP-2106x
you use, certain size restrictions in terms of lines in
the UAB file apply. The following table (Table 2)
shows the number of lines in the image before
further action has to be applied. Furthermore, the
equivalent EPROM image size is given. This size
restriction is introduced due to the size of the internal
memory bank 1 of the ADSP-2106x.
Processor Max UAB lines EPROM size
ADSP-21060 43690 2048 kbit
Adaptations in the generic FPM:
The MAIN module of the FLASH Programming
Module is very generic and needs only few changes
to adapt to the user’s needs. These are:
#define f_size <NUMBER>
which holds the line number count in the UAB.
Hint: During development, <NUMBER> could be set
to the maximum possible lines as shown in Table 2
to insure that all possible lines are written, even if
they are not filled by the boot image. As a trade off, it
will take longer than necessary to finish the FPM.
The second change to be applied is patching in
the FPM the correct file name for the UAB, so that
the linker will generate a proper executable. The
entry point is:
.var f_data[f_size] = "<NAME>";
Please fill in for <NAME> the filename and path
to your User Application Boot image (UAB) as
otherwise the linker complains for missing files. The
MAIN module of the FPM can be found attached to
this document as listing 1.
In- System- Programming:
Finally to kick-off the programming and a restart
of your system running the new software out of the
FLASH, open a v Debugger session connecting
through the EZ-ICE to your hardware target and load
the executable. Upon the completion of the
download, press RUN and the UAB will be written to
the FLASH memory device. When end of lines
counter has decremented to “0”, a soft-reset is
generated and the ADSP-2106x will reload its
application code from the FLASH.
ADSP-21062 21845 1024 kbit
ADSP-21061 10922 512 kbit
ADSP-21065 5461 256 kbit
Table 2: Max. Lines of 16bit words in the image
When the generated file matches the stated
requirements, the FPM project can be opened. This
EE-117 Page 2
Technical Notes on using Analog Devices’ DSP components and development tools
Phone: (800) ANALOG-D, FAX: (781)461-3010, EMAIL: dsp.support@analog.com, FTP: ftp.analog.com, WEB: www.analog.com/dsp
References:
v Documentation
EE-55: FLASH Application Note
EE-56: Tips & Tricks On Eprom / Host Booting