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.

RTOS/AM5728: Data array in OCMC RAM

Expert 1935 points
Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hello,

the AM5728 has 2.5 Mbytes of OC RAM, I'd like to move some data to that part.

In my C code I have:

#pragma DATA_SECTION(dsp_buffer, "INTRAM2")
uint32_t dsp_buffer[100];

Instead of a classic linker file, I use the xdctools xs to 'configure the project', similar to the ti examples.

In my Dsp1.cfg I added:

Program.sectMap["INTRAM2"] = new Program.SectionSpec();
Program.sectMap["INTRAM2"] = "OCMC_RAM2";

I assume this to create a new section in "Program".

In config.bld I found the variable "var evmDRA7XX_ExtMemMapDsp" which seems to be an array listing all memory sections with base address/length.

I added at the end of the array:

    OCMC_RAM2: {
        name: "OCMC_RAM2",
        base: 0x40400000,
        len:  0x100000,
        space: "data",
        access: "RW"
    }

In the "Build.platformTable["ti.platforms.evmDRA7XX:dsp1"] " I added "[ "OCMC_RAM2", evmDRA7XX_ExtMemMapDsp.OCMC_RAM2 ]," to the externalMemoryMap array.

It appears that this is basically the right way but OCMC_RAM2 is already defined somewhere (where?), so the linker complains.

In the end all I needed was:

Program.sectMap["INTRAM2"] = new Program.SectionSpec();
Program.sectMap["INTRAM2"] = "OCMC_RAM2";

in Dsp1.cfg.

Nice.  Took me quite some time to get to those two lines. If someone else searches for it, here you go.

Can you confirm this is ok?

What documentation did I miss?

Same project, different issue: my machine has more than one core. How can I tell xs to run more than one compiler at once?

(same applies to rebuilding sysbios or ipc which just takes about 16 times as long as it should...)

Best regards,

Lo2