/****************************************************************************** * FILE PURPOSE: Build configuration Script for the TraceFramework Driver ****************************************************************************** * FILE NAME: config.bld * * DESCRIPTION: * This file contains the build configuration script for the TraceFramework driver * and is responsible for configuration of the paths for the various * tools required to build the driver. * * Copyright (C) 2011-2014, Texas Instruments, Inc. *****************************************************************************/ var Build = xdc.useModule('xdc.bld.BuildEnvironment'); print (Build.hostOSName); /* Get the Tools Base directory from the Environment Variable. */ var toolsBaseDir = java.lang.System.getenv("XDCCGROOT"); /* Get the base directory for the TraceFramework Socket Driver Package */ var tfDriverPath = new java.io.File(".//").getPath(); /* Read the part number from the environment variable. */ var tfLLDPartNumber = java.lang.System.getenv("SOC_FAMILY"); /* Get the extended debug flags */ var extDbgFlags = java.lang.System.getenv("EXTDBGFLAGS"); /* Configure the TraceFramework Socket Release Version Information */ var tfDriverReleaseVersion = [01,01,01,05]; var pkgName = Pkg.name; var tiCcopts = "--verbose_diagnostics --display_error_number --diag_error=225 -k --diag_error=9 --diag_warning=179 --diag_remark=880 --diag_remark=188 --mem_model:data=far"; var tiDefs = " "; var tiIncs = " " ; if (tfLLDPartNumber == "KeyStone2") { tiCcopts = tiCcopts + " -DK2 "; tfLLDPartNumber = "K2"; } /* Add support for Logger Streamer 2 */ tiCcopts = tiCcopts + " -dTF_SUP_LOGGERSTREAMER2" + " -dTF_STREAM_FREEZE_PRODUCER_SUPPORT"; var tiCcopts_le = tiCcopts + " -mo -o3 -q"; var tiCcopts_be = tiCcopts + " -mo -o3 -q -D_BIG_ENDIAN"; /* C66 ELF compiler configuration for Little Endian Mode. */ var C66LE = xdc.useModule('ti.targets.elf.C66'); C66LE.rootDir = toolsBaseDir; C66LE.ccOpts.prefix = tiCcopts_le; 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 = tiCcopts_be; 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 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") { 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 ];