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.

SharedRegion.setEntryMeta() is doubly called ?

Hello,

I generated the code using RingIO for C674 on TI814x. I refer (and re-use) the configuration script for RingIO example from Syslink 2.10.01.15.

It configures SR0 and SR1 for Syslink shared memory.

/* Shared 0 Memory Map */
var sr0 = Program.cpu.memoryMap['SR0'];
var SHAREDREG_0_MEM     = sr0.base;
var SHAREDREG_0_MEMSIZE =  sr0.len;
Program.global.SHAREDREG_0_ENTRYID = 0;
var SHAREDREG_0_OWNERPROCID = MultiProc.getIdMeta("HOST");

SharedRegion.setEntryMeta(Program.global.SHAREDREG_0_ENTRYID,
    { base: SHAREDREG_0_MEM,
      len: SHAREDREG_0_MEMSIZE,
      ownerProcId: SHAREDREG_0_OWNERPROCID,
      isValid: true,
      name: "internal_shared_mem",
 });

var sr1 = Program.cpu.memoryMap['SR1'];
var SHAREDREG_1_MEM     = sr1.base;
var SHAREDREG_1_MEMSIZE =  sr1.len;
Program.global.SHAREDREG_1_ENTRYID = 1;
var SHAREDREG_1_OWNERPROCID = MultiProc.getIdMeta("HOST");

SharedRegion.setEntryMeta(Program.global.SHAREDREG_1_ENTRYID,
    { base: SHAREDREG_1_MEM,
      len: SHAREDREG_1_MEMSIZE,
      ownerProcId: SHAREDREG_1_OWNERPROCID,
      isValid: true,
      name: "application_shared_mem",
      createHeap : true
 });

With this configuration (using ti.syslink.samples.rtos.platforms.ti814x.dsp.Platform), I saw the following error during configuro :

========= Error message  ==========

error: ti.sdo.ipc.SharedRegion: "/usr/local/ipc_1_23_01_26/packages/ti/sdo/ipc/SharedRegion.xs", line 344: ti.sdo.ipc.SharedRegion : Segment: 0x8e000000 overlaps with: internal_shared_mem
error: ti.sdo.ipc.SharedRegion: "/usr/local/ipc_1_23_01_26/packages/ti/sdo/ipc/SharedRegion.xs", line 344: ti.sdo.ipc.SharedRegion : Segment: 0x8d000000 overlaps with: application_shared_mem
js: "/opt/ti/xdctools_3_23_00_32/packages/xdc/cfg/Main.xs", line 149: Error: Configuration failed!

This says that shared region registered by the above script overlaps the previous registrations and this error is generated by setEntryMeta(id, entry) in SharedRegion.xs script. I tried to insert the following debug code at the beginning of setEntryMeta and then I saw the following error during configuro :

========= SharedRegion.xs ==========

function setEntryMeta(id, entry)
{  
    print("Called setEntryMeta")
    var num = SharedRegion.entryCount;
    .....

========= Error message  ==========

Called setEntryMeta
Called setEntryMeta
Called setEntryMeta
Called setEntryMeta
error: ti.sdo.ipc.SharedRegion: "/usr/local/ipc_1_23_01_26/packages/ti/sdo/ipc/SharedRegion.xs", line 346: ti.sdo.ipc.SharedRegion : Segment: 0x8e000000 overlaps with: internal_shared_mem
error: ti.sdo.ipc.SharedRegion: "/usr/local/ipc_1_23_01_26/packages/ti/sdo/ipc/SharedRegion.xs", line 346: ti.sdo.ipc.SharedRegion : Segment: 0x8d000000 overlaps with: application_shared_mem
js: "/opt/ti/xdctools_3_23_00_32/packages/xdc/cfg/Main.xs", line 149: Error: Configuration failed!

++++++++++++++++++++++++++++++++

This means setEntryMeta function was called 4 times during the configuration. However, I did exactly 2 times call in my configuration script.

Why this can happen ? For your information, If I remove the above two setEntryMeta calls from my configuration script, I saw no error and my application was built successfully.

Best Regards,

Kawada




function setEntryMeta(id, entry)

  • Kawada,

    This post was lost for a while and has just been recovered. Have you been able to resolve this issue? If not, I'm guessing that your configuration script is probably including RingIO_ti81xx_common.cfg which includes SysLinkSamples_common.cfg.xs which configures SR0 and SR1. Please attach your application configuration script if you are still having trouble.

    Thanks
    ~ Ramsey