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.

CCS: MessageQ communication between ARM to DSP



Tool/software: Code Composer Studio

Hii all,

I am currently working on messageQ. I am facing a problem with messageQ_open in DSP side .I am running DSP on BIOS and ARM on linux. I am creating the messageQ in the ARM side, in ARM side its successfully creating the messageQ. But the thing is If I try to open the created messageQ in the DSP side I am getting the status value  -11 i.e messageQ not found. So what I thought is may be ARM is not syncing  with the DSP. 

Can anyone help me how to sync  the ARM with DSP....?

ARM code:

 

status = Ipc_start();

if (status < 0) {
printf("Error: failed to initialize IPC, error=%d\n", status);
}
printf("App_setup: IPC ready, status=%d\n", status);

MessageQ_Params_init(&msgqParams);

messageQ = MessageQ_create("CORE0", &msgqParams);
if( messageQ == NULL )
{
printf("MessageQ_create failed\n");
}

DSP code:


do {
status = MessageQ_open("CORE0", &msgQueueId); //STEP-3
if (status < 0){
Task_sleep(1);
}

ipc version:  ipc_3_35_01_07

xdc version:  xdctools_3_30_05_60

bios version :  bios_6_41_00_26

arm compiler:  /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux

device: evmTCI6630K2L

I am attaching my config file also please check the config file and if have done any mistake in config file please inform me ..

arm_dsp.cfg

Thanks and Regards

Mohan

  • Hi Mohan,

    Have you checked the IPC examples provided in Processor SDK Linux (RTOS)?

     

    Best Regards,
    Yordan

  • Hi Yordan,

    Thank you for your reply....

    Have u checked my config file...?

    Yes I have gone through example code. But I want a simple messageQ code only putting and getting the messages.

    1)  Can u please explain me how DSP knows that the messageQ created in the ARM side..... ?

    2)  what is the importance of Transport QMSS in ARM to DSP communication....?

    Thank you

    Mohan

  • Hi Yordan,

    I have one more doubt.

    I am creating binary for DSP in windows and creating binary for ARM in linux because, I don't have the CCS in linux.

    Is that fine creating the DSP binary in windows...?

    Should I create binary for DSP in linux...?

    Thank you

    Mohan

  • Hi,

    I am creating binary for DSP in windows and creating binary for ARM in linux because, I don't have the CCS in linux.

    Is that fine creating the DSP binary in windows...?

    Never tested this, as my host PC is linux, but this shouldn't be a problem I think.


    Best Regards,
    Yordan

  • Hi Yordan,

    Thank you for your reply....

    Have u checked my config file...?

    1)  Can u please explain me how DSP knows that the messageQ created in the ARM side..... ?

    2)  what is the importance of Transport QMSS in ARM to DSP communication....?

    3)  Should I use IpcProcSync_ALL   to  sync ARM with DSP.....?

    Thank you

    Mohan

  • Hi Mohan,

    1. The DSP creates a local messageQ and waits for a message using messageQ_get(). The ARM then opens the DSP's messageQ using the unique messageQ name and sends the message. The DSP then retrieves the ARM's messageQ id from the message using MessageQ_getReplyQueue() - this is how it learns of the ARM's messageQ.

    Please let me know if this doesn't make sense. 

    I've attached IPC training slides below which should also help you better understand the IPC flow.

    IPC_Training_2_21.pdf

    2. Information on IPC transports can be found at the link below. The recommended transport for ARM Linux to DSP RTOS is the Rpmsg transport.

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_Foundational_Components.html#ipc-transports

    3. If you use Sync_ALL you will need to ensure the procNameAry is configured so that only the cores you are using are specified, otherwise your application will spin inside Ipc_start() waiting for the other cores - it sounds like you are getting passed Ipc_start() so whatever you already have should be fine. 

    Have you taken a look at the messageQ example for reference? It should help you figure out if you have anything missing. The example can be found inside Processor SDK RTOS at ~\ti\ipc_x_xx_xx_xx\examples\TCI6636_linux_elf\

    I hope this helps. Please let me know if you have any questions.

    Best,
    Sahin

  • Hii Sahin,

    Thank you for your reply Sahin.

    1) I have tried creating the messageQ in DSP side and I am trying to open in ARM side but I am getting the status value -11.created messageQ in DSP side is not found by ARM.

    3)  In the config file I have given as below then also while running Ipc_start() is entering to a infinite loop.

    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
    MultiProc.setConfig("CORE0", ["HOST", "CORE0"]);
    Ipc.procSync = Ipc.ProcSync_ALL;

    Thank you

    Mohan

  • Hii Sahin,

    I worked on the "\ti\ipc_x_xx_xx_xx\examples\TCI6636_linux_elf\ex44_compute" example project. I have created binary for both ARM and DSP in linux. Even I run that binaries on the c6638K2K board its working fine.

    Now I want create binary for dsp in windows CCSv6 and binary for ARM in linux with the same example project.

    1)  Can I create a binary for dsp in ex44_compute project using windows CCSv6.....?

    if it is possible can u please attch the steps to create binary in windows CCSv6...

    Thanks n Regards

    Mohan

  • Hi Mohan,

    I see you have created another thread for this issue: https://e2e.ti.com/support/tools/ccs/f/81/t/840125

    Let us continue the discussion in that thread. I'll go ahead and close this one.

    Regards,
    Sahin