1 /******************************************************************************
2 * FILE PURPOSE: Build configuration Script for the PA LLD
3 ******************************************************************************
4 * FILE NAME: config.bld
5 *
6 * DESCRIPTION:
7 * This file contains the build configuration script for the PA LLD
8 * and is responsible for configuration of the paths for the various
9 * tools required to build the driver.
10 *
11 * Copyright (C) 2009-2013, Texas Instruments, Inc.
12 *****************************************************************************/
14 /* Get the Tools Base directory from the Environment Variable. */
15 var xdcTargetType = java.lang.System.getenv("XDCTARGET");
16 var toolsBaseDir = java.lang.System.getenv("XDCCGROOT");
18 /* Check if we need to create the Makefiles? */
19 var miniBuild = java.lang.System.getenv("MINI_PACKAGE");
21 /* Get the base directory for the PA LLD Package */
22 var palldPath = new java.io.File(".//").getPath();
24 /* This is the part Number for which the PA LLD is being created */
25 var palldPartNumber = java.lang.System.getenv("PARTNO");
27 if(palldPartNumber == null)
28 {
29 palldPartNumber = "c6616";
30 }
32 /* Include Path */
33 var palldIncPath = " -i" + palldPath;
35 /* Configure the PA LLD Version Information */
36 /* 3 steps: remove SPACE and TAB, convert to string and split to make array */
37 var palldReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');
39 /* PA LLD Coverity Analysis: Check the environment variable to determine if Static
40 * Analysis has to be done on the driver Code base or not? */
41 var paCoverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");
43 if(xdcTargetType == "ARM11")
44 {
45 /* Set path to the ARM11 tools directory */
46 var TIArmv6le = xdc.useModule('ti.targets.arm.Arm11');
47 TIArmv6le.rootDir = toolsBaseDir;
48 TIArmv6le.ccOpts.prefix = "-O2 -DDEVICE_K2L"
50 /* Set path to the ARM11 tools directory */
51 var TIArmv6be = xdc.useModule('ti.targets.arm.Arm11_big_endian');
52 TIArmv6be.rootDir = toolsBaseDir;
53 TIArmv6be.ccOpts.prefix = "-O2 -DDEVICE_K2L -DBIGENDIAN"
54 }
55 else
56 {
58 /* C66 ELF compiler configuration for Little Endian Mode. */
59 var C66LE = xdc.useModule('ti.targets.elf.C66');
60 C66LE.rootDir = toolsBaseDir;
61 C66LE.ccOpts.prefix = "-mo -o1 -q -k -eo.o";
63 /* C66 ELF compiler configuration for Big Endian Mode. */
64 var C66BE = xdc.useModule('ti.targets.elf.C66_big_endian');
65 C66BE.rootDir = toolsBaseDir;
66 C66BE.ccOpts.prefix = "-mo -o1 -q -k -eo.o -DBIGENDIAN";
68 }
70 /* Check if we need to run the STATIC Analysis or not? */
71 var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");
73 /* Setup the Coverity Filters to perform Static Analysis. */
74 if (coverityAnalysis == "ON") {
75 var file = xdc.module('xdc.services.io.File');
76 var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");
78 var cfgBase = file.getDOSPath(xdc.getPackageBase("tisb.coverity.filters")) + "cfg";
80 var coverityFilter = [
81 {
82 moduleName: "tisb.coverity.filters.Coverity",
83 params: {
84 cfgDir: cfgBase, // The Coverity configuration file directory
85 rootDir: coverityInstallPath,
86 outDir: xdc.csd() + "cov_out",
87 analyzeLibs: true
88 }
89 },
90 ];
92 /* Run the coverity filters on the LE Build only. */
93 C66LE.profiles["release"].filters = coverityFilter;
94 }
96 if (miniBuild == "ON") {
98 var makeC66LEFilter = {
99 moduleName: "build.filter.Make",
100 params: {
101 makefileName: "simpleC66LE.mak",
102 }
103 };
105 C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter;
108 var makeC66BEFilter = {
109 moduleName: "build.filter.Make",
110 params: {
111 makefileName: "simpleC66BE.mak",
112 }
113 };
115 C66BE.profiles["release"].filters[C66BE.profiles["release"].filters.length++] = makeC66BEFilter;
118 }
119 /* List all the build targets here. */
120 if(xdcTargetType == "ARM11")
121 {
122 Build.targets = [ TIArmv6le, TIArmv6be ];
123 }
124 else
125 {
126 Build.targets = [ C66LE, C66BE ];
127 }