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.

Problems while compiling IPC examples

We are trying to run MessageQ using SRIO example based on the instruction given in the following document -
As per the wiki we carried out following steps for recompiling the example in linux - 
1. Open a Linux bash terminal and navigate to <pdk_install_dir>/packages.
2. Export the component install paths. The following commands can be used assuming installation of MCSDK 3.1.3.6 (Presuming CCS and MCSDK 3.1.3 is installed in /opt/ti) 
=> export C6X_GEN_INSTALL_PATH=/opt/ti/ccsv5/tools/compiler/c6000_7.4.8 
=> export XDC_INSTALL_PATH=/opt/ti/xdctools_3_30_05_60 
=> export EDMA3LLD_BIOS6_INSTALLDIR=/opt/ti/edma3_lld_02_11_13_17 
=> export CG_XML_BIN_INSTALL_PATH=/opt/ti/cg_xml/bin 
=> export BIOS_INSTALL_PATH=/opt/ti/bios_6_41_00_26/packages 
=> export IPC_INSTALL_PATH=/opt/ti/ipc_3_35_01_07/packages 
=> export PDK_INSTALL_PATH=/opt/ti/pdk_keystone2_3_01_03_06
3. Run pdksetupenv.sh 
     $ source pdksetupenv.sh
4. Navigate to <pdk_install_path>/packages/ti/transport/ipc/c66/srio/
5. Build the IPC SRIO Transport library 
    $ xdc
We are getting the following error on running xdc commanad -
No command 'xdc' found, did you mean:
 Command 'sdc' from package 'hpsockd' (universe)
 Command 'tdc' from package 'tdc' (universe)
 Command 'xjc' from package 'openjdk-7-jdk' (main)
 Command 'xjc' from package 'openjdk-6-jdk' (universe)
 Command 'xdu' from package 'xdu' (universe)
 Command 'xdm' from package 'xdm' (universe)
 Command 'xd' from package 'xd' (universe)
 Command 'gdc' from package 'gdc' (universe)
 Command 'xgc' from package 'x11-apps' (main)
 Command 'dc' from package 'dc' (main)
 Command 'xdx' from package 'xdx' (universe)
xdc: command not found

 
Also we are getting a similar error on trying c:\ti\ipc_3_36_02_13\examples code for base ARM-DSP ipc communication .  
We have successfully installed the IPC package for linux using IPC_Linux_Install document (Makefile : ipc-linux.mak). On running examples/TCI6638_linux_elf/ ex44_compute ,on make command execution, we face following error - 
ti.targets.elf.C66 not found & XDC command not found 
 
Are we trying the correct example program ? Is any pacakage installation is further required for the project compilation ? 
 
Thanking you,
 
IPC version - 3.36.02.13
MCSDK - mcsdk_bios_3_01_04_07
Cross compiler - arm-linux-gnueabihf-gcc
  • HI Dipak Narayan,
    Dipak said:
    Also we are getting a similar error on trying c:\ti\ipc_3_36_02_13\examples code for base ARM-DSP ipc communication .  
    We have successfully installed the IPC package for linux using IPC_Linux_Install document (Makefile : ipc-linux.mak). On running examples/TCI6638_linux_elf/ ex44_compute ,on make command execution, we face following error - 
    ti.targets.elf.C66 not found & XDC command not found
    Please follow this step by step procedure to execute the ex44_compute example. I have personally followed these steps and got it successfully running on K2H EVMs.
    1. IPC_build:
    ===========
    1. ipc build path directory
    /opt/ti/ipc_3_42_00_02

    2. Install directory for IPC libraries :
    /opt/ti/ipc_3_42_00_02/IPC_install

    Modify the products.mak file accordingly or refer the products.mak enclosed in this directory.

    3. cd /opt/ti/ipc_3_35_01_07_shankari_BaseID0

    4. make distclean

    5. make -f ipc-linux.mak config

    6. make

    7. make install --- > This will install the IPC libraries in the folder given in the products.mak ( For example, IPC_install)

    2. ex44_compute build:
    =======================
    #cd /opt/ti/ipc_3_42_00_02

    ( Go to the examples ex44_compute )

    #cd ex44_compute

    Modify ex44_compute/products.mak

        TOOLCHAIN_INSTALL_DIR = <...>/_your_linux_gcc_toolchain_install_
        BIOS_INSTALL_DIR = <...>/bios_m_mm_pp_bb
        IPC_INSTALL_DIR = <...>/ipc_m_mm_pp_bb
        XDC_INSTALL_DIR = <...>/xdctools_m_mm_pp_bb
        ti.targets.elf.C66 = <...>/c6000_m_m_p

        Your DESTDIR must point to your IPC "install" location. In other words,
        the location you specified when you ran 'make install' within the IPC
        product.

        DESTDIR = <...>
        
    #make clean
    #make

    Copy the HOST executable, the DSP executable, and the supporting
        scripts to your target file system.

        ex44_compute/host/bin/debug/app_host
        ex44_compute/dsp/bin/debug/compute_dspN.xe66
        ex44_compute/scripts/patchExec.pl
        ex44_compute/scripts/run_dsp.sh
        ex44_compute/scripts/run_host.sh
        ex44_compute/scripts/run_lad.sh
        ex44_compute/scripts/run_patch.sh
        ex44_compute/scripts/stop_dsp.sh
        
    3. LAD build according to the device ID:
    =========================================    

    Configure and build LAD. In order to specify the cluster baseId
        on the command line, you must build LAD using the following
        configuration. This examples builds for the TCI6638 device. Use
        the appropriate config file for your device.

        cd <IPC Install>/linux/src/daemon/cfg
        edit MultiProcCfg_tci6638.c

        Add the following header file:

            #include <ti/ipc/MultiProc.h>

        Make the following changes:

            .numProcessors = 9,
            .id = 0,
            .baseIdOfCluster = 0

        You must also configure LAD to set aside reserved message queues.
        This example uses 8 reserved message queues. Edit the following
        file to reserve message queues in LAD.

        cd <IPC Install>/linux/src/daemon/cfg
        edit MessageQCfg.c

        Make the following changes:

            .numReservedEntries = 8

        Rebuild your LAD executable. Copy the LAD executable to your
        target file system.

        <IPC Install>/linux/src/daemon/lad_tci6638


    4. Generate the compute binary according to the device ID:
    ========================================================
    perl patchExec.pl 0 compute_dspN.xe66 compute_dspN_patched.xe66

        You can also use the helper script provided with the example.

        run_patch.sh 0
        
        This will generate a new patched DSP executable.

        compute_dspN_patched.xe66    
        
    Copy compute_dspN_patched.xe66 to your filesystem.

    Power on K2H and boot Linux before running the ex44 compute example:
    ======================================================================
        
    1. Flash the SPI uboot image on K2hk
    ========================================
        
    setenv ipaddr 10.20.162.238

    setenv serverip 10.20.162.42

    tftpboot 0x88000000 u-boot-spi-k2hk-evm.gph

    sf probe

    (Offset is depends on u-boot image size )

    sf erase 0 0x100000

    sf write 0x88000000 0 0x100000

    2. Set the BOOT switch settings as 0010 and boot the U-boot
    ============================================================

    3. Flash UBIFS into NAND
    ========================
    Copy the ubifs image into the RAM address, 0x82000000

    #tftpboot 0x82000000 tisdk-server-rootfs-image-k2hk-evm.ubi
    #nand erase.part ubifs
    # pri burn_ubi
    ( check all the params are right )
    #run burn_ubi
    #env default -a
    #setenv boot ubi
    #saveenv
    #boot

    (Check the output with the attached screenshot.)

    Linux with ubifs filesystem will get booted.

    4. Stop the default LAD running on the machine.

    #cd /etc/init.d/

    #mv tiipclad-daemon.sh tiipclad-daemon_bkup.sh

    (Restart the machine)

    copy the following into the filesystem
    ======================================

    1. ex44_compute folder
    2. lad_tci6638
    3. patched compute_dspN_patched.xe66
    4. IPC_INSTALL_DIR folder

    Run ex44_compute on target
    ===========================

    1. go to IPC_install/bin
    #cd IPC_install/bin
    #./lad_tci6638 -r 8 -n 9 -b 0 -l log.txt

    2. Goto /usr/bin/scripts/
    #run run_dsp.sh

    3. Goto host folder
    #./app_host


    Output messages: -
    ===================
    oot@k2hk-evm:/home/ex44_compute/host/bin/debug# ./app_host
    ResMgr_threadFxn: -->
    ResMgr_setup: -->
    App_threadFxn: -->
    App_setup: -->
    ResMgr_setup: initalizing IPC
    App_setup: initalizing IPC
    ResMgr_setup: IPC ready, status=0
    App_setup: IPC ready, status=1
    ResMgr_setup: <-- status=0
    ResMgr_exec: -->
    ResMgr_exec: waiting for message
    App_setup: cluster baseId=0, cluster members:
    App_setup:  0 HOST
    App_setup:  1 CORE0
    App_setup:  2 CORE1
    App_setup:  3 CORE2
    App_setup:  4 CORE3
    App_setup:  5 CORE4
    App_setup:  6 CORE5
    App_setup:  7 CORE6
    App_setup:  8 CORE7
    App_setup: MessageQ_open(PEB_Proc1)
    App_setup: PEB queue: proc=CORE0, qid=0x00010089
    App_setup: MessageQ_open(Control_Proc1)
    App_setup: Control queue: proc=CORE0, qid=0x00010088
    App_setup: MessageQ_open(PEB_Proc2)
    App_setup: PEB queue: proc=CORE1, qid=0x00020089
    App_setup: MessageQ_open(Control_Proc2)
    App_setup: Control queue: proc=CORE1, qid=0x00020088
    App_setup: MessageQ_open(PEB_Proc3)
    App_setup: PEB queue: proc=CORE2, qid=0x00030089
    App_setup: MessageQ_open(Control_Proc3)
    App_setup: Control queue: proc=CORE2, qid=0x00030088
    App_setup: MessageQ_open(PEB_Proc4)
    App_setup: PEB queue: proc=CORE3, qid=0x00040089
    App_setup: MessageQ_open(Control_Proc4)
    App_setup: Control queue: proc=CORE3, qid=0x00040088
    App_setup: MessageQ_open(PEB_Proc5)
    App_setup: PEB queue: proc=CORE4, qid=0x00050089
    App_setup: MessageQ_open(Control_Proc5)
    App_setup: Control queue: proc=CORE4, qid=0x00050088
    App_setup: MessageQ_open(PEB_Proc6)
    App_setup: PEB queue: proc=CORE5, qid=0x00060089
    App_setup: MessageQ_open(Control_Proc6)
    App_setup: Control queue: proc=CORE5, qid=0x00060088
    App_setup: MessageQ_open(PEB_Proc7)
    App_setup: PEB queue: proc=CORE6, qid=0x00070089
    App_setup: MessageQ_open(Control_Proc7)
    App_setup: Control queue: proc=CORE6, qid=0x00070088
    App_setup: MessageQ_open(PEB_Proc8)
    App_setup: PEB queue: proc=CORE7, qid=0x00080089
    App_setup: MessageQ_open(Control_Proc8)
    App_setup: Control queue: proc=CORE7, qid=0x00080088
    App_setup: start message sent: procId=1 qid=0x00010088
    ResMgr_exec: message received, cmd=1
    ResMgr_exec: cmd=REQUEST, sender=1
    ResMgr_exec: message sent: qid=0x00010088
    ResMgr_exec: waiting for message
    App_setup: start message sent: procId=2 qid=0x00020088
    ResMgr_exec: message received, cmd=1
    ResMgr_exec: cmd=REQUEST, sender=2
    ResMgr_exec: message sent: qid=0x00020088
    ResMgr_exec: waiting for message
    App_setup: start message sent: procId=3 qid=0x00030088
    ResMgr_exec: message received, cmd=1
    ResMgr_exec: cmd=REQUEST, sender=3
    ResMgr_exec: message sent: qid=0x00030088
    ResMgr_exec: waiting for message
    App_setup: start message sent: procId=4 qid=0x00040088
    ResMgr_exec: message received, cmd=1
    ResMgr_exec: cmd=REQUEST, sender=4
    ResMgr_exec: message sent: qid=0x00040088
    ResMgr_exec: waiting for message
    App_setup: start message sent: procId=5 qid=0x00050088
    ResMgr_exec: message received, cmd=1
    ResMgr_exec: cmd=REQUEST, sender=5
    ResMgr_exec: message sent: qid=0x00050088
    ResMgr_exec: waiting for message
    App_setup: start message sent: procId=6 qid=0x00060088
    ResMgr_exec: message received, cmd=1
    ResMgr_exec: cmd=REQUEST, sender=6
    ResMgr_exec: message sent: qid=0x00060088
    ResMgr_exec: waiting for message
    App_setup: start message sent: procId=7 qid=0x00070088
    ResMgr_exec: message received, cmd=1
    ResMgr_exec: cmd=REQUEST, sender=7
    ResMgr_exec: message sent: qid=0x00070088
    ResMgr_exec: waiting for message
    App_setup: start message sent: procId=8 qid=0x00080088
    ResMgr_exec: message received, cmd=1
    ResMgr_exec: cmd=REQUEST, sender=8
    ResMgr_exec: message sent: qid=0x00080088
    ResMgr_exec: waiting for message
    App_setup: TransportQMSS instance created
    App_setup: <-- status=0
    App_exec: -->
    App_exec: message sent to PEB queue: qid=0x00010089
    App_exec: message sent to PEB queue: qid=0x00020089
    App_exec: message sent to PEB queue: qid=0x00030089
    App_exec: message sent to PEB queue: qid=0x00040089
    App_exec: message sent to PEB queue: qid=0x00050089
    App_exec: message sent to PEB queue: qid=0x00060089
    App_exec: message sent to PEB queue: qid=0x00070089
    App_exec: message sent to PEB queue: qid=0x00080089
    App_exec: message sent to Compute queue: qid=0x00010082
    App_exec: message sent to Compute queue: qid=0x00020082
    App_exec: message sent to Compute queue: qid=0x00030082
    App_exec: message sent to Compute queue: qid=0x00040082
    App_exec: message sent to Compute queue: qid=0x00050082
    App_exec: message sent to Compute queue: qid=0x00060082
    App_exec: message sent to Compute queue: qid=0x00070082
    App_exec: message sent to Compute queue: qid=0x00080082
    App_exec: <-- status=0
    App_destroy: -->
    App_destroy: <--
    App_threadFxn: <-- status=0
    main: application thread as terminated
    ResMgr_exec: <-- status=0
    ResMgr_destroy: -->
    ResMgr_destroy: <--
    ResMgr_threadFxn: <-- status=0
    main: appStatus=0
    main: rmStatus=0
    main: <-- status=0

    ===========================================================================
  • Hello Shankari,

    I get this error while running the makefile

    #t
    # Making transport/rtos
    make -C transport/rtos
    make[1]: Entering directory `/home/dipak/Internstuff/work_dir/transport/rtos'
    #
    # Making all ...
    /xdc XDCPATH="/packages;/packages" XDCBUILDCFG="./config.bld" XDCARGS="ti.targets.elf.C66=" all
    /bin/sh: 1: /xdc: Permission denied
    make[1]: *** [all] Error 126
    make[1]: Leaving directory `/home/dipak/Internstuff/work_dir/transport/rtos'
    make: *** [transport/rtos] Error 2
    root@dipak-Lenovo-IdeaPad-S510p:/home/dipak/Internstuff/work_dir# xdctools_3_31_02_38_core6x
  • Hi Dipak,

    Moved this thread over keystone forum.

    Thank you.
  • Dipak,

    In my above post, I have given step by step procedure. You have to specify at which step you failed.

    While running the make file of the IPC package or the makefile of the ex44_compute example??
  • Modify ex44_compute/products.mak

    TOOLCHAIN_INSTALL_DIR = <...>/_your_linux_gcc_toolchain_install_
    BIOS_INSTALL_DIR = <...>/bios_m_mm_pp_bb
    IPC_INSTALL_DIR = <...>/ipc_m_mm_pp_bb
    XDC_INSTALL_DIR = <...>/xdctools_m_mm_pp_bb
    ti.targets.elf.C66 = <...>/c6000_m_m_p

    Your DESTDIR must point to your IPC "install" location. In other words,
    the location you specified when you ran 'make install' within the IPC
    product.

    DESTDIR = <...>

    #make clean
    #make

    In this step while running make
  • HI Dipak,

    The error message seems to be "permission denied"

    Either use "sudo" while compiling or check any of the packages need permission change using "chmod 666 <module name>"

     

  • None work. I tried sudo. I tried running it as root but no luck
  • Dipak,

    You may have to check and verify each and every path you set in the products.mak file. The error is particularly about the XDC PATH.