1 /******************************************************************************\r
2 * FILE PURPOSE: Build configuration Script for the BCP Driver\r
3 ******************************************************************************\r
4 * FILE NAME: config.bld\r
5 *\r
6 * DESCRIPTION: \r
7 * This file contains the build configuration script for the BCP\r
8 * and is responsible for configuration of the paths for the various \r
9 * tools required to build the driver.\r
10 *\r
11 * Copyright (C) 2012, 2014 Texas Instruments, Inc.\r
12 *****************************************************************************/\r
13 \r
14 /* Set package attribute as ZIP or TAR */\r
15 Pkg.attrs.archiver = "tar";\r
16 \r
17 /* Get the Tools Base directory from the Environment Variable. */\r
18 var toolsBaseDir = java.lang.System.getenv("C6X_GEN_INSTALL_PATH");\r
19 \r
20 /* Get the base directory for the BCP Driver Package */\r
21 var lldPath = new java.io.File(".//").getPath();\r
22 \r
23 /* Get the extended debug flags */\r
24 var extDbgFlags = java.lang.System.getenv("EXTDBGFLAGS");\r
25 \r
26 var lldInstallType;\r
27 \r
28 /* Read the part number from the environment variable. */\r
29 var lldPartNumber = java.lang.System.getenv("PARTNO");\r
30 \r
31 /* Include Path */\r
32 var lldIncludePath = " -i" + lldPath + "/src" + " -i" + lldPath + " -i" + lldPath + "/test";\r
33 \r
34 /* Configure the BCP Driver Release Version Information */\r
35 /* 3 steps: remove SPACE and TAB, convert to string and split to make array */\r
36 var lldReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');\r
37 \r
38 /* BCP Driver Coverity Analysis: Check the environment variable to determine if Static\r
39 * Analysis has to be done on the BCP Driver Code base or not? */\r
40 var lldCoverityAnalysis = java.lang.System.getenv("LLDCOV");\r
41 \r
42 /* C66 compiler configuration for Little Endian Mode + ELF build. */\r
43 var C66LE = xdc.useModule('ti.targets.elf.C66');\r
44 C66LE.rootDir = toolsBaseDir;\r
45 C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o";\r
46 if(extDbgFlags)\r
47 C66LE.ccOpts.prefix = C66LE.ccOpts.prefix + " " + extDbgFlags; \r
48 \r
49 /* Check if we need to run the STATIC Analysis or not? */\r
50 var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
51 \r
52 /* Setup the Coverity Filters to perform Static Analysis. */\r
53 if (coverityAnalysis == "ON") {\r
54 var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");\r
55 var cfgBase = xdc.getPackageBase("tisb.coverity.filters") + "cfg";\r
56 \r
57 var coverityFilter = [\r
58 {\r
59 moduleName: "tisb.coverity.filters.Coverity",\r
60 params: {\r
61 cfgDir: cfgBase, // The Coverity configuration file directory\r
62 rootDir: coverityInstallPath,\r
63 outDir: xdc.csd() + "cov_out",\r
64 analyzeLibs: true\r
65 }\r
66 },\r
67 ];\r
68 \r
69 /* Run the coverity filters on the C66 LE ELF Build only. */\r
70 C66LE.profiles["release"].filters = coverityFilter;\r
71 }\r
72 \r
73 /* Check if we need to create the Makefiles? */\r
74 var miniBuild = java.lang.System.getenv("MINI_PACKAGE");\r
75 if (miniBuild == "ON")\r
76 {\r
77 /* Add the filter for simple Makefile generation. Generate mini filters for C66 ELF only. */\r
78 var makeC66LEFilter = {\r
79 moduleName: "build.filter.Make",\r
80 params: {\r
81 makefileName: "simpleC66LE.mak",\r
82 }\r
83 };\r
84 \r
85 C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter;\r
86 \r
87 }\r
88 \r
89 /* List all the build targets here. */\r
90 Build.targets = [ C66LE ];\r