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.

IPC Communication between ARM (Linux) and DSP (SYSBIOS)

Other Parts Discussed in Thread: SYSBIOS

I'm using an EVMK2H with MCSDK 3.01.04.07 and IPC 3.36.02.13. I'm trying to setup all of my IPC communications.

Things I'm trying to accomplish:

  • low rate small messages ARM <-> DSP (plan on using MessageQ)
  • fast larger messages ARM <-> DSP and DSP <-> DSP using shared memory (plan on using DDR3 and GateMP)

I've got the MessageQ working, but I'm confused on one thing:

On the ARM (linux) side, when you allocate a message with a HEAPID, where is that HEAP defined?  I'm currently using 0, and things seem to function.  On the DSP side the heaps are setup and registered with the MessageQ module.  I created and registered heap 0 on the DSP side but I don't think that is what the ARM is using.

I think I've decoded the DDR3 memory map and figured out what can be seen in both the ARM and DSP for DDR3A and DDR3B, and I've set them to be non-cached via the cfg file.  I've wrote to the area in a test DSP application and then read the memory on the ARM to confirm it works.

I've looked at the IPC documentation and it looked like GateMP was supported in both HOST (ARM / Linux) and DSP (SYSBIOS), so I decided to try to use that to protect my shared DDR3 areas.

I'm unable to build the GateMP on the ARM (Linux) side, as I get linker errors.  I am currently passing the following libraries into my linker: (tiipc, titransportrpmsg, tiipcutils).  I've done some searching but didn't see any obvious gate library in /usr/lib.  What file am I supposed to link to? I've done a lot of searching and haven't seen an example using the GateMP directly.

When I try to create the GateMP on the DSP, I get "GateMP: line 1148: assertion failure: A_noHeap: Region has no heap"

I’ve setup a shared region via my cfg file:

SharedRegion.cacheLineSize = 32;
SharedRegion.numEntries = 4;
SharedRegion.translate = true;

var SHAREDMEM     = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;

SharedRegion.setEntryMeta(0,
   { base: SHAREDMEM,
     len: SHAREDMEMSIZE,
     ownerProcId: 0,
     isValid: true,
     cacheEnable: true,
     cacheLineSize: 128,
     createHeap: true,
     name: "internal_shared_mem"
});

I try to create my gate like this:

   GateMP_Params p;
   GateMP_Handle h;

   GateMP_Params_init(&p);
   p.localProtect = GateMP_LocalProtect_THREAD;
   p.remoteProtect = GateMP_RemoteProtect_SYSTEM;
   strncpy(p.name, name, Constants::MAX_NAME_LENGTH);
   p.regionId     = 0;

   h = GateMP_create(&p);

When the code is run I get the error “ti.sdo.ipc.GateMP: line 1148: assertion failure: A_noHeap: Region has no heap”. I’ve tried changing the regionid to 1 (in both the sharedregion entry and the GateMP_Params) and it has no difference. Do I need to register the shared region with the GateMP module somehow (similar to how you register a heap with the MessageQ module)?

Is there something else I could (should?) use instead of the GateMP? Are there hardware semaphores that I could somehow access in both in the ARM and DSP? I see reference to Semaphore2 module, but that talks about shared resources between the C66x CorePacs and nothing about the ARM.

  • So I figured out how to create the GateMP on the DSP side:

    • the SharedRegion ownerProcId had to be set to the ID of my DSP (1) [dsp0 is 1, arm/host is 0]
    • the DSP had to call ipc_start() (I thought the BIOS.addUserStartupFunction('&IpcMgr_ipcStartup'); did this.  I guess not.

    I still have the following problems / questions:

    1. What heap does Linux use for MessageQ? I use heapid=0 which seems to work, but where is this defined/getting memory from?
    2. How do I link in GateMP on the Linux side?  I'm getting undefined symbols. I am currently passing the following libraries into my linker: (tiipc, titransportrpmsg, tiipcutils)

  • I've poked around the arago lib directory (/usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib) and tried to find any file that has any gatemp symbol (using "readelf -Ws * | grep -i gatemp") and there are no references.  I've checked in both the rt and non-rt versions of the SDK.  I compiled the ipc libraries (per here ) and did the same on the libraries it created and again found no gatemp reference.


    How do I work with GateMP module in linux?

  • Hi!


    I don't think the GateMP API is usable on Linux: I saw this written somewhere in the documentation and also during boot sequence of the board.