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.

How to config ELF format using C6RUN for OMAPL137?

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

Hi,Experts,
I'm new to omapL1XX series board and also new to c6run. Now I have problems to set up elf format for omapl137 evm board using c6run and syslink.
Here is my working procedure:
1. Build Linux kernel(Linux version 2.6.33,MontaVista(R) Linux(R) Professional Edition 5.0.0) ,u-boot1.3.3 and flash them to the evm board.
2. Make stand alone c6run env,get components for C6Run_0_98_03_03:
 SYSLINK_VERSION=2_10_08_35
 SYSBIOS_VERSION=6_35_03_47 
 IPC_VERSION=1_25_03_15
 XDCTOOLS_VERSION=3_25_02_70
 LINUXUTILS_VERSION=3_23_00_0
3.Write the envionment path for rules.mak,config.mak.
4.Make a new platform named omapl137_syslink in "platforms" folder  copied from omapl138_syslink. Make some tiny modification which I think is right...Also rewrite platform.mak to point to rignt linux kernel and u-boot kernel.
5.In c6run root kernel,type make omapl137_syslink_config in  my host ubuntu-linux,then make everything... 
 
After debug for a week I can build cmemk.ko ,syslink.ko file  insert them to board successfully.Then I make my own executable using c6run lib and app,and run it on target board.Here problems comes:
syslink debug info assert those words below to me:

*** HeapMemMP_sharedMemReq: params->sharedAddr is not in a valid SharedRegion!
Error [0xffffffff] at Line no: 1748 in file /local/home/lc-C6Run_0_98_03_03/syslink_2_10_08_35/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/HeapMemMP.c
Assertion at LinElfLoader_getSymbolAddress: symName [_Ipc_ResetVector]

*** ListMP_getHead: handle passed is NULL!
e no: 220 in /db/atree/library/trees/sl/sl-c35/src/packages/ti/syslink/product/export/syslink_2_10_08_35/packages/ti/syslink/../../ti/syslink/utils/hlos/Memory.c: (size > 0) : failed
Error [0xfffffffe] at Line no: 1181 in file /local/home/lc-/C6Run_0_98_03_03/syslink_2_10_08_35/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/ListMP.c
ProcMgr_translateAddr: srcAddr [0xc3770c00] dstAddr [0xc5be6c00]

I guess my memory mapping is :

0xc000 0000  ~ 0xc200 0000  Linux

0xc200 0000 ~ 0xc300 0000  cmem

0xc300 0000 ~ 0xc3e0 0000  sdram

0xc3e0 0000 ~ 0xc3f0 0000   SR0

0xc3f0 0000 ~ 0xc400 0000  SR1

 What's wrong with my mapping or my config ? It works well when I using dsplink to build coff format,but not for elf format using syslink.

    

 

  • I would try to see if you can run the SysLink stand-alone examples on your device first before attempting to run C6Run.  Information on how to build/run SysLink can be found at: http://processors.wiki.ti.com/index.php/SysLink_Install_Guide_-_2.00_and_2.10

    There are newer version of SysLink available than the one you are using though it unsure how newer version of SysLink may interact with C6Run.

    NOTE: The C6Run package is no longer being supported (see http://processors.wiki.ti.com/index.php/C6EZRun.

    The alternative is to leverage SysLink directly which C6Run was using underneath. The example should be a good starting point for this.

  • Hi,Arnie

    Thanks for your reply. I knew there are newer verisons of syslink.But when I use syslink 2.20 plus and make syslink.ko module,it can not be inserted to Linux kernel.The error code is :

    Syslink: Unknown symbol irq_to_desc
    insmod: cannot insert 'syslink_latest.ko': Unknown symbol in module (-1): No such file or directory

    Does that has something to do with my linux kernel  2.6.33?

  • I have also tried to build a c6run helloworld example using omapl137_syslink_config,here's the output of syslink.ko after running:

    # ./hello_world_arm
    Hello world, from C6RunApp!
    # ./hello_world_dsp
    MultiProc Module already initialized!
    NameServer Module already initialized!
    SharedRegion Module already initialized!
    GateMP Module already initialized!
    Notify Module already initialized!
    MessageQ Module already initialized!
    HeapBufMP Module already initialized!
    HeapMemMP Module already initialized!
    ListMP Module already initialized!
    ClientNotifyMgr Module already initialized!
    FrameQBufMgr Module already initialized!
    FrameQ Module already initialized!
        ProcMgr_getProcInfo: bootMode: [0]
    MemoryOS_map: entry already exists
        mapInfo->src  [0x1c00000]
        mapInfo->dst  [0xfec00000]
        mapInfo->size [0x400000]
        OMAPL1XXPROC_attach: Mapping memory regions

        OMAPL1XXPROC_attach: Slave is now in reset!

        ProcMgr_getProcInfo: bootMode: [0]
    OsalDrv_mmap(): setting cache disabled for physical address 11800000

    OsalDrv_mmap(): setting cache disabled for physical address 11f00000

    DLOAD: ELF: ELF
    DLOAD: ELF file header entry point: c373c400
    ElfLoaderTrgWrite_copy: translated 0xc3000000 (sva) --> 0xc3000000 (mpa)
    MemoryOS_map: pa=0xc3000000, va=0xc6000000, sz=0x704c20
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc3000000]
        sgList.paddr  [0xc3000000]
        sgList.offset [0x0]
        sgList.size [0x704c20]

    ElfLoaderTrgWrite_copy: translated 0xc3704c20 (sva) --> 0xc3704c20 (mpa)
    MemoryOS_map: pa=0xc3704c20, va=0xc5940c20, sz=0x34d4a
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc3704000]
        sgList.paddr  [0xc3704000]
        sgList.offset [0xc20]
        sgList.size [0x3596a]

    ElfLoaderTrgWrite_copy: translated 0xc3739970 (sva) --> 0xc3739970 (mpa)
    MemoryOS_map: pa=0xc3739970, va=0xc5908970, sz=0x13e4
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc3739000]
        sgList.paddr  [0xc3739000]
        sgList.offset [0x970]
        sgList.size [0x1d54]

    ElfLoaderTrgWrite_copy: translated 0xc373ad58 (sva) --> 0xc373ad58 (mpa)
    MemoryOS_map: pa=0xc373ad58, va=0xc590cd58, sz=0x1000
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc373a000]
        sgList.paddr  [0xc373a000]
        sgList.offset [0xd58]
        sgList.size [0x1d58]

    ElfLoaderTrgWrite_copy: translated 0xc373bd58 (sva) --> 0xc373bd58 (mpa)
    MemoryOS_map: pa=0xc373bd58, va=0xc5914d58, sz=0x434
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc373b000]
        sgList.paddr  [0xc373b000]
        sgList.offset [0xd58]
        sgList.size [0x118c]

    ElfLoaderTrgWrite_copy: translated 0xc373c190 (sva) --> 0xc373c190 (mpa)
    MemoryOS_map: pa=0xc373c190, va=0xc591c190, sz=0x4c
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc373c000]
        sgList.paddr  [0xc373c000]
        sgList.offset [0x190]
        sgList.size [0x1dc]

    ElfLoaderTrgWrite_copy: translated 0xc373c1dc (sva) --> 0xc373c1dc (mpa)
    MemoryOS_map: pa=0xc373c1dc, va=0xc59221dc, sz=0x10
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc373c000]
        sgList.paddr  [0xc373c000]
        sgList.offset [0x1dc]
        sgList.size [0x1ec]

    ElfLoaderTrgWrite_copy: translated 0xc373c400 (sva) --> 0xc373c400 (mpa)
    MemoryOS_map: pa=0xc373c400, va=0xc5928400, sz=0x200
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc373c000]
        sgList.paddr  [0xc373c000]
        sgList.offset [0x400]
        sgList.size [0x600]

    ElfLoaderTrgWrite_copy: translated 0xc373c800 (sva) --> 0xc373c800 (mpa)
    MemoryOS_map: pa=0xc373c800, va=0xc592e800, sz=0x8c
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc373c000]
        sgList.paddr  [0xc373c000]
        sgList.offset [0x800]
        sgList.size [0x88c]

    ElfLoader_getSymbolAddress: symName [_Ipc_ResetVector]

        ProcMgr_translateAddr: srcAddr [0xc373c800] dstAddr [0xc592e800]

        ProcMgr_translateAddr: srcAddr [0xc373c81c] dstAddr [0xc592e81c]

    handle->slaveSRCfg[0].entryBase c3e00000

    Platform_loadCallback:
        No SharedRegion.entry[0].cacheEnable configuration value found, using default FALSE

    Platform_loadCallback:
        Mapping SharedRegion 0
        addr[ProcMgr_AddrType_MasterPhys] [0xc3e00000]
        addr[ProcMgr_AddrType_SlaveVirt]  [0xc3e00000]
        size                              [0x100000]
        isCached                          [0]

    MemoryOS_map: pa=0xc3e00000, va=0xc5a00000, sz=0x100000
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc3e00000]
        sgList.paddr  [0xc3e00000]
        sgList.offset [0x0]
        sgList.size [0x100000]

    handle->slaveSRCfg[1].entryBase c3f00000

    Platform_loadCallback:
        No SharedRegion.entry[1].cacheEnable configuration value found, using default FALSE

    Platform_loadCallback:
        Mapping SharedRegion 1
        addr[ProcMgr_AddrType_MasterPhys] [0xc3f00000]
        addr[ProcMgr_AddrType_SlaveVirt]  [0xc3f00000]
        size                              [0x100000]
        isCached                          [0]

    MemoryOS_map: pa=0xc3f00000, va=0xc5c00000, sz=0x100000
    _ProcMgr_map for SlaveVirt:
        dstAddr       [0xc3f00000]
        sgList.paddr  [0xc3f00000]
        sgList.offset [0x0]
        sgList.size [0x100000]

        ProcMgr_translateAddr: srcAddr [0xc373c800] dstAddr [0xc592e800]

        OMAPL1XXPROC_start: Configuring boot register
            Reset vector [0xc373c400]!

        OMAPL1XXPROC_start: Slave successfully started!

    Ipc_attach: Ipc_procSyncStart failed!
    Ipc_attach: Ipc_procSyncStart failed!
    ISR already registered!
        NotifyDriverShm_registerEvent
            Added entry in regChart: [0]

        NotifyDriverShm_registerEvent
            Added entry in regChart: [0]

       ISR handled
       ISR handled
       ISR handled
    OsalDrv_mmap(): setting cache disabled for physical address c3e00000

    OsalDrv_mmap(): setting cache disabled for physical address c3f00000

        HeapMemMP_create knl ioctl: Shared addr [0xc5a02d80]

        MessageQ_create: Max number of queues 32
        NameServer_getLocal name [CONTROL_FROM_GPP_MSGQ]
        NameServer_getLocal: Entry not found!
       ISR handled
       ISR handled
       ISR handled
        NameServer_getLocal name [HeapMemMP]
       ISR handled
       ISR handled
       ISR handled
    Failed to get value from remote NameServer
        MessageQ_open ioctl queueId [0xffff]
        NameServer_getLocal name [CONTROL_FROM_GPP_MSGQ]
        NameServer_getLocal: Entry not found!
       ISR handled
       ISR handled
       ISR handled
        NameServer_getLocal name [CONTROL_TO_GPP_MSGQ]
       ISR handled
       ISR handled
       ISR handled
        MessageQ_open ioctl queueId [0x0]
        MessageQ_create: Max number of queues 32
        NameServer_getLocal name [CIO_FROM_GPP_MSGQNAME]
        NameServer_getLocal: Entry not found!
       ISR handled
       ISR handled
       ISR handled
        NameServer_getLocal name [CIO_TO_GPP_MSGQNAME]
        MessageQ_open ioctl queueId [0x1]
       ISR handled
       ISR handled
       ISR handled
    MessageQ_get
    Hello world, fro   ISR handled
    m C6RunApp!
       ISR handled
       ISR handled
    MessageQ_get
       ISR handled
       ISR handled
       ISR handled
    MessageQ_get
       ISR handled
       ISR handled
       ISR handled
    MessageQ_get
       ISR handled
       ISR handled
       ISR handled
    MessageQ_get
       ISR handled
       ISR handled
       ISR handled
    ElfLoader_getSymbolAddress: symName [_Ipc_ResetVector]

    *** ListMP_getHead: handle passed is NULL!
            Error [0xfffffffe] at Line no: 1181 in file /local/home/lc-test/fqian/omapl137/ARM/C6Run_0_98_03_03/syslink_2_10_08_35/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/ListMP.c
        ProcMgr_translateAddr: srcAddr [0xc373c800] dstAddr [0xc592e800]

    Any ideas about this? Thanks in advance.

  • striker Qian said:

    Syslink: Unknown symbol irq_to_desc
    insmod: cannot insert 'syslink_latest.ko': Unknown symbol in module (-1): No such file or directory

    Does that has something to do with my linux kernel  2.6.33?

    The newer versions on SysLink call into the irq_to_desc function when using a kernel version less than 2.6.37.  This was added to fix a double IRQ issue to improve performance. In some cases, this function isn't being exported by older kernels.  The function is defined in $KERNEL_DIR/kernel/irq/handle.c.  You may be able to simply add:

    EXPORT_SYMBOL(irq_to_desc);

    in that file.  You'll have to re-build the kernel for this to take effect.

    BTW: Though the latest SysLink version will work on older kernels, its has been validated on the 2.6.37 kernel.

  • striker Qian said:

    ElfLoader_getSymbolAddress: symName [_Ipc_ResetVector]

    *** ListMP_getHead: handle passed is NULL!
            Error [0xfffffffe] at Line no: 1181 in file /local/home/lc-test/fqian/omapl137/ARM/C6Run_0_98_03_03/syslink_2_10_08_35/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/ListMP.c
        ProcMgr_translateAddr: srcAddr [0xc373c800] dstAddr [0xc592e800]

    Any ideas about this?

    I'm not sure what exactly is going on here as I'm not familiar with all the C6Run build structure.  Could it be that the DSP binary is built in COFF format were as SysLink expects it in ELF?

    Have you tried building and running the SysLink sample/example applications?  This will ensure that SysLink is working properly on your setup.  Just follow the instructions in the SysLink Install Guide.  Make sure you are referring the correct Install Guide based on the version of SysLink you are using.

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

    http://processors.wiki.ti.com/index.php/SysLink_Install_Guide_-_2.00_and_2.10

  • Hi,Reynoso,

    I used EXPORT_SYMBOL(irq_to_desc) as you said and solved the syslink module inserting problem.Now I can insert syslink2.2 ko module into my 2.6.33 linux kernel.However the omapl137 elf format still cannot work...I have another omapl138 board and easily get it work with syslink2.2 and c6run in elf format.

    So my question is:

    1.Have you ever had experience of testing syslink on omapl137? There seem to be no syslink examples designed for omapl137.

    2.Can omapl137 support higher version of linux kernel? Now the 2.6.33 version seems to be latest for it.

    Thanks !

  • striker Qian said:
    1.Have you ever had experience of testing syslink on omapl137? There seem to be no syslink examples designed for omapl137.

    SysLink releases have only been validated on an OMAP-L138.

    striker Qian said:
    2.Can omapl137 support higher version of linux kernel? Now the 2.6.33 version seems to be latest for it.

    I'm not sure.  Others on the forum may be able to confirm this.  You may benefit in posting a new post asking this specific question.