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.

CCSv5 project setup for Syslink MessageQ sample app

Other Parts Discussed in Thread: SYSBIOS

Hi,

I am trying to create a messageQ sample app on CCSv5.1.

I have installed EZ-SDK for TI814x (PG1.0) and in the syslink folder (ti-ezsdk_dm814x-evm_5_02_02_60\component-sources\syslink_2_00_02_80\packages\ti\syslink\samples\rtos\messageQ).

I followed the syslink Install guide and was able to run the messageQ app on the board TI814x.

Now I want to use this messageQ app and modify it to our requirement.

On CCSv5, found there is lot of dependencies with xdc modules.

So, I tried to the example message Q in CCS. But the .out file (with eabi format) created did not run successfully.

Attached is the log showing the error.

7416.MessageQ_Error.txt

"Loaded file /tmpAssertion at Line no: 301 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_00_02_80-r1i/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/IpcDrv.c: (status >= 0) : failed

/MessageQ.out on slave procId 0."

So, looks like this is not compatible with the one on ARM side

 

Is there any similar messageQ sample app that runs on CCSv5.1 ?

The generated file should run successfully with the messageQapp provided on EVM board.

 

Best Regards,
Sharath 

 

 

 

 

 

  • Hi Sharath,

    Let me better understand what you are trying to do. You are using the ARM side messageQ executable (messageqapp_debug) built from the EZ-SDK, and trying to rebuild the rtos-side executable (messageQ.out) using CCS and getting the result to work. Is this correct?

    If so, my advice would be to verify CCS is building with the same versions of the software that was provided in the EZ-SDK (e.g. XDC tools, Code generation tools, IPC, SYSBIOS), and that the version numbers match what is specified in the release notes of the Syslink product in the Validation section (see syslink_2_00_02_80/syslink_2_00_02_80_ReleaseNotes.html). If the rtos-side executable is built with different versions of the software when compared with the hlos-side executable, you may run into issues at run-time due to version mismatch.

    Best regards,

    Vincent

  • It's probably much easier to rebuild the DSP-side MessageQ.out using the SysLink build framework.  See here for instruction: http://processors.wiki.ti.com/index.php/SysLink_Install_Guide

    If you really want to use CCS to build it then Vincent's reply addresses that issue, but I would recommend using the gmake framework of SysLink.

    Regards,

    - Rob

  • I've never been able to get CCS to build syslink compatible code that correctly runs.  As Robert says, you're better off building your DSP code in the SDK itself.  Look at the rtos samples and piggy-back off of test.bld.  You need three files: config.bld, package.bld, and package.xdc, use the ones in the samples as a template.

    config.bld tells xdc where the DSP compiler is:

    // ON Linux Host. Modify this to suit your tool chain paths
    var rootDirPre = "/home/lholeva/ti-ezsdk_dm816x-evm_5_03_01_15/dsp-devkit";
    var rootDirPost = "";

    //********************* Setup for C674 target for ELF *************************
    var C674_ELF = xdc.useModule('ti.targets.elf.C674');
    C674_ELF.rootDir = rootDirPre + "/cgt6x_7_3_1" + rootDirPost;
    C674_ELF.ccOpts.suffix += " -g -mi10 -mo ";
    //set default platform and list of all interested platforms for c674
    C674_ELF.platforms = [
                       // "ti.platforms.evmDA830:dsp",
                       //"ti.syslink.samples.rtos.platforms.ti816x.dsp",
         "platforms.ti816x.dsp"
                    ];

    //list interested targets in Build.targets array
    Build.targets = [
                        //C28_large,
                        //C64,
                        //C64P_COFF,
                       //C64P_ELF,
                        //C67P,
                        //C674_COFF,
                        C674_ELF,
                       //M3_ELF,
                    ];

    package.bld is akin to a makefile:

    var testBld = xdc.loadCapsule("ti/syslink/buildutils/rtos/buildScripts/test.bld");

    var testArray = [
        {name: 'DSPtasks_ti81xx_dsp',
            sources: ["<name of source code file>", ...], config: "./ti81xx/DSPtasks_ti81xx_dsp",
            copts: ["-g -O3 -DSYSLINK_PLATFORM_TI81XX -mv6740"],
            buildTargets: ["C674"],
            buildPlatforms: ["platforms.ti816x.dsp"],
        },

    package.xdc gives the version of the code that is to be made:

    package app.rtos [1,0,0,0] {
    }

    The next thing that you need to do is to export the path to the xdctools and the XDCPATH which indicates where the component packages are located.  You can also define your own platform definition in a sub-directory called platforms, again see the samples for a template, but refer to the EZSDK memory map to determine the appropriate settings.

    To build your code:

    xdc XDCARGS="profile=debug"

    or

    xdc XDCARGS="profile=release"

    Lee

     

  • hi Lee,

    i am trying to build a DSP elf executable so that it can be loaded into the dsp from the ARM side. For doing that i have followed the steps as you have mentioned above, by configuring package.bld, package.xdc and config.bld.

    however when i try to compile it using XDC, it pops out the following error

    root@abb-lt-capacitor-linux:/home/abb/ti-ezsdk_dm816x-evm_5_01_01_80/syslink_02_00_00_68_beta1/ti/syslink/samples/rtos/sys_first#  

    xdc XDCARGS="profile=release"
    making package.mak (because of .xdcenv.mak) ...
    configuring platforms_ti816x_dsp/release/sys_first.xe674 from package/cfg/platforms_ti816x_dsp/release/sys_first_xe674.cfg ...
    js: "./package/cfg/platforms_ti816x_dsp/release/sys_first_xe674.cfg", line 713: xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: /home/abb/ti-ezsdk_dm816x-evm_5_01_01_80/syslink_02_00_00_68_beta1/platforms/ti816x/dsp/package.xdc found along the package path, but no schema file was found. Ensure that the package 'platforms.ti816x.dsp' is completely built.
    gmake: *** [package/cfg/platforms_ti816x_dsp/release/sys_first_xe674.c] Error 1
    root@abb-lt-capacitor-linux:/home/abb/ti-ezsdk_dm816x-evm_5_01_01_80/syslink_02_00_00_68_beta1/ti/syslink/samples/rtos/sys_first#

    i have added the the path for xdctools and XDCPATHS as well... on further searching on the RTSC troubleshooting website 

    http://rtsc.eclipse.org/docs-tip/XDCtools_Error_Codes#xdc.PACKAGE_NOT_FOUND

    it says that " The package has not been built by the xdc tool even though the physical package directory may be on the package path." Can you clarify a bit on this error? Am I missing something here

    thanks

    regards 

    hitesh

  • hitesh, I'm afraid you're somehow down a bad path.  The error you're getting seems to indicate you've moved files around in directories, or created your own 'platforms.ti816x.dsp' platform, or something else.  I'd recommend you hit the reset button and start again.

    The EZSDK release you're using (and associated SysLink release) is one of the very first released and has known issues - not the best place to start given what we have available today.  Can you update to a more recent EZSDK and we can try again using the SysLink Install Guide?

    Chris

  • hi chris, 

    thanks for your suggestions

    i have changed the EZDSK to the latest one that is 5.04 and also installed all the components. I am able to build the rtos side sample applications, also there is a folder called

    examples-->archive-->ti_platforms_evmTI814X_linux inside the syslink_2_10_03_20

    which has hello-world examples using notify. Can you suggest the possible way to build the executables out of it. It has a makefile and products.mak

    thanks

    regards

    hitesh

  • Hi Hitesh,

    The examples in the 'examples' directory are an alpha-quality preview of what we intend to release in future versions of SysLink, so they have not yet been widely 'advertised' in the documentation. They are intended to be more easily decoupled from the build system in the SysLink product than the examples in the 'samples' directory.  To rebuild and run them, you just need to select the subdirectory for the platform of your choice (e.g. evmTI814X_linux) under the examples\archive directory and unzip the zip file for the example of interest. Then,

    - Modify the extracted products.mak file with the appropriate paths to the INSTALL_DIR's, just like you would normally do for the SysLink product (details on how to rebuild SysLink itself are in the SysLink Install Guide http://processors.wiki.ti.com/index.php/SysLink_Install_Guide).

    - Given you are using the EZSDK, you do not normally have access to the M3 compiler, so you'll need to replace the 'run.sh' and 'makefile' files in say the ex01_helloworld directory with the ones I have attached to this post - you can compare them with the originals to find out what I changed so that you can do the same for the ex02_messageq example if desired.

    - At the command line, cd into the ex01_helloworld directory and type 'make help'. It will show you all the build targets you can use. Typically you can do:

    > make all

    > make install

    and it will rebuild the example and put all the relevant files into the examples/install directory.

    - To run, you just need to copy the contents of the folder to your target's filesystem, insmod the syslink.ko driver if the EZSDK hasn't already done so (the SysLink Install Guide talks about how to do this), and run './run.sh'. The ex01_helloworld output looks similar to this:

    + ./slaveloader startup DSP server_dsp.xe674
    Trace enabled
    Trace SetFailureReason enabled
    Attached to slave procId 0.
    Loading procId 0.
    Loaded file server_dsp.xe674 on slave procId 0.
    Started slave procId 0.
    + ./app_host DSP
    --> App_exec:
    App_exec: event received from procId=0
    <-- App_exec: 0
    + ./slaveloader shutdown DSP
    Trace enabled
    Trace SetFailureReason enabled
    Stopped slave procId 0.
    Unloaded slave procId 0.
    Detached from slave procId 0.

    PS: While I am on this thread, I just want to point out that the following wiki page talks about how to create a CCS project for standard SysLink 'samples': http://processors.wiki.ti.com/index.php/Creating_CCS_Project_for_SysLink_samples. Depending on what you are doing you may find it useful.

    Best regards,

    Vincent

    files.zip
  • hi vincent,

    Thanks a lot for the detailed answer. It really helped a lot.

    Now i am able to build the examples using your method. Although running the examples still shows some errors which are as folllows

    WARNING: at arch/arm/mm/ioremap.c:211 __arm_ioremap_pfn_caller+0x58/0x190()
    Modules linked in: syslink ipv6 [last unloaded: vpss]
    Backtrace:
    [<c0049bb8>] (dump_backtrace+0x0/0x110) from [<c039b7d4>] (dump_stack+0x18/0x1c)
    r7:00000000 r6:c004d76c r5:c045bf9b r4:000000d3
    [<c039b7bc>] (dump_stack+0x0/0x1c) from [<c006da3c>] (warn_slowpath_common+0x54/0x6c)
    [<c006d9e8>] (warn_slowpath_common+0x0/0x6c) from [<c006da78>] (warn_slowpath_null+0x24/0x2c)
    r9:00000002 r8:00000000 r7:bf07f188 r6:0008f028 r5:00000034
    r4:00000000
    [<c006da54>] (warn_slowpath_null+0x0/0x2c) from [<c004d76c>] (__arm_ioremap_pfn_caller+0x58/0x190)
    [<c004d714>] (__arm_ioremap_pfn_caller+0x0/0x190) from [<c004d928>] (__arm_ioremap_caller+0x64/0x6c)
    [<c004d8c4>] (__arm_ioremap_caller+0x0/0x6c) from [<c0060454>] (omap_ioremap+0x60/0x64)
    r6:00000000 r5:00000034 r4:8f028000
    [<c00603f4>] (omap_ioremap+0x0/0x64) from [<bf07f188>] (MemoryOS_map+0x1f0/0x3a8 [syslink])
    r7:d1a6fcc8 r6:00000000 r5:d1a6fc60 r4:d7091000
    [<bf07ef98>] (MemoryOS_map+0x0/0x3a8 [syslink]) from [<bf04d594>] (_ProcMgr_map+0x1cc/0x4ac [syslink])
    r8:ddc7c000 r7:d1a6fcc8 r6:00000000 r5:06a85000 r4:d1a6fd48
    [<bf04d3c8>] (_ProcMgr_map+0x0/0x4ac [syslink]) from [<bf05b974>] (ElfLoaderTrgWrite_copy+0x10c/0x368 [syslink])
    [<bf05b868>] (ElfLoaderTrgWrite_copy+0x0/0x368 [syslink]) from [<bf05ef40>] (DLIF_copy+0x10/0x1c [syslink])
    [<bf05ef30>] (DLIF_copy+0x0/0x1c [syslink]) from [<bf05dcd4>] (DLOAD_load+0x734/0xa58 [syslink])
    [<bf05d5a0>] (DLOAD_load+0x0/0xa58 [syslink]) from [<bf05aa60>] (ElfLoader_load+0x268/0x36c [syslink])
    [<bf05a7f8>] (ElfLoader_load+0x0/0x36c [syslink]) from [<bf04b2d0>] (Loader_load+0xec/0x164 [syslink])
    [<bf04b1e4>] (Loader_load+0x0/0x164 [syslink]) from [<bf04f9cc>] (ProcMgr_load+0x220/0x2fc [syslink])
    [<bf04f7ac>] (ProcMgr_load+0x0/0x2fc [syslink]) from [<bf0519a4>] (ProcMgrDrv_ioctl+0xb98/0x1c38 [syslink])
    [<bf050e0c>] (ProcMgrDrv_ioctl+0x0/0x1c38 [syslink]) from [<c00d305c>] (vfs_ioctl+0x28/0x44)
    r8:be8f3b90 r7:00000007 r6:00000007 r5:d1a4b080 r4:00000000
    [<c00d3034>] (vfs_ioctl+0x0/0x44) from [<c00d376c>] (do_vfs_ioctl+0x500/0x540)
    [<c00d326c>] (do_vfs_ioctl+0x0/0x540) from [<c00d3804>] (sys_ioctl+0x58/0x7c)
    [<c00d37ac>] (sys_ioctl+0x0/0x7c) from [<c0045e00>] (ret_fast_syscall+0x0/0x30)
    r8:c0045fa8 r7:00000036 r6:00000000 r5:00000000 r4:be8f3b90
    ---[ end trace 766fdd752f5c5765 ]---
    Loaded file server_dsp.xe674 on slave procId 0.
    Started slave procId 0.
    + ./app_host DSP
    BUG: Your driver calls ioremap() on system memory. This leads
    to architecturally unpredictable behaviour on ARMv6+, and ioremap()
    will fail in the next kernel release. Please fix your driver.
    ------------[ cut here ]------------

    i am aware of the fact that i need to set linux bootargs to MEM=169M (as mentioned in the developers guide) in the U-BOOT before running the syslink examples. Therefore i do the same using reference from here

    http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_U-Boot

    i set in the u boot the following

    TI8168_EVM#setenv bootargs 'console=ttyUSB0,115200n8 root=/dev/mmcblk0p2 mem=169M'
    TI8168_EVM#saveenv
    Saving Environment to NAND...
    Erasing Nand...
    Warning: Erase size 0x00002000 smaller than one erase block 0x00020000
    Erasing 0x00020000 instead
    Erasing at 0x260000 -- 100% complete.
    Writing to Nand... done

    (i am using SD card for booting, my image and file system reside on SD card)

    Following all the above mentioned procedure and building all the syslink components, still i am not able to successfully run the syslink examples.

    Am I missing something important here. Please clarify

    P.S : thanks for providing the info on building syslink examples using CCS, i will be doing it once i am able to solve this issue. 

    Thanks a lot

    best regards

    hitesh 


  • Hi Hitesh,

    Keep in mind that the EZSDK in general uses a different memory map then what the individual components use for their examples. So you will always need to be careful about making sure that parameters such as the 'mem-' do no conflict with the example's memory map. The memory map for the 'examples' is in ex01_helloworld\shared\config.bld. Make sure that the 'mem=' setting is not bigger than what the file indicates for 'Linux' memory.

    Same idea for the 'samples'. Their memory map is described in ti/syslink/samples/rtos/platforms/<platform>/dsp/Platform.xdc. "EXT_RAM" corresponds to Linux memory.

    Best regards,

    Vincent