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.

Creating SYSLink downloadable file using CCSv5

Other Parts Discussed in Thread: SYSBIOS

I am using the TI Integra processor and I am developing my DSP code using the Code Composer Studio v5.1 application. I generate my DSP application and get the resulting ELF formatted .out file from Code Composer. I need to get this file loaded on to the DSP (674X) of the Integra processor. We are trying to us SYSLink on the ARM to accomplish this. The file appears to load on to the DSP but does not run successfully.

I have taken a very simple file C file and built a downloadable image using the EZ SDK. This file was successfully down loaded and executed on the Integra using SYSlink. I took that same C file and built an ELF formatted .out file using CCSv5. This file appears to download via SYSlink but it will not run on the Integra DSP.

Are there specific Code Composer studio options that I need to set so that the ELF formatted .out file can be loadded and executed via SYSlink?

  • Hi,

    Although I am not an expert in SysLink, can you check the section of the Syslink User's Guide below? It talks about the differences between loading COFF and ELF executables.

    http://processors.wiki.ti.com/index.php/SysLink_UserGuide#Types_of_slave_executable_loaders

    Apart from that, I would ask you to redirect further questions to the BIOS forum, as the experts there are more knowledgeable about Syslink itself.

    Hope this helps,

    Rafael

  • We are building our ELF formatted output file with the -dynamic and --retain=_Ipc_ResetVector options set. I am trying to use a very simple project that only has one C file in it. The file is simply trying to toggle one of the GPIO lines on the Integra. We can get it to work if it is built using the EZ SDK but it does not work when it is built with CCSv5.

    As far as moving this question, if you think it belongs in a different forum then please move it.

  • Does this simple executable contain BIOS?  Do you plan on using SysLink for communication with the DSP or just to load/start/stop the DSP?

    I ask b/c I'd prefer we guide you toward a solution for where you want to be rather than just solve this simple 'one C file' executable.  (For example, if you have BIOS, you'll have a .cfg script we can utilize.  If your'e not using BIOS, you won't have a cfg script, and you'll have to instead throw these 'dynamic' and 'retain' flags directly in CCS).

    Also, which version of SysLink are you using?

    Chris

  • Also, FWIW, this blog post (and referenced wiki article) may also be useful.

    http://e2e.ti.com/blogs_/b/codec_engine/archive/2012/01/20/rebuilding-syslink-samples-in-ccs-v5-1.aspx

    Chris

  • Chris,

    Thanks for the repsonse.

    My single C file example does not iclude BIOS, however the real version of my software will include BIOS and IPC. We need SYSlink to load/start and stop the DSP but we will also be using the messageQ portion of IPC to communicate with the Integra DSP. So if you know how to setup CCS then i can include BIOS in my simple example to get our confidence up and then switch to my main projects that include multiple C/C++ files

    We are using a Syslink version that was modified to work with WindRiver vxWorks. It can successfully start the DSP image created using the EZ SDK. It's version is 2_00_02_80.

     

    Rick

  • Hi Rick,

    I'd suggest you look at the section "Rebuilding the slave DSP executable" on the following page:

    http://processors.wiki.ti.com/index.php/Creating_CCS_Project_for_SysLink_samples

    It walks you through how to rebuild the DSP side of the messageq sample using CCS 5.1. If you follow the steps you will end up with a CCS project that rebuilds a DSP executable that uses BIOS and IPC.

    Best regards,

    Vincent

  • Vincent/Chris,

    The "Creating CCS Project for Syslink Examples" document is exactly what we needed. Using that information I was able to build my minimal example in CCS and get it to download and start using Syslink. Now I need to move on and get my real code up and running but the first major hurdle has been overcome.

     

    Thanks

    Rick

  • hello all!, 

    I am trying to do similar thing, here. I am not using sysbios, but just want to run a program in the DSP which is loaded using the slaveloader. I am able to run the program on DSP using CCSv5.1. but when i try to load the same file using slaveloader, following error comes up.. and the kernel hangs. Can someone describe the correct way to do it. Even if i am using sysbios , what platform should i select, as its a seperate C file, independent of the syslink samples, and how the .cfg file should be altered. Any help on this will be of great help.

    Attached to slave procId 0.
    Loading procId 0.
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = c6440000
    [00000000] *pgd=854d0031, *pte=00000000, *ppte=00000000
    Internal error: Oops: 17 [#1]
    last sysfs file: /sys/devices/platform/omap/ti81xx-usbss/musb-hdrc.0/usb1/1-1/serial
    Modules linked in: syslink ti81xxfb vpss ipv6 [last unloaded: syslink]
    CPU: 0 Not tainted (2.6.37 #2)
    PC is at strlen+0x18/0x2c
    LR is at initialize_loaded_module+0x30/0x194 [syslink]
    pc : [<c01b8e48>] lr : [<bf1caa80>] psr: 80000013
    sp : c551bcc8 ip : c551bcd8 fp : c551bcd4
    r10: 00000000 r9 : c551bec0 r8 : d006d000
    r7 : 00000000 r6 : d00c5000 r5 : d00cb000 r4 : d006d000
    r3 : d00cb000 r2 : 00000000 r1 : 00060000 r0 : 00000000
    Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    Control: 10c5387d Table: 86440019 DAC: 00000015
    Process slaveloader (pid: 1588, stack limit = 0xc551a2e8)
    Stack: (0xc551bcc8 to 0xc551c000)
    bcc0: c551bd2c c551bcd8 bf1caa80 c01b8e3c c551bd04 c551bce8
    bce0: bf1c978c bf1e9fb4 d00c2000 d00c2000 d00c5000 d00c2000 c551bd14 c551bd08
    bd00: bf1cd030 bf1c9730 00000001 03046000 cffbb000 00000000 d006d000 00000000
    bd20: c551bd9c c551bd30 bf1cb670 bf1caa5c c5502180 c551bdb4 d00c2000 c551bd48
    bd40: c00c8140 c039e5a0 00000000 c551bd58 c00d323c c5502180 d00c2000 d007d000
    bd60: c551bd9c c551bd70 bf1eaaa4 d00c5000 00000000 cffc1000 03046000 cffbb000
    bd80: 00000000 00000000 c551bec0 00000000 c551bde4 c551bda0 bf1c8a60 bf1cb5ac
    bda0: d007d000 00000000 00000000 00000000 bf1ead88 d00c2000 c551bdf4 cffbb000
    bdc0: 00000000 00000000 d007d000 c551bec0 d007d000 00000000 c551be1c c551bde8
    bde0: bf1b92d0 bf1c8804 00000000 c551bec0 00000000 00000000 cb2b9000 00000000
    be00: cffcd000 00000000 00000000 c551bec0 c551be5c c551be20 bf1bd9cc bf1b91f0
    be20: 00000000 c551bec0 00000000 00000000 00000013 00000000 c5502c80 d007d000
    be40: bea20bc0 bf2b28c0 c551a000 00000000 c551bef4 c551be60 bf1bf9a4 bf1bd7b8
    be60: 00000000 c551bec0 c551be84 c551be78 c01f7e4c c0200a60 c551be9c c551be88
    be80: c01f7e68 c01f7e0c 00000000 60000013 c54e95c0 00000000 c5482400 c551a000
    bea0: 00000000 097d2000 cffcd000 bea20edb 00000013 00000000 00000000 00000000
    bec0: 00000000 a0000013 c551bef4 c551bed8 c01e51f8 00000000 c5502c80 00000007
    bee0: 00000007 bea20bc0 c551bf04 c551bef8 c00d405c bf1bee18 c551bf74 c551bf08
    bf00: c00d476c c00d4040 4005e000 c560e700 c01e1c88 c54e95c0 4f9dc67b 258d27b4
    bf20: c551bf54 c560e700 4005e000 c551bf70 00000012 4005e000 c551a000 00000000
    bf40: 00000001 00000012 00000000 00000000 bea20bc0 c020e0a2 00000007 c5502c80
    bf60: c551a000 00000000 c551bfa4 c551bf78 c00d4804 c00d4278 c551bfac 00000001
    bf80: c039df0c bea20bc0 00000000 00000000 00000036 c0046fa8 00000000 c551bfa8
    bfa0: c0046e00 c00d47b8 bea20bc0 00000000 00000007 c020e0a2 bea20bc0 00000001
    bfc0: bea20bc0 00000000 00000000 00000036 000817b4 00054208 00081494 00081494
    bfe0: c020e0a2 bea20b88 00035bd0 402bdaec 60000010 00000007 00000000 00000000
    Backtrace:
    [<c01b8e30>] (strlen+0x0/0x2c) from [<bf1caa80>] (initialize_loaded_module+0x30/0x194 [syslink])
    [<bf1caa50>] (initialize_loaded_module+0x0/0x194 [syslink]) from [<bf1cb670>] (DLOAD_load+0xd0/0xa58 [syslink])
    [<bf1cb5a0>] (DLOAD_load+0x0/0xa58 [syslink]) from [<bf1c8a60>] (ElfLoader_load+0x268/0x36c [syslink])
    [<bf1c87f8>] (ElfLoader_load+0x0/0x36c [syslink]) from [<bf1b92d0>] (Loader_load+0xec/0x164 [syslink])
    [<bf1b91e4>] (Loader_load+0x0/0x164 [syslink]) from [<bf1bd9cc>] (ProcMgr_load+0x220/0x2fc [syslink])
    [<bf1bd7ac>] (ProcMgr_load+0x0/0x2fc [syslink]) from [<bf1bf9a4>] (ProcMgrDrv_ioctl+0xb98/0x1c38 [syslink])
    [<bf1bee0c>] (ProcMgrDrv_ioctl+0x0/0x1c38 [syslink]) from [<c00d405c>] (vfs_ioctl+0x28/0x44)
    r8:bea20bc0 r7:00000007 r6:00000007 r5:c5502c80 r4:00000000
    [<c00d4034>] (vfs_ioctl+0x0/0x44) from [<c00d476c>] (do_vfs_ioctl+0x500/0x540)
    [<c00d426c>] (do_vfs_ioctl+0x0/0x540) from [<c00d4804>] (sys_ioctl+0x58/0x7c)
    [<c00d47ac>] (sys_ioctl+0x0/0x7c) from [<c0046e00>] (ret_fast_syscall+0x0/0x30)
    r8:c0046fa8 r7:00000036 r6:00000000 r5:00000000 r4:bea20bc0
    Code: e24cb004 e1a02000 ea000000 e2800001 (e5d03000)
    ---[ end trace 6ea2223306f0e638 ]---

    thanks 

    best regards

    hitesh

  • Hitesh,

    There may be a clash between the DSP's memory map and the memory allocated to Linux.  Could you please check what memory you are allocating to Linux?  You can see this by looking at the bootargs for something like:

    mem=169M

    Also, what platform are you using?

    Best regards,

        Janet

  • Hitesh,

    It sounds like you are trying to use SysLink's slaveloader to load and run the DSP with a bare metal executable (i.e. no SYS/BIOS). As Janet pointed out, you need to check your memory map. In addition, the slaveloader requires the --dynamic option to the linker. I've attached an example to illustrate how to build the DSP executable. Unzip this example into the <syslink_install_dir>/examples folder. You should then just be able to build it. The makefile will look for your <syslink_install_dir>/products.mak to find the necessary tools.

    ~Ramsey

    ex64_metal.zip
  • Hi Ramsey, 

    Thanks a lot for the quick reply. My bootargs settings are proper that is 169M and i am using TI816X evm. Now I am able to run the DSP executable which has sysbios in it , as well the raw metal program. 

    Also, the sysbios program i have  compiled via CCSv5, whereas i used the makefile approach for building your example. Is it possible to use CCSv5 only to create the raw/metal executable? 

    Again, Thanks a lot for the anwer

    best regards 

    hitesh

  • Hitesh,

    It's good to hear you are making progress. Yes, you should be able to use CCS to create a project similar to the ex64_metal example. You have two choices: 1) create a Makefile based project which looks very similar to the example I sent you, or 2) create a CCS DSP project and specify the same build options in the project build settings.

    ~Ramsey