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.

Building Syslink linux/sysbios6 example application from the command line outside the syslink source tree (on DM8148 EVM)

Other Parts Discussed in Thread: SYSBIOS, OMAPL138

Hello,

Before going ahead and developing a syslink application I have been trying to build a working example application (messageQ in my case) from a directory outside the Syslink source tree. I tried copying the original example application to a different location and using modified makefiles from the syslink source and also tried reusing the "makerules" distributed with the OMX and edma3lld components. I couldn't get the first approach to build and the second produces a valid executable for linux and a nonworking slave processor executable (syslink on linux does not handshake properly with the slave processor so the example application gets stuck).

I have tried for a few days now and I cannot seem to get anywhere close to a solution. Are there instructions on how to build an example syslink application *outside* of the syslink source tree? If instructions are not available, can anyone provide a .zip archive of a working example?

Thank you in advance

--

Delio Brignoli

Audioscience Inc.

  • Delio,

    What version of SysLink are you using?

    I understand that the samples are not well suited for stand-alone projects. I've attached a new message queue example for you to try out. We will be shipping new stand-alone examples in SysLink which can be built outside of theSysLink product folder. Each new example will have its own makefile. I hope the attached example will be a good starting point for you. I have validated the example on the following:

    SysLink 2.10.02.18
    DM8148 EVM
    Linux 2.6.37

    Follow these instructions to build the example.

    1. Unpack the attached zip file. This should create the following folder:

    ex02_messageq

    2. Edit ex02_messageq/products.mak, update install paths.

    ex02_messageq/products.mak
    ----------------------------
    BIOS_INSTALL_DIR        =
    CGT_ARM_PREFIX          =
    IPC_INSTALL_DIR         =
    SYSLINK_INSTALL_DIR     =
    CGT_C674_ELF_INSTALL_DIR=
    CGT_M3_ELF_INSTALL_DIR  =
    XDC_INSTALL_DIR         =

    3. Build the example.

    cd ex02_messageq
    make all

    4. Create your install folder. This will collect all executables into the install folder.

    cd ex02_messageq
    make install

    Follow these instructions to run the example.

    1. Copy the install folder to your target file system.

    cp -r install/ex02_messageq $FS/examples

    2. Install the SysLink driver (syslink.ko).

    insmod syslink.ko

    3. Use the run script to run the message queue example.

    cd examples/ex02_messageq/debug
    run.sh

    4. To run the example on just the dsp or video processor, use the following commands.

    slaveloader startup DSP server_dsp.xe674
    app_host DSP
    slaveloader shutdown DSP

    slaveloader startup VIDEO-M3 server_video.xem3
    app_host VIDEO-M3
    slaveloader shutdown VIDEO-M3

    Note: to run on the vpss processor, you must also load and run the video processor first.

    slaveloader startup VIDEO-M3 server_video.xem3
    slaveloader startup VPSS-M3 server_vpss.xem3
    app_host VPSS-M3
    slaveloader shutdown VPSS-M3
    slaveloader shutdown VIDEO-M3

    Let me know how this works out for you.

    ~ Ramsey

    ex02_messageq.zip
  • Thank you very much Ramsey, this is great!

    I am using SysLink 2.10.00.12, but switching to a different version is not out of the question. Looking forward to the standalone examples being released, in the meantime I will try this out ASAP and let you know how it goes.

    --

    Delio

  • Hello Ramsey,

    I still haven't tried the code but reading through your instructions I was wondering if the restriction that applies to running the app against the VPSS M3 (VIDEO M3 has to be loaded/started first) is a result of the way the example is coded (i.e. the VIDEO M3 is by convention responsible for enabling cache and AMMU) or is it because of some reason?

    Thank you

    --

    Delio

  • Delio,

    You are exactly correct. The example is setup such that the video core is the master and the vpss core is the slave. I've got the master enabling the unicache and enabling the ammu. The slave expects this to already be done. You can change the configuration scripts to swap roles, then the vpss is master and needs to run first. Maybe you can even work it out such that the cores are peers and they both configure the ammu, maybe.

    I've been told there are no restrictions to swapping roles, but I've never tried it myself. However, you must always configure the core id the same way regardless of role:

    VIDEO: Core.id = 0;
    VPSS: Core.id = 1;

    ~ Ramsey

  • Thank you very much for the clarification Ramsey. I can confirm the example app builds fine for me and works OK as-is for the M3s cores. I had to add some code to the DSP config to set the bios timer to 20MHz in order for it to work on my DM8148 EVM. I am pasting the bit I added below FYI (it is taken from the original SysLink example application config). Do you know when the examples are going to be published?


    --

    Delio

    /* look for timer frequency in config args */
    var DeviceName = Program.platform.getExeContext(Program).deviceName;
    var dmTimerFreq = 0;
    var cfgArgs = Program.build.cfgArgs;
    if ((cfgArgs != undefined) && ("dmTimerFreq" in cfgArgs)) {
        dmTimerFreq = cfgArgs.dmTimerFreq;
    }

    /* Set the BIOS timer frequency so as to match with the default timer
     * frequency on Linux
     */
    var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
    Timer.intFreq.hi = 0;

    /* Some u-boot/Linux combinations configure the dmtimers to be driven by
     * a 32 KHz clock while others use a 20/24/27 Mhz clock.  As of this release,
     * Netra PSP components configure a 32 KHz clock, while Centaurus PSP
     * components configure a 20 MHz clock.
     */
    if (dmTimerFreq != 0) {
        Timer.intFreq.lo = dmTimerFreq;
    }
    else if (DeviceName.match("814")) {
        Timer.intFreq.lo = 20000000;
    }
    else if (DeviceName.match("816")) {
        Timer.intFreq.lo = 32768;
    }
    else {
        print("Device name match failed, using 20000000 for ");
        print("ti.sysbios.timers.dmtimer.Timer.intFreq.lo");
        Timer.intFreq.lo = 20000000;
    }

  • Sorry for high-jacking the thread.

    I'm trying to use the same example but with the OMAPL138 evm board.

    I'm however struggling to make it work as I get assertions all the time.

    Do you have an example for the OMAPL138 processor or maybe some guidelines for making this example work with the OMAPL138 board?

  • I build  ex2_messageq,it has some errors as follow:

    make -C video all
    make[2]: Entering directory `/mnt/hd-8148-dvsdk/ti-ezsdk_dm814x-evm_5_03_01_15/component-sources/syslink_2_10_03_20/examples/ex02_messageq/video'
    #
    # Making configuro/linker.cmd ...
    /home/yuyin/ezsdk/component-sources/xdctools_3_22_04_46/xs --xdcpath="/home/yuyin/ezsdk/component-sources/syslink_2_10_03_20/packages;/home/yuyin/ezsdk/component-sources/bios_6_33_02_31/packages;/home/yuyin/ezsdk/component-sources/ipc_1_24_02_27/packages;/home/yuyin/ezsdk/component-sources/xdctools_3_22_04_46/packages" \
                xdc.tools.configuro -o configuro \
                -t ti.targets.arm.elf.M3 -c /home/yuyin/Cgt_tms470 \
                -p ti.platforms.evmTI814X:video -b ../shared/config.bld \
                -r release --cfgArgs "{ configBld: \"../shared/config.bld\" }" \
                Video.cfg
    making package.mak (because of package.bld) ...
    generating interfaces for package configuro (because package/package.xdc.inc is older than package.xdc) ...
    configuring Video.xem3 from package/cfg/Video_pem3.cfg ...
    js: "/mnt/hd-8148-dvsdk/ti-ezsdk_dm814x-evm_5_03_01_15/component-sources/syslink_2_10_03_20/packages/ti/syslink/ipc/rtos/package.xs", line 85: Error: Library not found: ti.syslink.ipc.rtos.anull
    gmake: *** [package/cfg/Video_pem3.xdl] Error 1
    gmake: *** Deleting file `package/cfg/Video_pem3.xdl'
    gmake: *** [package/cfg/Video_pem3.xdl] Deleting file `package/cfg/Video_pem3.h'
    gmake: *** [package/cfg/Video_pem3.xdl] Deleting file `package/cfg/Video_pem3.c'
    js: "/mnt/hd-8148-dvsdk/ti-ezsdk_dm814x-evm_5_03_01_15/component-sources/xdctools_3_22_04_46/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    make[2]: *** [configuro/linker.cmd] Error 1
    make[2]: Leaving directory `/mnt/hd-8148-dvsdk/ti-ezsdk_dm814x-evm_5_03_01_15/component-sources/syslink_2_10_03_20/examples/ex02_messageq/video'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/mnt/hd-8148-dvsdk/ti-ezsdk_dm814x-evm_5_03_01_15/component-sources/syslink_2_10_03_20/examples/ex02_messageq'
    make: *** [syslink_example] Error 2

    How can I solve it? Please help me ,thanks!