/****************************************************************************** * FILE PURPOSE: Build configuration Script for the PA LLD ****************************************************************************** * FILE NAME: config.bld * * DESCRIPTION: * This file contains the build configuration script for the PA LLD * and is responsible for configuration of the paths for the various * tools required to build the driver. * * Copyright (C) 2009-2013, Texas Instruments, Inc. *****************************************************************************/ /* Get the Tools Base directory from the Environment Variable. */ var xdcTargetType = java.lang.System.getenv("XDCTARGET"); var toolsBaseDir = java.lang.System.getenv("XDCCGROOT"); /* Check if we need to create the Makefiles? */ var miniBuild = java.lang.System.getenv("MINI_PACKAGE"); /* Get the extended debug flags */ var extDbgFlags = java.lang.System.getenv("EXTDBGFLAGS"); /* Get the base directory for the PA LLD Package */ var palldPath = new java.io.File(".//").getPath(); /* This is the part Number for which the PA LLD is being created */ var palldPartNumber = java.lang.System.getenv("PARTNO"); if(palldPartNumber == null) { palldPartNumber = "c6616"; } /* Include Path */ var palldIncPath = " -i" + palldPath; /* Configure the PA LLD Version Information */ /* 3 steps: remove SPACE and TAB, convert to string and split to make array */ var palldReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(','); /* PA LLD Coverity Analysis: Check the environment variable to determine if Static * Analysis has to be done on the driver Code base or not? */ var paCoverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE"); if(xdcTargetType == "ARM11") { /* Set path to the ARM11 tools directory */ var TIArmv6le = xdc.useModule('ti.targets.arm.Arm11'); TIArmv6le.rootDir = toolsBaseDir; TIArmv6le.ccOpts.prefix = "-O2 -DDEVICE_K2L" /* Set path to the ARM11 tools directory */ var TIArmv6be = xdc.useModule('ti.targets.arm.Arm11_big_endian'); TIArmv6be.rootDir = toolsBaseDir; TIArmv6be.ccOpts.prefix = "-O2 -DDEVICE_K2L -DBIGENDIAN" } else { /* C66 ELF compiler configuration for Little Endian Mode. */ var C66LE = xdc.useModule('ti.targets.elf.C66'); C66LE.rootDir = toolsBaseDir; C66LE.ccOpts.prefix = "-mo -g -q -k -eo.o"; if(extDbgFlags) C66LE.ccOpts.prefix = C66LE.ccOpts.prefix + " " + extDbgFlags; /* 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 -g -q -k -eo.o -DBIGENDIAN"; if(extDbgFlags) C66BE.ccOpts.prefix = C66BE.ccOpts.prefix + " " + extDbgFlags; } /* 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 file = xdc.module('xdc.services.io.File'); var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH"); var cfgBase = file.getDOSPath(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; } if (miniBuild == "ON") { 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. */ if(xdcTargetType == "ARM11") { Build.targets = [ TIArmv6le, TIArmv6be ]; } else { Build.targets = [ C66LE, C66BE ]; }