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.

Buffer Memory allocation

Hi,

I want to allocate a BUFFER in sv04 demo which is with size of 8 MB, Is there any need to change/add any information regarding same in ggvf0.becmd.

If yes how should i assign a BUFFER. Please help me.

Thanks and Regards

Tushar

  • I Tushar, you can use DATA_SECTION pragma.. something like:

    #define BUFFER_SIZE 10240 //PC-- change it for your buffer size

    unsigned int srcBuff1[BUFFER_SIZE];

    #pragma DATA_ALIGN(srcBuff1, 128);

    #pragma DATA_SECTION(srcBuff1, ".edma_ddr");

  • Hi Tushar,

    With code changes suggested by Paula, please also add the section in ggvf0.becmd. For example:

    BUFFER_DDR            : origin = 0x90000000, length = 0x2800 

    (Note: need to change length for your buffer size; also need to adjust origin to make sure there is no overlapping with existing sections. Some memory shuffling can be needed.)

     ...

    .edma_ddr > BUFFER_DDR

    Thanks,

    Hongmei