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-c6x communicate with sys/bios on c6678

I want to create two program run on c6678,one runs on core 0 linux ,the other runs on core 1-7 sys/bios.

These two program communicate with each other by syslink.

but the syslink on linux-c6x has a little different,is there any demo about this framework? 

I write a little program on linux side to test my thought,

int
main (int argc, char ** argv)
{
 Int     status = 0;
 SysLink_setup();
 ProcMgr_Handle  handle = NULL;
ProcMgr_AttachParams attachParams;

status = ProcMgr_open (&handle, 1);//core 1
 if(status>=0){
 ProcMgr_getAttachParams (NULL, &attachParams);
 status = ProcMgr_attach (handle, &attachParams);
 if (status < 0) {
Osal_printf ("ProcMgr_attach failed [0x%x]\n", status);
}
  ProcMgr_close(&handle);
 }
 SysLink_destroy();
}

then I always get "ProcMgr_attach failed",btw,when I use ProcMgr_open() , I get  a lot assertion failed messages:
Assertion at Line no: 2871 in /home/ubuntu/build-set/c66le/linux-c6x-2.0.0.63/Build/syslink_evmc6678.el/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/procMgr/hlos/knl/ProcMgr.c: (handle != NULL) : failed
Assertion at Line no: 883 in /home/liuc/work/linux-c6x-2.0.0.63/linux-c6x-2.0.0.63-src/projects/syslink/ti/syslink/procMgr/hlos/usr/ProcMgr.c: ((handlePtr != NULL) && (*handlePtr != NULL)) : failed

linux-c6x version: 2.0.0.63 release
syslink version: 02.00.00.68_beta1 c6x
  • Hi, Jerry,

    Under linux-c6x wiki page, there is a link to software ecosystem features which has info on syslink. There are also demo codes under projects/syslink. Would these info help?

  • Hi Rex,

    I follow these demo codes to create a test program , but ProcMgr_attach failed.

    And, How to build a .xe66 image? ccs 5.03 default output is .out.

  • Hi, Jerry,

    There are 2 directories under syslink/samples, hlos and rtos. Codes under hlos directory are meant to run in the user space of the linux, and rtos is to run under BIOS. When running in linux user space, it is not using .xe66 image. Hence I am a bit confused. The example is for linux envrionment. Is the test program running on linux or bios?

  • Hi Rex,

    in linux-c6x.

    I knew there are samples under rtos, but I can not find the cfg file for c66x, does the c66x's cfg file similar to c6474?

    Now I modify my program to use "ProcMgr_BootMode_NoBoot" in ProcMgr_attach() and successed in.

    But I got Ipc_control() failed in further Ipc_CONTROLCMD_LOADCALLBACK operation. 

    I didn't find where to set the slave cores's Ipc_ResetVector in cfg file for c6474.

  • Hi, Jerry,

    Each subdirectory, notify, messageQ, etc, under rtos has directories for c64x and c66x, c6678 and c6670 sepcifically. I am not sure why you don't see the cfg files in those 2 c66x directories. I got source code both from git server and src tarball and cfg files for c66x are shown in both packages under rtos. The cfg files are similar except c66x has 8 cores. 

    In our demo code, procMgr does not download code to cores, but only initializes the IPC. That very likely is the reason why it fails in the LOADCALLBACK operation.  I suggest you follow the demo once and also take a look at the syslink scripts to understand what is involved. When running the demo script, e,g. messageq_app_test_8_core.sh, it first download the syslink driver and slave cores with the following 2 lines:

       insmod /opt/syslink_evm6678.el/syslink.ko

       ${LOADER} $i /opt/syslink_evm6678.el/messageq_c6678_core${i}.xe66

    The reset vector is also set in the script. I suspect your cores are not loaded when you run procMgr and problem should go away once they are loaded.

    If you find this resolves your issue, could you mark it closed? Thanks!