This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2PXEVM: Mamory allocation problem for EVE on TDA2Px

Part Number: TDA2PXEVM

Hi,

I have a trable for memory allocation on EVE work on TDA2Px and built on VSDK03.07.01.00.

I defined static memory on WBUF for EVE using following code:

#pragma DATA_ALIGN   (const_wbuf,  32);
#pragma DATA_SECTION (const_wbuf, "Cdata");
uint16_t const_wbuf[16] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};

After that, when I use the vcop_malloc() function, above const_wbuf area will be overwritten by this function.

How to avoid this problem.

Thanks,

Koji

  • Hi Koji San,

       It is generally not advisable to use both the mechanism together. If you really need to use then you will have to update your linker command file where you are specifying the memories to be used for VCOP_malloc. I am sharing below the defaults which are used in our linker command file :

    IMEML_SIZE = 0x4000;
    IMEMH_SIZE = 0x4000;
    WMEM_SIZE = 0x4000;

    /*--------------------------------------------------------------------------*/
    /* Define VCOP heap locations and ensure heaps span the appropriate size */
    /*--------------------------------------------------------------------------*/
    SECTIONS
    {
    .imemla: { *(.imemla) . += (IMEML_SIZE - 8); } > IMEMLA PAGE 1
    .imemha: { *(.imemha) . += (IMEMH_SIZE - 8); } > IMEMHA PAGE 1
    .imemlb: { *(.imemlb) . += (IMEML_SIZE - 8); } > IMEMLB PAGE 1
    .imemhb: { *(.imemhb) . += (IMEMH_SIZE - 8); } > IMEMHB PAGE 1
    .wmem : { *(.wmem) . += (WMEM_SIZE - 8); } > WMEM PAGE 1
    }

      You can update these to carve out the memory which you are planning to use to allocate const_wbuf.

    Regards,

    Anshu



  • Hi Anshu,

    Thanks for your reply.

    I think your suggestion is for stand alone evaluation, but I want to execute my EVE code on Links.

    Which file should I change? I cannot fild sentences you suggested in Eve1.cfg file.

    Thanks,

    Koji