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.

AM5728 IPC MessageQ_Open返回-5

Other Parts Discussed in Thread: AM5728

平台AM5728,系统由yocto编译出来的,基于SDK 5.2.0

运行rtos5.2的examples/DRA7XX_linux_elf/ex02_messageq例子测试IPC通信机制,

发现app_host调用 MessageQ_Open(msggName,..)返回 -5,继续查看dsp端的server.c代码 ,发现MessageQ_create(msggName,&msgqParams),其中msgqParams.queueIndex = 65535 。

请问这出了什么问题?

  • 请看一下用的compiler编辑器版本是否和SDK 5.2 release note里要求的版本一致。
  • #define MessageQ_E_NOTFOUND (-5)

    Unable to find the specified entity.

    建议您可以对照以下链接中对应的messageQ函数具体解释再仔细分析一下。
    ti-processor-sdk-rtos-am57xx-evm-04.00.00.04\ipc_3_50_03_04\docs\doxygen\html
  • cat /tmp/LAD/lad.txt ,
    It noticed:
    Initializing LAD... [0.617208] NameServer_setup: entered, refCount=0
    [0.617251] NameServer_setup: creating listener thread
    [0.617345] NameServer_setup: exiting, refCount=1
    [0.617422] NameServer_create(): 'GateMP'
    [0.617441]
    opening FIFO: /tmp/LAD/LADCMDS
    [0.619237] listener_cb: Entered Listener thread.
    [0.619255] NameServer: waiting for unblockFd: 0, and socks: maxfd: 0
    [57.946240] Retrieving command...
    [57.946435]
    LAD_CONNECT:
    [57.946449] client FIFO name = /tmp/LAD/540
    [57.946459] client PID = 540
    [57.946468] assigned client handle = 0
    [57.946504] FIFO /tmp/LAD/540 created
    [57.946550]
    WARN: Client /tmp/LAD/540 has not yet opened, will retry
    [57.946775] FIFO /tmp/LAD/540 opened for writing
    [57.946817] sent response
    [57.946827] DONE
    [57.946835] Retrieving command...
    [57.946875] Sending response...
    [57.946893] Retrieving command...
    [57.946974] LAD_MULTIPROC_GETCONFIG: calling MultiProc_getConfig()...
    [57.946987] MultiProc_getConfig() - 5 procs
    [57.946995] # processors in cluster: 5
    [57.947004] cluster baseId: 0
    [57.947012] ProcId 0 - "HOST"
    [57.947020] ProcId 1 - "IPU2"
    [57.947027] ProcId 2 - "IPU1"
    [57.947034] ProcId 3 - "DSP2"
    [57.947041] ProcId 4 - "DSP1"
    [57.947049] status = 0
    [57.947056] DONE
    [57.947063] Sending response...
    [57.947080] Retrieving command...
    [57.947135] LAD_NAMESERVER_SETUP: calling NameServer_setup()...
    [57.947146] NameServer_setup: entered, refCount=1
    [57.947155] NameServer_setup: already setup
    [57.947162] NameServer_setup: exiting, refCount=2
    [57.947170] status = 1
    [57.947177] DONE
    [57.947185] Sending response...
    [57.947200] Retrieving command...
    [57.947242] LAD_MESSAGEQ_GETCONFIG: calling MessageQ_getConfig()...
    [57.947253] status = 0
    [57.947261] DONE
    [57.947268] Sending response...
    [57.947283] Retrieving command...
    [57.947324] LAD_MESSAGEQ_SETUP: calling MessageQ_setup()...
    [57.947334] MessageQ_setup: entered, refCount=0
    [57.947343] NameServer_create(): 'MessageQ'
    [57.947357] MessageQ_setup: exiting, refCount=1
    [57.947366] status = 0
    [57.947373] DONE
    [57.947381] Sending response...
    [57.947396] Retrieving command...
    [57.947602] NameServer_attach: --> procId=1, refCount=0
    [57.949955] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    [57.949988] NameServer_attach: <-- refCount=0, status=-1
    [57.949999] Sending response...
    [57.950018] Retrieving command...
    [57.950067] NameServer_attach: --> procId=2, refCount=0
    [57.952246] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    [57.952270] NameServer_attach: <-- refCount=0, status=-1
    [57.952280] Sending response...
    [57.952301] Retrieving command...
    [57.952351] NameServer_attach: --> procId=3, refCount=0
    [57.954853] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    [57.954872] NameServer_attach: <-- refCount=0, status=-1
    [57.954882] Sending response...
    [57.954899] Retrieving command...
    [57.954958] NameServer_attach: --> procId=4, refCount=0
    [57.957678] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    [57.957696] NameServer_attach: <-- refCount=0, status=-1
    [57.957705] Sending response...
    [57.957723] Retrieving command...
    [57.957784] LAD_GATEMP_ISSETUP: calling GateMP_isSetup()...
    [57.957795] status = 0
    [57.957803] DONE
    [57.957810] Sending response...
    [57.957827] Retrieving command...
    [57.957872] LAD_GATEHWSPINLOCK_GETCONFIG: calling GateHWSpinlock_getConfig()...
    [57.957883] GateHWSpinlock_getConfig() baseAddr = 0x4a0f6000
    [57.957891] size = 0x1000
    offset = 0x800
    [57.957900] status = 0
    [57.957907] DONE
    [57.957914] Sending response...
    [57.957931] Retrieving command...
    [57.958071] LAD_GATEMP_START: calling GateMP_start()...
    [57.958082] status = 0
    [57.958090] DONE
    [57.958098] Sending response...
    [57.958114] Retrieving command...
    [57.958155] LAD_GATEMP_GETNUMRESOURCES: calling GateMP_getNumResources()...
    [57.958166] status = 0
    [57.958174] DONE
    [57.958196] Sending response...
    [57.958214] Retrieving command...
    [57.958261] LAD_NAMESERVER_GET: calling NameServer_get(0x39238, '_GateMP_TI_dGate'[57.958272] )...
    [57.958285] NameServer_getLocal: entry key: '_GateMP_TI_dGate' not found!
    [57.958295] NameServer_getRemote: no socket connection to processor 1
    [57.958304] NameServer_getRemote: no socket connection to processor 2
    [57.958312] NameServer_getRemote: no socket connection to processor 3
    [57.958320] NameServer_getRemote: no socket connection to processor 4
    [57.958328] value = 0x10
    [57.958335] status = -5
    [57.958343] DONE
    [57.958350] Sending response...
    [57.958366] Retrieving command...
    [57.958496] LAD_MESSAGEQ_CREATE: calling MessageQ_create(0x367c8, 0x367e8)...
    [57.958508] MessageQ_create: creating 'HOST:MsgQ:01'
    [57.958519] MessageQ_create: returning obj=0x3b660, qid=0x80
    [57.958529] status = 0
    [57.958537] DONE
    [57.958544] Sending response...
    [57.958560] Retrieving command...
    [57.958618] LAD_MESSAGEQ_ANNOUNCE: calling MessageQ_announce(0x367c8, 0x3b660)...
    [57.958629] MessageQ_announce: announcing 0x3b660
    [57.958641] NameServer_add: Entered key: 'HOST:MsgQ:01', data: 0x80
    [57.958651] status = 0
    [57.958658] DONE
    [57.958665] Sending response...
    [57.958681] Retrieving command...
    [57.958733] LAD_NAMESERVER_GETUINT32: calling NameServer_getUInt32(0x3b578, 'DSP1:MsgQ:01')...
    [57.958746] NameServer_getLocal: entry key: 'DSP1:MsgQ:01' not found!
    [57.958755] NameServer_getRemote: no socket connection to processor 1
    [57.958763] NameServer_getRemote: no socket connection to processor 2
    [57.958771] NameServer_getRemote: no socket connection to processor 3
    [57.958779] NameServer_getRemote: no socket connection to processor 4
    [57.958786] value = 0x80
    [57.958794] status = -5
    [57.958801] DONE
    [57.958808] Sending response...
    [57.958823] Retrieving command...
    [58.958987] LAD_NAMESERVER_GETUINT32: calling NameServer_getUInt32(0x3b578, 'DSP1:MsgQ:01')...
    [58.959006] NameServer_getLocal: entry key: 'DSP1:MsgQ:01' not found!
    [58.959016] NameServer_getRemote: no socket connection to processor 1
    [58.959024] NameServer_getRemote: no socket connection to processor 2
    [58.959032] NameServer_getRemote: no socket connection to processor 3
    [58.959040] NameServer_getRemote: no socket connection to processor 4
    [58.959048] value = 0x80
    [58.959055] status = -5
    [58.959063] DONE
  • follow lad.txt
    [57.947602] NameServer_attach: --> procId=1, refCount=0
    [57.949955] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    => I suggested the problem is that "NameServer_attach: socket failed:"
  • 已经解决了,是kernel里面的rmpg宏设置成了M导致