1 /******************************************************************************\r
2 * FILE PURPOSE: Build configuration Script for the TCP3D 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 TCP3D driver\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) 2011, 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("XDCCGROOT");\r
19 \r
20 /* Get the base directory for the TCP3D Driver Package */\r
21 var tcp3dDriverPath = new java.io.File(".//").getPath();\r
22 \r
23 var tcp3dDriverInstallType;\r
24 \r
25 /* Read the part number from the environment variable. */\r
26 var tcp3dPartNumber = java.lang.System.getenv("PARTNO");\r
27 \r
28 if(tcp3dPartNumber == null)\r
29 {\r
30 tcp3dPartNumber = "keystone2";\r
31 }\r
32 \r
33 /* Include Path */\r
34 var tcp3dIncludePath = " -i" + tcp3dDriverPath + "/src" + " -i" + tcp3dDriverPath + " -i" + tcp3dDriverPath + "/test";\r
35 \r
36 /* Configure the TCP3D Release Version Information */\r
37 /* We use the information from compatibility key. It require 3 steps: */ \r
38 /* remove SPACE and TAB, convert to string and split to make array */\r
39 var tcp3dDriverReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');\r
40 \r
41 /* TCP3D Driver Coverity Analysis: Check the environment variable to determine if Static\r
42 * Analysis has to be done on the TCP3D Driver Code base or not? */\r
43 var tcp3dDriverCoverityAnalysis = java.lang.System.getenv("LLDCOV");\r
44 \r
45 /* C66 ELF compiler configuration for Little Endian Mode. */\r
46 var C66LE = xdc.useModule('ti.targets.elf.C66');\r
47 C66LE.rootDir = toolsBaseDir;\r
48 C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o";\r
49 \r
50 /* C66 ELF compiler configuration for Big Endian Mode. */\r
51 var C66BE = xdc.useModule('ti.targets.elf.C66_big_endian');\r
52 C66BE.rootDir = toolsBaseDir;\r
53 C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o";\r
54 \r
55 /* Check if we need to run the STATIC Analysis or not? */\r
56 var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
57 \r
58 /* Setup the Coverity Filters to perform Static Analysis. */\r
59 if (coverityAnalysis == "ON") {\r
60 var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");\r
61 var cfgBase = xdc.getPackageBase("tisb.coverity.filters") + "cfg";\r
62 \r
63 var coverityFilter = [\r
64 {\r
65 moduleName: "tisb.coverity.filters.Coverity",\r
66 params: {\r
67 cfgDir: cfgBase, // The Coverity configuration file directory\r
68 rootDir: coverityInstallPath,\r
69 outDir: xdc.csd() + "cov_out",\r
70 analyzeLibs: true\r
71 }\r
72 },\r
73 ];\r
74 \r
75 /* Run the coverity filters on the LE Build only. */\r
76 C66LE.profiles["release"].filters = coverityFilter;\r
77 }\r
78 \r
79 /* Check if we need to create the Makefiles? */\r
80 var miniBuild = java.lang.System.getenv("MINI_PACKAGE");\r
81 \r
82 if (miniBuild == "ON")\r
83 {\r
84 /* Add the filter for simple Makefile generation. */\r
85 var makeC66LEFilter = {\r
86 moduleName: "build.filter.Make",\r
87 params: {\r
88 makefileName: "simpleC66LE.mak",\r
89 }\r
90 };\r
91 C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter;\r
92 \r
93 var makeC66BEFilter = {\r
94 moduleName: "build.filter.Make",\r
95 params: {\r
96 makefileName: "simpleC66BE.mak",\r
97 }\r
98 };\r
99 C66BE.profiles["release"].filters[C66BE.profiles["release"].filters.length++] = makeC66BEFilter;\r
100 }\r
101 \r
102 /* List all the build targets here. */\r
103 Build.targets = [ C66LE, C66BE ];\r
104 \r