/****************************************************************************** * FILE PURPOSE: Build configuration Script for the TCP3D Driver ****************************************************************************** * FILE NAME: config.bld * * DESCRIPTION: * This file contains the build configuration script for the TCP3D driver * and is responsible for configuration of the paths for the various * tools required to build the driver. * * Copyright (C) 2011, Texas Instruments, Inc. *****************************************************************************/ /* Set package attribute as ZIP or TAR */ Pkg.attrs.archiver = "tar"; /* Get the Tools Base directory from the Environment Variable. */ var toolsBaseDir = java.lang.System.getenv("XDCCGROOT"); /* Get the base directory for the TCP3D Driver Package */ var tcp3dDriverPath = new java.io.File(".//").getPath(); var tcp3dDriverInstallType; /* Read the part number from the environment variable. */ var tcp3dPartNumber = java.lang.System.getenv("PARTNO"); if(tcp3dPartNumber == null) { tcp3dPartNumber = "keystone2"; } /* Include Path */ var tcp3dIncludePath = " -i" + tcp3dDriverPath + "/src" + " -i" + tcp3dDriverPath + " -i" + tcp3dDriverPath + "/test"; /* Configure the TCP3D Release Version Information */ /* We use the information from compatibility key. It require 3 steps: */ /* remove SPACE and TAB, convert to string and split to make array */ var tcp3dDriverReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(','); /* TCP3D Driver Coverity Analysis: Check the environment variable to determine if Static * Analysis has to be done on the TCP3D Driver Code base or not? */ var tcp3dDriverCoverityAnalysis = java.lang.System.getenv("LLDCOV"); /* C66 ELF compiler configuration for Little Endian Mode. */ var C66LE = xdc.useModule('ti.targets.elf.C66'); C66LE.rootDir = toolsBaseDir; C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o"; /* C66 ELF compiler configuration for Big Endian Mode. */ var C66BE = xdc.useModule('ti.targets.elf.C66_big_endian'); C66BE.rootDir = toolsBaseDir; C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o"; /* Check if we need to run the STATIC Analysis or not? */ var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE"); /* Setup the Coverity Filters to perform Static Analysis. */ if (coverityAnalysis == "ON") { var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH"); var cfgBase = xdc.getPackageBase("tisb.coverity.filters") + "cfg"; var coverityFilter = [ { moduleName: "tisb.coverity.filters.Coverity", params: { cfgDir: cfgBase, // The Coverity configuration file directory rootDir: coverityInstallPath, outDir: xdc.csd() + "cov_out", analyzeLibs: true } }, ]; /* Run the coverity filters on the LE Build only. */ C66LE.profiles["release"].filters = coverityFilter; } /* Check if we need to create the Makefiles? */ var miniBuild = java.lang.System.getenv("MINI_PACKAGE"); if (miniBuild == "ON") { /* Add the filter for simple Makefile generation. */ var makeC66LEFilter = { moduleName: "build.filter.Make", params: { makefileName: "simpleC66LE.mak", } }; C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter; var makeC66BEFilter = { moduleName: "build.filter.Make", params: { makefileName: "simpleC66BE.mak", } }; C66BE.profiles["release"].filters[C66BE.profiles["release"].filters.length++] = makeC66BEFilter; } /* List all the build targets here. */ Build.targets = [ C66LE, C66BE ];