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.

A_noHeap: Region has no heap

Other Parts Discussed in Thread: SYSBIOS

Hi ,

I get the following error when i run my code to test the IPC : 

ti.sdo.ipc.heaps.HeapMemMP: line 948: assertion failure: A_noHeap: Region has no heap
xdc.runtime.Error.raise: terminating execution

Issue is happening at the HeapMemMP_create() function . 

please find the code snippet below :

       HeapMemMP_Params_init(&heapBufParams);
       heapBufParams.regionId       = 0;
       heapBufParams.name           = HEAP_NAME;
       heapBufParams.sharedBufSize  = 0x00100000 ;
       System_printf("Heap Create Starting\n");

      heapHandle = HeapMemMP_create(&heapBufParams);

My shared memory information from the .cfg file is :

SharedRegion.setEntryMeta(0,
    { base: 0x0c000000,
      len: 0x00100000,
      ownerProcId: 0,
      isValid: true,
      cacheEnable: cacheEnabled,
      cacheLineSize: cacheLineSize,  /* Aligns allocated messages to a cache line */
      createHeap: true,
      name: "internal_shared_mem",
    });

  • Hi vinodh,

    Which platform are you running on, and which version of IPC, SYSBIOS and XDC are you using?

    Best regards,

    Vincent

  • Hi Vincent ,

    Sorry i forgot to provide those information -

    MCSDK version : 2.2.1.03

    EVM:  6614

    IPC Version: ipc_1_25_03_15

    Bios Version : bios_6_35_04_50 

    XDC version : xdctools_3_25_03_72 

    The code started working fine when we didn't use the Heap*MP creation in the code. Instead we used Shared_Region#0 and registered the HEAPID with this shared memory section .

    MessageQ_registerHeap((IHeap_Handle)SharedRegion_getHeap(0), HEAPID);

    Still we have few doubts : 

    1. Is Heap*MP creation required for the IPC  or dynamic allocation from SR#0 is enough ? 

     2. Who should own the shared region -  Sender_Core or Receiver_core ?

  • Hi vinodh,

    Your cfg file is specifying SharedRegion procId to be 0. So make sure that the core with proc id 0 is started and that the core that is making the HeapMemMP_create call has attached to it successfully (i.e. Ipc_attach) before making the HeapMemMP_create call.

    Heap*MP creation is not required. When the 'createHeap' property is set to true, a HeapMemMP instance is automatically created in the SR, and you can use it with MessageQ.

    I'd normally set the owner of SR0 to be the core that starts up first, so that it can initialize and access SR0 itself and so that other cores can attach to it and access SR0 asap when they come up. It does not matter whether it is the sender or the receiver of a MessageQ. (in some systems there may be MessageQ's going in both directions in any case)

    Best regards,

    Vincent 

  • Thanks Vincent .

    I have one more doubt - Is interrupt based MessageQ_get is possible ?

    Message_get and Message_put uses Signal() and wait () as default .  Which is like a polling mechanism right ?

    source : IP_User_Guide - 3.3.9 Thread Synchronization [3-21]

    regards , 

    vinodh