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.

AM5748: MesageQ Issue

Part Number: AM5748
Other Parts Discussed in Thread: SYSBIOS

Hi All,

I am working on Sitara AM5748 processor. As a starting point I want to test messageQ between ARM(Linux) and DSP(RTOS). I have built the "ex02_messageq" example through command line. The RTOS SDK version used is 06.01.00.08.

I tried to run the DSP and ARM images on processor. I got the below error. 

[ 53.505] [t=0x00000008:f845bee4] ti.sysbios.heaps.HeapBuf: ERROR: line 236: requested size is too big: handle=0x9516fcf8, size=262272
[ 53.506] ti.sysbios.heaps.HeapBuf: line 236: requested size is too big: handle=0x9516fcf8, size=262272
[ 53.515] [t=0x00000008:f8b124bb] ti.sdo.ipc.MessageQ: ERROR: line 503: assertion failure: A_invalidMsg: Invalid message
[ 53.515] ti.sdo.ipc.MessageQ: line 503: assertion failure: A_invalidMsg: Invalid message
[ 53.515] xdc.runtime.Error.raise: terminating execution

I have taken the same project into CCS and got the same error. 

I tird to increase the blockSize and the error still persist.

While, I tried the same example from RTOS SDK Version 04.03.00.05. In this case example is working fine built both on command line and CCS.

Please suggest we the workaround for the same. 

Thanks,

Janardan M

 

  • Hi Janardan,

    The heapbuf memory is defined in the *.cfg file.

    For examples, for A15, you can find the configuration in SDK/ipc_x_xx_xx_xx/examples/AM572X_bios_elf/ex02_messageq/host/host.cfg.

    /* create a default heap */
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var heapMemParams = new HeapMem.Params();
    heapMemParams.size = 0x8000;

    Based on the error message,

    [ 53.505] [t=0x00000008:f845bee4] ti.sysbios.heaps.HeapBuf: ERROR: line 236: requested size is too big: handle=0x9516fcf8, size=262272

    You need to increase the size of the heapmem from 0x8000 to 0x80000.

    The same thing applies to DSP if the same error occurs on DSP.

    Regards,
    Stanley

  • Hi Stanley ,

    Thanks for the quick response. As per your suggestion I increased "heapMemParams.size" to 0x80000. But I see that ARM executabe is struck somewhere in "App_create".

    Below is the linux side logs.

    root@am57xx-evm:~# ./app_host DSP1
    --> main:
    --> Main_main:
    --> App_create:

    Below is the DSP1 logs.

    [ 0.000] Watchdog disabled: TimerBase = 0x48086000 ClkCtrl = 0x4a009728
    [ 0.000] 17 Resource entries at 0x95000000
    [ 0.000] [t=0x000304c7] xdc.runtime.Main: --> main:
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x00056637] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] Watchdog disabled: TimerBase = 0x48086000 ClkCtrl = 0x4a009728
    [ 0.000] [t=0x000797e2] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x0008e32e] Server: Server_create: server is ready
    [ 0.000] [t=0x0009936c] Server: <-- Server_create: 0
    [ 0.000] [t=0x000a1ab7] Server: --> Server_exec:

    Since these are images generated from example projects I expect these to work straight away. Why am I seeing these issues? Am I missing something?

    Please help me resolving the issue.

    Thanks,

    Janardan 

  • After checking the release notes from ipc package, there was an issue in messageq example and fixed in the new release.

    Could you try again with the latest SDK release from ti.com?

  • Hi stanley,

    I installed RTOS SDK version 06.03.00.106 and tried the same example, Result remains same. 

    DSP log:

    0.000] 17 Resource entries at 0x95000000
    [ 0.000] [t=0x00022496] xdc.runtime.Main: --> main:
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x00e4fbf1] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] [t=0x00e61051] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x00e73cb0] Server: Server_create: server is ready
    [ 0.000] [t=0x00e79284] Server: <-- Server_create: 0
    [ 0.000] [t=0x00e7d4fd] Server: --> Server_exec:

    ARM Log:

    --> Main_main:
    --> App_create:
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    App_exec: sending message 1
    App_exec: sending message 2
    App_exec: sending message 3

    Can you please let me know which version of processor SDK RTOS/IPC can I use to get MessageQ working. Or please suggest me to work around for the same.

    Thanks

    Janardan M

  • Could you follow the below instructions and test with the pre-built binary from Linux SDK?

    https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/rtos/index_examples_demos.html#big-data-ipc-example

    Please let me know if this IPC example works for you or not.

    Regards,

    Stanley

  • Hi Stanley

    We tried the big data IPC example as you suggested and we are observing some issues.

    After heap memory is initialized by host application, console is hung. Please see the Host and DSP logs below.

    Please let us know what could have gone wrong here and kindly suggest corrective actions if any..

    BTW..we didn't find pre-built binary from the Linux SDK and hence we built the binary using makefile.

    Best Regards

    Narasimha Rao

    ARM LOG:

    --> main:
    --> Main_main:
    --> App_create:
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    CMEM_init success
    CMEM_getPool success
    CMEM_allocPool success: Allocated buffer 0xaa5c7000
    SharedRegion_setup success
    App_taskFxn: SR_1, base 0xaa5c7000, len=1000000
    HeapMem_setup success


    DSP LOG:

    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc2/trace0
    [ 0.000] 18 Resource entries at 0x95000000
    [ 0.000] [t=0x000220d3] xdc.runtime.Main: --> main:
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x0596f5ad] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] [t=0x0597fec4] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x05991935] Server: Server_create: server is ready
    [ 0.000] [t=0x05996748] Server: <-- Server_create: 0
    [ 0.000] [t=0x05999f25] Server: --> Server_exec: