VDSP++5.0 Update 10 Heap in external DM memory

From DSignT Support Database
Jump to: navigation, search

1 Problem

A heap in external SDRAM is not correctly handled by VDSP++5.0

A bug in VDSP++5.0 (update 10) causes a heap in DM memory to be treated as a heap in PM memory. During C runtime initialization writes to the heap use the 24-bit DAG2 and cause memory corruption.

Arr u.png    back to top

2 Solution

will be fixed in update 11

Meanwhile add File:Set c pr67196.asm, which is a modified version of set_c.asm with a fix applied, to the projects. This file is based on update 10 to VisualDSP++ 5.0 and may not work with other versions.

To use this file in your project you need to add the source file to your project and then add the following include path in your assembler options "<VisualDSP++ install path>/21k/lib/src/libc_src/".

Also make sure the C runtime variables __heaps and __nheaps are mapped to internal PM memory. This requires to add the following statement to the linker description file:

        /* VDSP3.5 */
        INPUT_SECTIONS ( libc.dlb [ seg_init_rtheap.doj ( seg_pmco ) ] )
        /* VDSP5.0 */
        INPUT_SECTIONS ( libc.dlb [ rtheap.doj ( seg_pmco ) ] )
    } > seg_pmco


Make sure to keep the blanks following and preceeding the brackets ! (see http://ez.analog.com/message/33768)

Arr u.png    back to top

3 Additional Tags

D.Module.21065, VDSP, VDSP++

Contact Post.png Support Tool.png