Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Using a symbol stripped DSP executable with DSPLink

From Texas Instruments Wiki
Jump to: navigation, search

END OF LIFE

DSP Link is still available for download, but no further releases or updates are planned. Please see IPC Software Options for details and alternatives.

This page provides information about using DSPLink to load and start symbol stripped DSP executables on the DSP.

Overview

DSPLink supports application writers wishing to use a DSP executable from which the symbol table has been stripped out. This is done to reduce the size of the DSP executable.

This feature is available in DSPLink from version 1.40.05_p4 onwards (including 1.50 and subsequent releases).

Details

The size of the DSP side executable can be reduced by the following ways:

Remove debug information

The debug information can be reduced using the strip6x post-processing utility. When strip6x is used with its default options, no further changes are need; however source level debugging will not be possible.

Remove the full symbol table

The size of the DSP side executable can be reduced by using the –s option in the linker; this option removes the entire symbol table. Further, if strip6x is used with the -p option, it has the same effect, and the DSP executable size is reduced further. Applications using this feature must set the value of the .data:DSPLINK_shmBaseAddress section in the application specific linker command file to the start of shared memory.

Example

For example, the application linker command file must contain a directive similar to the following:

SECTIONS {
.data:DSPLINK_shmBaseAddress: fill=0x8FE05000 {} > DDR
}

The fill value should be the start address of the shared memory used for the DRV component. Please refer to the configuration file $(DSPLINK)/config/all/CFG_<platform.c> for the start of the DRV component.

An example of this usage is provided in the message sample application present on the DSP-side in $(DSPLINK)/dsp/src/samples/message. The linker command file for the message sample application demonstrates this usage for Davinci platform.

Determining the location of the DRV component

The DRV component is present at the very start of shared memory assigned to it through the DSPLink dynamic configuration file $(DSPLINK)/config/all/CFG_<platform.c>. Note that when used with Codec Engine, this file is not used and the configuration is overridden by the Codec Engine provided dynamic configuration.

For example, refer to DSPLink release v1.50 configuration file $(DSPLINK)/config/all/CFG_Davinci_DM6446.c.

/** ============================================================================
 *  @name   LINKCFG_linkDrvObjects
 *
 *  @desc   Array of Link driver objects in the system.
 *  ============================================================================
 */
STATIC CONST LINKCFG_LinkDrv  LINKCFG_linkDrvObjects [] =
{
    {
        "SHMDRV",              /* NAME           : Name of the link driver */
        (Uint32) 100000000,    /* HSHKPOLLCOUNT  : Poll value for which handshake waits (-1 if infinite) */
        (Uint32) 1,            /* MEMENTRY       : Memory entry ID (-1 if not needed) */
        0,                     /* IPSTABLEID     : ID of the IPS table used */
        2,                     /* IPSENTRIES     : Number of IPS supported */
        0,                     /* POOLTABLEID    : ID of the POOL table */
        1,                     /* NUMPOOLS       : Number of POOLs supported */
        0,                     /* DATATABLEID    : ID of the data driver table */
        1,                     /* NUMDATADRV     : Number of data drivers supported */
        0,                     /* MQTID          : ID of the MQT */
        0,                     /* RINGIOTABLEID  : RingIO Table Id used for this DSP */
        0,                     /* MPLISTTABLEID  : MpList Table Id used for this DSP */
        0                      /* MPCSTABLEID    : MPCS Table ID used for this DSP */
    }
} ;

The MEMENTRY above indicates that memory entry 1 is used for the Link driver component.

/** ============================================================================
 *  @name   LINKCFG_memTable_00
 *
 *  @desc   Memory table ID 0.
 *  ============================================================================
 */
STATIC CONST LINKCFG_MemEntry  LINKCFG_memTable_00 [] =
{
    ...
    {
        1,                     /* ENTRY          : Entry number */
        "DSPLINKMEM1",         /* NAME           : Name of the memory region */
        0x8FE05000,            /* ADDRPHYS       : Physical address */
        0x8FE05000,            /* ADDRDSPVIRT    : DSP virtual address */
        (Uint32) -1,           /* ADDRGPPVIRT    : GPP virtual address (if known) */
        0xFB000,               /* SIZE           : Size of the memory region */
        TRUE                   /* SHARED         : Shared access memory? */
    },
    ...
}

At memory entry 1, the DSPLINKMEM1 memory region is present, starting at address 0x8FE05000. Since the DRV component is the very first component in the memory region, it starts at physical address 0x8FE05000. This is the value to be used to fill the .data:DSPLINK_shmBaseAddress section within the application's DSP-side linker command file.

NOTE: If a non-symbol stripped DSP executable is used, or an executable from which only debug information is removed, but symbol table is still present, all the above is not required. In that case, DSPLink internally determines the address of the _DSPLINK_shmBaseAddress symbol using the symbol table on the GPP-side and uses it to fill the DSP-side section with the right address.