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.