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/TMDSEVM6678: PA emacExample and heap location

Part Number: TMDSEVM6678

Tool/software: TI-RTOS

Hello, I'm working with PA emacExample to understand how CPPI, QMSS and CPSW are working together. I got working internal loopback and I can "send packet to PC" and "receive packet from PC". For my project (where I intend to use ethernet) I need a very big heap, which I want to locate in DDR. So for working PA emacExample I changed location of SystemHeap in cpsw_example_c6678.cfg

//Program.sectMap["systemHeap"] = Program.platform.stackMemory;
Program.sectMap["systemHeap"] = "DDR3";

and I got this message in console

**************************************************
******* Ethernet Single Core Example Start *******
**************************************************
QMSS successfully initialized
CPPI successfully initialized
PASS successfully initialized
Ethernet subsystem successfully initialized
Tx setup successfully done
Rx setup successfully done
Pa_addIp returned error -18
PASS setup failed

As I see error occured in Pa_addIp2(). It returns pa_INVALID_INPUT_HANDLE (-18). 

So the questions are

1) What does this error mean? Why did it happen?

2) Can I locate heap in DDR in the example? And how?

  • A colleague who can assist has been notified of your query. Please expect some delay in our responses due to the holidays.
    Thanks for your patience.

    Lali
  • Hi,

    In the original configuration, the systemHeap is allocated from stack, where is in L2 as defined by platform. I tried to change the systemHeap into DDR3, I saw 8192x30 size in the DDR used as the heap. I also saw the local variables in DDR now but I came into the same issue -18 when calling addIP(). It came from pa.c:

    if (hdr->status != PA_TBL_STAT_ACTIVE) {
    ret = pa_INVALID_INPUT_HANDLE;

    May need some time to debug.

    Regards, Eric
  • Hello, still waiting the answers.
    I built another example from pdk (helloWorld) using instruction in the file NIMU_emacExample_EVMC6678C66BiosExampleProject.txt". Here the heap is located in MSMCSRAM (tried to change to DDR3 and it worked). Initialization is similar. Maybe comparing will help.
  • Hello again. I built another project (multicoreExample for PA) to learn. First thing I tried was to change systemHeap location to DDR3 (the project is much more complicated and I've just started to learn it). I got this:

    [C66xx_0] A0=0x0 A1=0x0
    A2=0xc0792b4 A3=0xc0d4db4
    A4=0x0 A5=0x806468
    A6=0x1000 A7=0x1844018
    A8=0xc A9=0xc05966c
    A10=0x8058e8 A11=0x0
    A12=0x0 A13=0x8058e8
    ...

    So it didn't work here too. Why is it so important to locate SystemHeap in L2SRAM for these projects? I don't see any taboos to locate heap in DDR, but is it possible for the examples?