25.12.2012 Views

VisualDSP++ 4.5 Loader and Utilities Manual - Analog Devices

VisualDSP++ 4.5 Loader and Utilities Manual - Analog Devices

VisualDSP++ 4.5 Loader and Utilities Manual - Analog Devices

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Loader</strong> for ADSP-2126x/2136x/2137x SHARC Processors<br />

FINAL_INIT Blocks<br />

The final 256-instructions of the .ldr file contain the instructions for the<br />

IVT. The instructions are initialized by a special self-modifying subroutine<br />

in the boot kernel (see Listing 5-3). To support the self-modifying<br />

code, the loader utility modifies the FINAL_INIT block as follows:<br />

1. Places a multi-function instruction at the fifth instruction of the<br />

block:<br />

The loader utility places the instruction R0=R0-R0, DM(I4,M5)=R9,<br />

PM(I12,M13)=R11; at 0x80004 for ADSP-2126x processors or<br />

0x90004 for ADSP-2136x/2137x processors. The instruction overwrites<br />

whatever instruction is at that address. The opcode for this<br />

instruction is 0x39732D802000.<br />

2. Places an RTI instruction in the IVT:<br />

The loader utility places an RTI instruction<br />

(opcode 0x0B3E00000000) at the first address in the IVT entry associated<br />

with the boot-source, either PROM or SPI. Unlike the<br />

multifunction instruction placed at 0x80004 (for ADSP-2126x processors)<br />

or 0x90004 (for ADSP-2136x/2137x processors), which<br />

overwrites the data, the loader utility preserves the user-specified<br />

instruction which the RTI replaces. This instruction is stored in<br />

the header for FINAL_INIT as shown in Listing 5-2.<br />

For PROM boot mode, the RTI is placed at address<br />

0x80050 for ADSP-2126x <strong>and</strong> at 0x90050 for<br />

ADSP-2136x/2137x processors.<br />

For all SPI boot modes, the RTI is placed at address<br />

0x80030 for ADSP-2126x <strong>and</strong> at 0x90036 for<br />

ADSP-2136x/2137x processors (high priority SPI<br />

interrupt).<br />

3. Saves an IVT instruction in the FINAL_INIT block header.<br />

The count <strong>and</strong> address of a FINAL_INIT block are constant; to avoid<br />

any redundancy, the count <strong>and</strong> address are not placed into the<br />

<strong>VisualDSP++</strong> <strong>4.5</strong> <strong>Loader</strong> <strong>and</strong> <strong>Utilities</strong> <strong>Manual</strong> 5-29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!