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.

concerto IPC problem

Other Parts Discussed in Thread: SYSBIOS

Dear support,

During working with IPC (concerto F28M35H52C1, MCU SDK 1.0.0.68, XDCTools 3.24.60) we get the following error(from ROV /BIOS/Scan for errors):
  
Messages/ti.sdo.ipc.MessageQ/Caught exception in view init code: InternalError: XDC runtime error: xdc.rov.Program.InstDataView#0: no property named '$status'
Events/ ti.sdo.ipc.family.f28m35x.NotifyDriverCirc/ Caught exception in view init code: Error: Error fetching Notify instance view

What could be the reason of it? we get this error if we send in the loop 5 messages from C28 to M3, and return results from m3 to c28 (not in the loop).
in the console we get the following error:
xdc.runtime.Memory: line 52: out of memory: heap=0x20010888, size=84
ti.sdo.ipc.family.f28m35x.TransportCirc: lin[Cortex_M3_0] e 322: assertion failure: A_internal: An internal error has occurred
xdc.runtime.Error.raise: terminating execution

ROV:
,0x20010810,MsgQHeapBuf0,0x00000400,256,4,1024,0,4,0,0x20012d80,0x20010830,MsgQHeapBuf0, Size: 1024, Free: 4 / 4
,0x20010838,CanUnsolicitedRXHeapBuffer,0x00000500,64,20,1280,0,20,0,0x20012880,0x20010858,CanUnsolicitedRXHeapBuffer, Size: 1280, Free: 20 / 20
,0x20010860,CanImmediateRXHeapBuffer,0x00000200,64,8,512,0,8,0,0x20013580,0x20010880,CanImmediateRXHeapBuffer, Size: 512, Free: 8 / 8
,0x20010888,PMCUMsgQHeapBuf1,0x00000200,128,4,0,4,0,0,0x20013780,0x200108a8,PMCUMsgQHeapBuf1, Size: 512, Free: 0 / 4
,0x200108b0,CanUnsolicitedTXHeapBuffer,0x00000180,24,16,384,0,16,0,0x20013980,0x200108d0,CanUnsolicitedTXHeapBuffer, Size: 384, Free: 16 / 16

we use in m3
var heapBuf0Params = new HeapBuf.Params();
heapBuf0Params.instance.name = "MsgQHeapBuf0";
heapBuf0Params.blockSize = 256;
heapBuf0Params.numBlocks = 4;
heapBuf0Params.align = 8;
Program.global.MsgQHeapBuf0 = HeapBuf.create(heapBuf0Params);MsgQHeapBuf0
IpcMgr.messageQSize = 256;IpcMgr.messageQSize = 256;

and in c28:

var heapBuf0Params = new HeapBuf.Params();
heapBuf0Params.instance.name = "MsgQHeapBuf0";
heapBuf0Params.blockSize = 256;
heapBuf0Params.numBlocks = 4;
heapBuf0Params.align = 8;
Program.global.MsgQHeapBuf0 = HeapBuf.create(heapBuf0Params);
IpcMgr.messageQSize = 256;IpcMgr.messageQSize = 256;

does it mean that we don't release the MsgQHeapBuf0 on m3 side? or our definitions are not properly?
 
Thanks,Sabina

  • Hello Sabina,

    Unfortunately I do not know the answer to your question or where to start.   I am going to move this thread to the BIOS forum as the experts there will likely have some ideas.  The links to this post will continue to work after the thread is moved.

    Regards

    Lori

  • Sabina,

    Basically, you ran out of heap blocks on the M3 side.  Looks like you only have a heap blocksize of 4 which is pretty small.

    Everytime you get a message from the C28, a block is allocated.

    Judah

  • Hi Judah,

    Thanks, we incremented a heap block-size to 8. We discovered that all our problems(with IPC) exist when program run from CCS. after we burned the program on the board - all work good. Could running from CCS influence so much on the the execution timing?  
    we work with another board Piccolo that send to Concerto (c28) external interrupt for time synchronization. If piccolo is burned and Concerto run from CCS : the latency between piccolo produce external interrupt and Concerto get it is equal to ~20msec. After we burned program on the Concerto board - the latency doesn't exist.

    A main question is: do we have a really problem on Concerto side or we have to perform all testing outside of CCS?

    Thanks, Sabina

  • Sabina,

    It really depends on what you are doing in your program.  I know that If you are doing System_printf() in your code then it can have some real time impacts.

    If the System.SupportProxy is set to SysStd then this will impact your code when running in CCS.  Setting it to SysMin like below will remove this real time impact but the side effect is that you don't get your prints to the console unless the program exits or you call System_flush().

    var System   = xdc.useModule('xdc.runtime.System');
    var SysMin   = xdc.useModule('xdc.runtime.SysMin');
    System.SupportProxy = SysMin;

    Judah

  • Hi Judah,

    in our application I added the following changes in M3 cfg file:
    var System   = xdc.useModule('xdc.runtime.System');
    var SysMin   = xdc.useModule('xdc.runtime.SysMin');
    System.SupportProxy = SysMin;

    but when I do the same changes in c28 - get problems with shared memory link.
    <Linking>
    "../Private_C28x.cmd", line 137: error #10099-D: run placement fails for object
       ".stack", size 0x1000 (page 1).  Available ranges:
       L03SARAM     size: 0x4000       unused: 0x9e2        max hole: 0x9c0    
    error #10010: errors encountered during linking; "LIPC_C28-1.out" not built

    in c28 the following configuration work:
    var SysStd   = xdc.useModule('xdc.runtime.SysStd');
    System.SupportProxy = SysStd;

    our c28- cmd file:
        .stack      : > L03SARAM PAGE = 1
        .taskStack  : > L03SARAM | M01SARAM  PAGE = 1
        .ebss       : > S00SHRAM | L03SARAM | M01SARAM   PAGE = 1
        .esysmem    : > S00SHRAM | L03SARAM | M01SARAM   PAGE = 1
        .cio        : > S00SHRAM | L03SARAM | M01SARAM  PAGE = 1

    We still didn't manage to debug the program from CCS (changes in M3 cfg file doesn't get affect).

     

    Thanks,Sabina

     

  • Sabina,

    Looks to me like when you use SysMin the memory usage must be a little bit more such that the .stack no longer fits into L03SARAM.

    You could either decrease the stack size or try decreasing the SysMin buffer size.  I don't know what the default is but try setting it to something small so your program links, then you can increase it knowing how much space you have.

        SysMin.bufSize =

    Judah

  • Hi Judah,

    where stack placed when we use SysMin ? I tryed to set bufSise = 1024 , 4096, 8192, but linker failed. it seems that our C28 work only with System.SupportProxy = SysStd.

    My stack size = 4096. I can not decrease it.

     Why the problem doesn't exist in M3 and Piccolo?
     
    Thanks,Sabina
  • Sabina,

    Please make your SysMin.bufSize 0l just so your program would link.  Then you can see look at your .map file to see how much space you actually have.

    If making your SysMin.bufSize = 0 still is not sufficient then there must be something else that is taking a lot more space.

    This is a matter of how much space is being taken up.  You probably are not seeing this on M3 because you have more space there?

    Again, if you can get your program on the C28 to link you can compare it against the version using SysStd. 

    Judah

  • Hi Judah,

    C28-SW build without errors with SysMin.bufSize = 0 .But I don't see a big differences between c28 - map files (with SysMin and with SysStd options). pls see View:http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/355/6215.LIPC_5F00_C28_2D00_1-map.rar] 
    I still can not perform debugging from CCS

    Should we have to change  'SysMin.bufSize = 0 ' to something else?

    Thanks for your help, Sabina

  • Sabina,

    Your attachment didn't seem to work because I don't see anything attached.

    The thing with SysMin is that it does get rid of some of the runtime issues with CCS associated with SysStd.
    The drawback is that you only get prints if you call System_flush() or you set the program to flush when it exits.

    If you are doing System_printf() then you should set the the SysMin.bufSize to something other than 0.

    What sort of "debugging" are you trying to do that you are not able to do?

    Judah

  • Hi Judah,

    Attached files link is: "http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/355/6215.LIPC_5F00_C28_2D00_1-map.rar".

    We use System_printf()  and debugging to uart0(via USB port connection). But we would like to set breakpoints , see variables, memory,.... all things that do during debugging process. The problem is that during running program from CCS i get memory allocation error(see it on UART0 terninal) or from IPC or from CAN communication ( we use 8-buffers Que for receive data via CAN). So we can not know if it is really problem or program running behaviours from CCS .

    Our sequence is:

    1. Piccolo board send data via CAN (1mhz speed) to Concerto-M3  periodically each 50-1000 msec.
    2.Concerto-M3 put received-data on the Que in the CAN-interrupt
    3. Concerto-M3 get data from the Que on the CAnReceiveTask and send it to C28 via IPC.   IPC task has the highest priority(=6) CanReceiveTask has priority =3,
    4.On the paralel C28 send data assynchrony to M3 via IPC and M3 send this data via CAN to Piccolo board.

    May be our logic is problematic?

    Thanks, Sabina

     



     

  • Sabina,

    I don't know if we solved your original problem here?  I can help you with SYSBIOS/IPC questions but I couldn't tell you if your logic is problematic even though its sounds okay to me.  I don't know specifics about your device.  It seems like you should be able to do what you are trying to do.  I think if I've answered your SYSBIOS questions here then it might make more sense to close this thread and open a new thread about debugging and have Lori's team chime in since they are more knowledgeable with the actual device.  I think the sequence you posted is more of a question for Lori's team.

    Judah

  • Thanks for your help, Sabina