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.

IPC and UIA module startup order

Other Parts Discussed in Thread: SYSBIOS

Hello,

the startup order of IPC and UIA modules seem to be important when using multicore UIA configuration. The startup function in the module ti.uia.sysbios.IpcMP "IpcMP_Module_startup()" makes use of the MessageQ API. But in my application, the MessageQ module wasn't initialized yet and the program crashed before reaching main().

Looking at the source code of IpcMP_Module_startup(), there is some commented code at the beginning which should fix this problem in my opinion:

Int IpcMP_Module_startup(Int phase)
{
    //if (MessageQ_Module_startupDone() == FALSE) {
        //return (Startup_NOTDONE);
    //}

Is there any reason why this code isn't used?

I'm using a C6678 device with TI-RTOS 2.0.1.23 and XDCtools 3.30.3.47.

Thanks,
Ralf

  • Hi Ralf,

    I think you are correct. Those lines should not be commented out. The order of the startup modules is not deterministic (on purpose) and the modules are required to check that other modules that it depends on have completed their startups. It looks like you got unlucky and the MessageQ module was not completed when the IpcMP module startup function ran.

    Can you uncomment out the lines in IpcMP.c and rebuild UIA and confirm that fixes your problem. The steps to rebuild UIA are listed in the TI-RTOS User Guide.

    If you can confirm that is the problem, I'll write up a bug report and it will be addressed in the next release of UIA.

    Thanks for digging into the issue and hopefully finding the resolution!

    Todd

  • Hi Todd,

    I rebuild UIA and it seems to work now. But just uncommenting these lines doesn't work, because the startup function is not declared within the common <ti/ipc/MessageQ.h> header file. I had to include the xdc generated header file and then use the full name for the function:

    #define ti_sdo_ipc_MessageQ__nolocalnames
    /* include the xdc generated .h file */
    #include <ti/sdo/ipc/MessageQ.h>
    /* the common .h file */
    #include <ti/ipc/MessageQ.h>

    ....

    Int IpcMP_Module_startup(Int phase)
    {
       Task_Params params;
       MessageQ_Params messageqParams;
       Char name[16];
       if (ti_sdo_ipc_MessageQ_Module_startupDone() == FALSE) {
           return (Startup_NOTDONE);
       }

    ...

    Ralf

  • Makes sense that you had to do the extra "stuff". I've opened the following bug report against UIA.

    SDOCM00114233: IpcMP startup crashes because it lacks a dependency check on MessageQ

    Thank you for all the debugging and completeness in helping track down the issue!

    Todd

  • Hi Todd,

    looking at the source code it seems that this problem still exists in the latest UIA release 2.00.03.43. Any idea when it will be fixed?

    Thanks,
    Ralf

  • Hi Ralf,
    Yes, that one did not make it into the last release. We have another release coming end of summer, so I'll commit it for that release. Thanks for pointing this out.
    Best regards,
    Janet