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.

issue about c6678's syslink sample

Hi, all:

  Now I run the syslink samples on the c6678 board. The core0 runs linux
and the other core run BIOS. The samples I run is messageQ.
  The issue I got is that this sample runs unstable. About 10% possibility
the system got dead. I check the reason and find that: When core0 finishes
commnunicating with core1 and switches to core2, it needs to read the
app config of core2 by calling Ipc_readConfig(), and the program stuck in it.
Here is the code:

/* Read the app info, This info is only read by HOST as it does not have
 * static configuration feature as provided by XDC.
 */
do {
  status = Ipc_readConfig (rProcId,
                           APP_INFO_TAG,
                           &aInfo,
                           sizeof (App_Info));
} while (status == Ipc_E_FAIL);

 

The address of core2's configuration is sometimes changed. When the program
runs OK, this address is 0x5B00, but when program not running OK, this address
becomes 0x0C07XXXX, so the programm runs wrong. Further more, I can focus to
the point where this address is changed, it is mostly changed after running
MessageQ_get(). I change the sample to let the core0 only receiving msg, the
other cores only send msg. But this problem still exists. The configs address
often changes after MessageQ_get().
  So what's the reason calling this unstabiltiy? Hope for help.

  My linux is linux-c6x.

  • Hi, Murat,

    When you ran into the issue, was it a fresh run or a subsequent run after a successful run?

    Rex

  • Hi, Rex:

    Thank you for your reply.

    This issue I meet happens in a fresh run.

  • Hi Rex:

    I have solved the previos probelm. The syslink sample have some conflicts with my other apps.

    Now another issue with this topic:

    If I run the sample again after a successful run, it will exit without success and report the following error:

    Assertion at Line no: 424 in /opt/c6678/Build/syslink_evmc6678.el/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/MessageQDrv.c: (cargs.args.create.handle != NULL) : failed

    So I wonder if the syslink supports multiple times running without rebooting the system?

    Thanks! 

  • Hi, Murat,

    Are you saying no errors on the first run, but the subsequent run, it asserted the error? I don't see it on my system. I am able to run multiple times (+10 times). Did you build the kernel with syslink enabled without any modification? it is messageq_app_test_8_core.sh which you ran for the test, correct?

    Rex

  • Hi, Rex:

      Yes. The system has no errors on the first run, but the subsequent run, it asserted the error.

      I check my kernel's config, and can't find any configuration about syslink. Would you tell me

    where to find the syslink configuration in the "menuconfig"?  The syslink.ko is generated by

    a script under directory "project".

  • Hi, Murat,

    Did you edit linux-c6x-project/setenv and enable syslink build by changing the line to "export BUILD_SYSLINK=yes"? That would set it up for you.

    Rex

  • Hi, Rex:
    Thanks for quick response.
    I've already set the "export BUILD_SYSLINK=yes" before.
    I build syslink sample by "make syslink-all"

    I trace the problem, find that when the syslink sample runs for the 2nd time, it will call
    the function "NameServer_add" by the function "MessageQ_create", in this function
    it will check if the name (i.e. "MSGQ_02") has existed. For some reason, this name
    still exists even if the first time running has finished. So the kernel driver will exit with error.
    So How to remove this or work around it?
    Thanks!
  • Hi, Murat,

    Are you running TI's example without modification or it's your application? Can you explain why there is the discrepency between your run vs mine which I can run multiple times?  NameServer entry is removed in the example code. MessageQ_create() adds the NS entry, and MessageQ_delete() removes it.

    Rex

  • Hi, Rex:

      I check my messageq app code again, and find that it

    fails to set the cleanupCode correctly. When the app

    finished running, it doesn't run MessageQ_delete because

    the cleanupCode is not set correctly.

      After I modify the cleanupCode's value, the app can run

    multiple times now.

      BTW, the codes is downloaded from ti git server, and I

    didn't modify the source code, so I think this is a small bug.

      Thanks for your help, Rex!