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.

Linux/AM5728: Host messageq question

Part Number: AM5728

Tool/software: Linux

Hi,

TI,Now I want to open the the host messageq que on the dsp1, so I add the code into the ex02_messageq/dsp1/Server.c Server_create() function.

do {
status = MessageQ_open(App_HostMsgQueName, &Module.hostQue);
Task_sleep(1);
} while (status == MessageQ_E_NOTFOUND);

if (status < 0) {
Log_print0(Diags_INFO,"Server_create: Failed opening MessageQ\n");
goto leave;
}

close the hostQue on the Server_delete() function like that:

MessageQ_close(&Module.slaveQue);

But when I run load the server_dsp1.xe66 into dsp1,run the "./app_host DSP1",the DSP1 will stop at MessageQ_open(App_HostMsgQueName, &Module.hostQue);

any suggestion?

BR,

vefone

  • Hello vefone,

    Please try setting the environment variable IPC_DEBUG = 1 and post the output here. Also, which version of Processor SDK are you using?

    Regards,
    Sahin
  • Hi,

    Sahin, I am using SDK03.01,after set the environment variable IPC_DEBUG = 1,the log are below:

    root@am57xx-evm:~/ex02_messageq# ./app_host DSP1
    --> main:
    MultiProc_getConfig: got LAD response for client 0, status=0
    NameServer_setup: got LAD response for client 0, status=1[   81.342427] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
    
    MessageQ_getConfig: got LAD response for client 0, status=0
    MessageQ_setup: LAD response for client 0, status=0
    NameServer_attach: LAD response, status=-1
    NameServer_attach: LAD response, status=-1
    [   81.352714] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
    NameServer_attach: LAD response, status=0
    GateMP_isSetup: got LAD response for client 0, status=0
    GateMP_attach: LAD response, status=-5
    NameServer_attach: LAD response, status=0
    GateMP_isSetup: got LAD response for client 0, status=0
    GateMP_attach: LAD response, status=-5
    GateMP_isSetup: got LAD response for client 0, status=0
    GateHWSpinlock_getConfig: got LAD response for client 0, status=0
    GateMP_start: got LAD response for client 0, status=0
    GateMP_getNumResources: got LAD response for client 0, status=0
    NameServer_get: got LAD response for client 0
    GateMP_start: could not open default gate,                 status=-5
    GateMP_stop: entered
    --> Main_main:
    --> App_create:
    MessageQ_create: got LAD response for client 0, status=0
    MessageQ_create: creating endpoints for 'HOST:MsgQ:01' queueIndex 0
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    <-- App_exec: 0
    --> App_delete:
    MessageQ_delete: got LAD response for client 0, status=0
    <-- App_delete:
    <-- Main_main:
    GateMP_isSetup: got LAD response for client 0, status=0
    GateMP_detach: LAD response, status=-5
    NameServer_detach: LAD response, status=0
    GateMP_isSetup: got LAD response for client 0, status=0
    GateMP_detach: LAD response, status=-5
    NameServer_detach: LAD response, status=0
    MessageQ_destroy: got LAD response for client 0, status=0
    NameServer_destroy: entered
    NameServer_destroy: got LAD response for client 0, status=0
    <-- main:
    root@am57xx-evm:~/ex02_messageq# cat /sys/kernel/debug/remoteproc/remoteproc2/trace0
    [      0.000] Watchdog disabled: TimerBase = 0x48086000 ClkCtrl = 0x4a009728
    [      0.000] 17 Resource entries at 0x95000000
    [      0.000] [t=0x000224cf] xdc.runtime.Main: --> main:
    [      0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [      0.000] [t=0x004154dd] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [      0.000] Watchdog disabled: TimerBase = 0x48086000 ClkCtrl = 0x4a009728
    [      0.000] [t=0x0042bdf7] xdc.runtime.Main: --> smain:
    root@am57xx-evm:~/ex02_messageq#

    the App_create function:

    the Server_create function are:

    BR,

    vefone

  • Hi vefone,

    I don't think you need to do a messageQ_open in your server_create function there. Simply do a messageQ_get when the time comes to retrieve a message.

    Refer to our ex02_messageQ example to see the order of the messageQ API's being used.

    Also, take a look at our user's guide for more details on the application flow.

    I hope this helps.

    Best,

    Sahin