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