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.

Loading external array directly to RAM instead of shared memory

Other Parts Discussed in Thread: OMAP-L138

I'm using OMAP-L138. I have an external array that I need to load. When this array is small enough it fits into shared memory but then it's huge, I get 'Out of memory' error as expected. I'm looking for a way to load the external array directly to 128MB mDDR.

To load my array into shared RAM i wrote:
const float YN[]={
    #include "MYDATA.txt"
};

Is it possible?

Thanks.

  • Hi Jacob

    This is the C64x Multicore DSP forum and is for high-performance multicore DSP support. For questions on OMAP-L13x, please post your query to http://e2e.ti.com/support/dsp/omap_applications_processors/f/42.aspx

    Here is a general way this can be done on the DSP side:

    If not already present, define a RTSC configuration and platform for your CCS project as highlighted here http://e2e.ti.com/support/embedded/bios/f/355/t/178610.aspx

    Next you need to specify a memory section. From SPRAAS7D: "Memory sections in SYS/BIOS 6 are specified to load into Memory segments using the Program module’s sectMap[ ] array. This array maps section name strings to the Memory segments into which that section is to be loaded. This pseudo-configuration code shows a mapping: Program.sectMap[“<section name>”] = <Memory segment>.name; You should replace <section name> above with the string name of the section to be mapped. Also, replace <Memory segment> with the Memory segment name to load that section into."

    As an example, in your BIOS cfg file, say bios6.cfg, you would add:
    Program.sectMap[".arraybuff"]  = "DDR3";

    In your C code, you would place your buffer in this section as:
    #ifdef __TI_COMPILER_VERSION__
    #pragma DATA_SECTION(pUserArray, ".arraybuff");
    #pragma DATA_ALIGN(pUserArray, 8);
    #endif
    int_least16_t pUserArray[MAXSIZE];

    You can then populate your array with the contents of the .txt file.

    Hope that helps. For any future queries, please post your question to the OMAP-L1 e2e forum at http://e2e.ti.com/support/dsp/omap_applications_processors/f/42.aspx