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.

Trying to build and install IPC demos

Guru 10685 points
Other Parts Discussed in Thread: CCSTUDIO, TEST2

I'm trying to learn more about IPC. I want to build the demos and run them, in particular the notify example.

How am I meant to build the ARM application that talks to the DSP application?

Here is my config.bld that resides in <IPC>/packages.

/*
 *  ======== config.bld ========
 *  Sample Build configuration script
 */

//Use CCS4.0
var rootDirPre = "C:/Program Files/Texas Instruments/CCSv4/tools/compiler/";
var rootDirPost = "";

//Use CCS3.3
//var rootDirPre = "C:/CCStudio_v3.3/";
//var rootDirPost = "/cgtools";

//Setup for C64P target
/*var C64P = xdc.useModule('ti.targets.C64P');
C64P.rootDir = rootDirPre + "C6000" + rootDirPost;
C64P.ccOpts.suffix += " -mi10 -mo ";
//set default platform and list of all interested platforms for c64P
C64P.platforms = [
                     "ti.sdo.ipc.examples.platforms.evmDM6446.dsp",
                     "ti.sdo.ipc.examples.platforms.evm6472.core0",
                     "ti.sdo.ipc.examples.platforms.evm6474.core0",
                 ];
C64P.platform = C64P.platforms[0];*/

//Setup for C674 target
var C674 = xdc.useModule('ti.targets.C674');
//C674.rootDir = rootDirPre + "C6000" + rootDirPost;
C674.rootDir = "/home/ralphc/ezsdk/ti-ezsdk_dm816x-evm_5_01_01_80/cgt6x_7_2_2"
C674.ccOpts.suffix += " -mi10 -mo ";
//set default platform and list of all interested platforms for c674
C674.platforms = [
                    "ti.sdo.ipc.examples.platforms.evmTI816X.dsp",
//                    "ti.sdo.ipc.examples.platforms.evmDA830.dsp",
//                    "ti.sdo.ipc.examples.platforms.evmOMAPL138.dsp",
                ];
C674.platform = C674.platforms[0];

//Setup for C66 target
/*var C66 = xdc.useModule('ti.targets.elf.C66');
C66.rootDir = rootDirPre + "C6000" + rootDirPost;
C66.ccOpts.suffix += " -mi10 -mo ";
//set default platform and list of all interested platforms for c674
C66.platforms = [

                     "ti.sdo.ipc.examples.platforms.evm6670.core0",
                     "ti.sdo.ipc.examples.platforms.evm6678.core0",
                ];
C66.platform = C66.platforms[0];*/

//Setup for C64T target
/*var C64T = xdc.useModule('ti.targets.elf.C64T');
C64T.rootDir = rootDirPre + "C6000" + rootDirPost;
C64T.ccOpts.suffix += " -mi10 -mo ";
//set default platform and list of all interested platforms for c64T
C64T.platforms = [
                    "ti.sdo.ipc.examples.platforms.omap4430.dsp",
                ];
C64T.platform = C64T.platforms[0];*/

//Setup for ARM target
/*var Arm9 = xdc.useModule('ti.targets.arm.elf.Arm9');
Arm9.rootDir =  rootDirPre + "tms470" + rootDirPost;
Arm9.ccOpts.suffix += " -ms ";
//set default platform and list of all interested platforms for Arm9
Arm9.platforms = [
                    "ti.sdo.ipc.examples.platforms.evmDM6446.arm",
                    "ti.sdo.ipc.examples.platforms.evmDA830.arm",
                    "ti.sdo.ipc.examples.platforms.evmOMAPL138.arm",
                 ];
Arm9.platform = Arm9.platforms[0];*/

//Setup for M3 target
/*var M3 = xdc.useModule('ti.targets.arm.elf.M3');
M3.rootDir =  rootDirPre + "tms470" + rootDirPost;
M3.ccOpts.suffix += " -ms ";
//set default platform and list of all interested platforms for M3
M3.platforms = [
                  "ti.sdo.ipc.examples.platforms.evmTI816X.video",
                  "ti.sdo.ipc.examples.platforms.evmTI816X.vpss",
                  "ti.sdo.ipc.examples.platforms.evmDM8148.video",
                  "ti.sdo.ipc.examples.platforms.evmDM8148.vpss",
                  "ti.sdo.ipc.examples.platforms.omap4430.core0",
                  "ti.sdo.ipc.examples.platforms.omap4430.core1",
               ];

//Setup for A8F target
var A8F = xdc.useModule('ti.targets.arm.elf.A8F');
//A8F.rootDir =  rootDirPre + "tms470" + rootDirPost;
A8F.rootDir = "/home/ralphc/arm-2009q1"
A8F.ccOpts.suffix += " -ms ";
//set default platform and list of all interested platforms for A8F
A8F.platforms = [
                  "ti.sdo.ipc.examples.platforms.evmTI816X.host",
//                  "ti.sdo.ipc.examples.platforms.evmDM8148.host",
               ];
A8F.platform = A8F.platforms[0];

//Uncomment the require targets
Build.targets = [
                    //C64P,
                    C674,
                    //C64T,
                    //C66,
                    //Arm9,
                    //M3,
                    A8F,

              ];

I run "xdc" as per the install guide to build the DSP application but how am I meant to build the ARM application? My efforts to edit the config.bld file above seem to have failed as xdc runs "cl470" on the ARM code (I assume that's what it's doing) and there is only GCC in the directory I specify above.

Thanks,
Ralph

  • Ralph,

     

    I haven't attempted to build the IPC demos, I think that they were setup to be built in CCS using Configuro, not xdc, but this is the setup that I use to build my own Syslink/Ipc ARM-DSP code in the EZSDK:

    My makefile for ARM-side code:

    # *****************************************************************
    #
    # LAB05ABC Makefile (Starter makefile)
    #
    # X86 makefile for lab05abc. Contains rules for:
    #
    # - .x (x86 executable target)
    # - .o (x86 object file)
    # - .PHONY (all, clean and test)
    #
    #
    # Uses the following variables (built-in and user-defined):
    #
    # CC = C compiler (gcc)
    # CFLAGS = compiler options (e.g. -g)
    # LINKER_FLAGS = specify libraries to link in
    # $@ = target
    # $^ = all dependencies
    # $< = first dependency only (not used in this solution)
    #
    # Generic "rule" terminology:
    #
    # target:dependency
    # [TAB] <CMD1>
    # [TAB] <CMD2>
    #
    # GCC options used in this makefile:
    #
    # -c = "compile only"
    # -o = "output filename"
    # -g = "debug mode"
    #
    # Note1: if you use a filename other than "makefile", use the
    #   -f option to enable make to use it:
    #   e.g.  make -f my_make_file.mak
    #
    # Note2: .PHONY tells gMake that the rule's target is not
    #        actually a file (to be created or searched for).
    #
    # Note3: When gMake runs without any rules specified on the
    #        command line, it will make (by default) the FIRST
    #        rule found in the makefile. Hence, it is common
    #        to have a rule named "all" listed first (as below).
    #
    # ***************************************************************

    # -----------------------
    # ------ includes -------
    # -----------------------
    EZSDK := /home/lholeva/ti-ezsdk_dm816x-evm_5_01_00_77
    #EZSDK := /home/lholeva/ti-ezsdk_c6a816x-evm_5_00_00_56
    include $(EZSDK)/Rules.make


    # --------------------------------
    # ------ user-defined vars -------
    # --------------------------------
    #Syslink library directory
    SYSLINKLIB_DIR := $(SYSLINK_INSTALL_DIR)/ti
    #Syslink usr library
    SYSLINK := syslink_2_00_00_68/lib
    #Libjpeg library
    LIBJPEG := libjpeg/lib

    CC := $(CS_GCC)
    CFLAGS := -g -I$(CS_INSTALL_PATH)/include -I$(LLIB_INSTALL_DIR)/include -I$(SYSLINK_INSTALL_DIR) -I$(SYSLINK_INSTALL_DIR)/ti/syslink/inc -I$(SYSLINK_INSTALL_DIR)/ti/syslink/inc/usr/Linux -I$(IPC_INSTALL_DIR)/packages
    LINKER_FLAGS := -lpthread -L$(LLIB_INSTALL_DIR)/lib -lstdc++

    # -----------------------
    # ------ make all -------
    # -----------------------

    # The "all" rule commonly specifies all executable targets to
    # be built. Note, the user has full control over what the "all"
    # rule builds. In this solution, we only have one target.
    # However, in the final DaVinci makefile, you'll see more
    # targets listed.

    .PHONY : all
    all : runDSP

     

    # -----------------------------------
    # ------ executable rule (.x) -------
    # -----------------------------------

    runDSP : runDSP.c ProcManager.c SysLinkSamples.c SysLinkSamplesAppOS.c DoDSPtask.c readimage.c DoimageProcessing.c
     $(CC) $(CFLAGS) $(LINKER_FLAGS) $^ $(LIBJPEG_LIB) $(SYSLINK_LIB) $(SYSLINK_ARCHIVE) -o $@
     @echo; echo $@ successfully created; echo


    # ---------------------------------------------------
    # ------ intermeditate object files rule (.o) -------
    # ---------------------------------------------------
    LIBJPEG_LIB   := $(LIBJPEG)/libjpeg.a
    SYSLINK_LIB       := $(SYSLINK)/syslink.o_debug
    SYSLINK_ARCHIVE   := $(SYSLINK)/syslink.a_debug

    %.o : %.c
     $(CC) $(CFLAGS) -c $< -o $@

     

    # ----------------------
    # ----- clean all ------
    # ----------------------

    # The "clean" rule should remove all files created by
    # the makefile (e.g. the executables and intermediate
    # files).

    .PHONY : clean
    clean :
     rm -f runDSP
     rm -f runDSP.o
     rm -f ProcManager.o
     rm -f DoDSPtask.o


    # -------------------------------------
    # ----- basic debug for makefile ------
    #
    # -----     example only         ------
    # -------------------------------------

    # We use test to print out the user-defined variables to
    # make sure they are set properly - this helps with
    # debugging makefile errors.

    .PHONY : test
    test:
     @echo CC = $(CC) 


    # END OF FILE

    My Config.bld file for DSP-side code:

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

     

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

    //********************* Setup for C674 target for ELF *************************
    var C674_ELF = xdc.useModule('ti.targets.elf.C674');
    C674_ELF.rootDir = rootDirPre + "/cgt6x_7_2_2" + 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,
                    ];

    My package.bld file for DSP-side code:

    var testBld = xdc.loadCapsule("ti/syslink/buildutils/rtos/buildScripts/test.bld");
    /*
     *  Export everything necessary to build this package with (almost) no
     *  generated files.  This also exports subdirectories like 'golden'
     *  and 'docs'.
     */
    var srcRelease = Pkg.addRelease(Pkg.name + ",src", {exportSrc: true, exportExe : true, exportCfg: true, exportAll: true});

    /*
     *  Export everything necessary to build this package with (almost) no
     *  generated files.  This also exports subdirectories like 'golden'
     *  and 'docs'.
     */
    //Pkg.attrs.exportAll = true;

    /*
     *  ======== testArray ========
     *  See ti/bios/build/test.bld. Only the test name is required.
     *
     *  Example:
     *    var testArray = [
     *        {name: Test1},
     *        {name: Test2, sources: ["Test"], config: "Test", refOutput: "Test", timeout: "15", buildTargets: ["C64", "C28_large"]}
     *    ];
     */
    var testArray = [
        {name: 'DSPtasks_ti81xx_dsp',
            sources: ["DSPtasks", "imageProcessing", "lldDMA", "sample_init"], config: "./ti81xx/DSPtasks_ti81xx_dsp",
            copts: ["-g -DSYSLINK_PLATFORM_TI81XX"],
     lopts:[],
            buildTargets: ["C674"],
            buildPlatforms: ["platforms.ti816x.dsp"],
        },
        {name: 'DSPtasks_ti81xx_videom3',
            sources: ['DSPtasks'], config: "./ti81xx/DSPtasks_ti81xx_videom3",
            copts: " -DSYSLINK_PLATFORM_TI81XX ",
            buildTargets: ["M3"],
            buildPlatforms: ["platforms.ti816x.videom3"],
        },
        {name: 'DSPtasks_ti81xx_vpssm3',
            sources: ['DSPtasks'], config: "./ti81xx/DSPtasks_ti81xx_vpssm3",
            copts: " -DSYSLINK_PLATFORM_TI81XX ",
            buildTargets: ["M3"],
            buildPlatforms: ["platforms.ti816x.vpssm3"],
        },
    ];

    arguments[arguments.length++] = "platform=all";
    arguments[arguments.length++] = "platform=debug";

    /* clean generated files and folders */
    Pkg.generatedFiles.$add("platforms.ti816x.dsp/");

    /* Generate the makefile goals. 'arguments' is XDCARGS */
    testBld.buildTests(testArray, arguments);

    I copied the ti816x platforms from syslink/samples/rtos/platforms to my working directory.  You should be able to copy the IPC code to your own working directory and alter *.bld files to get the code to build using xdc. 

    Lee Holeva