1 /******************************************************************************
2 * FILE PURPOSE: Build configuration Script for the Fault Management
3 ******************************************************************************
4 * FILE NAME: config.bld
5 *
6 * DESCRIPTION:
7 * This file contains the build configuration script for Fault Management
8 * and is responsible for configuration of the paths for the various tools
9 * required to build Fault Management.
10 *
11 * Copyright (C) 2012-2014, Texas Instruments, Inc.
12 *****************************************************************************/
14 /* Get the Tools Base directory from the Environment Variable. */
15 var toolsBaseDir = java.lang.System.getenv("XDCCGROOT");
17 /* Get the base directory for the RM LLD Package */
18 var fault_mgmtlibPath = new java.io.File(".//").getPath();
20 var fault_mgmtlibInstallType;
22 /* Read the part number from the environment variable. */
23 var fault_mgmtlibPartNumber = java.lang.System.getenv("PARTNO");
25 /* Read the SOC family from the environment variable. */
26 var fault_mgmtlibSocFamily = java.lang.System.getenv("SOC_FAMILY");
27 if (fault_mgmtlibSocFamily == null) {
28 fault_mgmtlibSocFamily = "";
29 }
31 /* Include Path */
32 var fault_mgmtlibIncludePath = " -i" + fault_mgmtlibPath + "/src" + " -i" + fault_mgmtlibPath + " -i" + fault_mgmtlibPath + "/test";
34 /* Configure the Fault Management Release Version Information */
35 /* 3 steps: remove SPACE and TAB, convert to string and split to make array */
36 var fault_mgmtlibReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');
38 /* Fault Management Coverity Analysis: Check the environment variable to determine if Static
39 * Analysis has to be done on the Fault Management Code base or not? */
40 var fault_mgmtlibCoverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");
42 /* C66 ELF compiler configuration for Little Endian Mode. */
43 var C66LE = xdc.useModule('ti.targets.elf.C66');
44 C66LE.rootDir = toolsBaseDir;
45 C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o";
47 /* C66 ELF compiler configuration for Big Endian Mode. */
48 var C66BE = xdc.useModule('ti.targets.elf.C66_big_endian');
49 C66BE.rootDir = toolsBaseDir;
50 C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o -DBIGENDIAN";
52 /* Check if we need to run the STATIC Analysis or not? */
53 var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");
55 /* Setup the Coverity Filters to perform Static Analysis. */
56 if (coverityAnalysis == "ON") {
57 var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");
58 var cfgBase = xdc.getPackageBase("tisb.coverity.filters") + "cfg";
60 var coverityFilter = [
61 {
62 moduleName: "tisb.coverity.filters.Coverity",
63 params: {
64 cfgDir: cfgBase, // The Coverity configuration file directory
65 rootDir: coverityInstallPath,
66 outDir: xdc.csd() + "cov_out",
67 analyzeLibs: true
68 }
69 },
70 ];
72 /* Run the coverity filters on the LE Build only. */
73 C66LE.profiles["release"].filters = coverityFilter;
74 }
76 /* Check if we need to create the Makefiles? */
77 var miniBuild = java.lang.System.getenv("MINI_PACKAGE");
79 if (miniBuild == "ON")
80 {
81 /* Add the filter for simple Makefile generation. */
83 var makeC66LEFilter = {
84 moduleName: "build.filter.Make",
85 params: {
86 makefileName: "simpleC66LE.mak",
87 }
88 };
90 C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter;
92 var makeC66BEFilter = {
93 moduleName: "build.filter.Make",
94 params: {
95 makefileName: "simpleC66BE.mak",
96 }
97 };
99 C66BE.profiles["release"].filters[C66BE.profiles["release"].filters.length++] = makeC66BEFilter;
101 }
103 /* List all the build targets here. */
104 Build.targets = [ C66LE, C66BE ];
106 /* List of all devices that combine to make the fault_mgmt library. */
107 var devices = [ "tci6614/c66", "k2h/c66", "k2k/c66", "k2e/c66", "k2l/c66" ];
109 /* Order must exactly match list in "var devices" */
110 var devicesCCOpt = [ "", " -DDEVICE_K2H", " -DDEVICE_K2K", " -DDEVICE_K2E", " -DDEVICE_K2L"];
112 /* Order must exactly match list in "var devices" */
113 var devicesSocFamily = [ "", "KeyStone2", "KeyStone2", "KeyStone2", "KeyStone2"];