]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/transport/bmet_eth/config.bld
transport: add to PDK
[processor-sdk/pdk.git] / packages / ti / transport / bmet_eth / config.bld
1 /******************************************************************************\r
2  * FILE PURPOSE: Build configuration Script for the BMET Eth\r
3  ******************************************************************************\r
4  * FILE NAME: config.bld\r
5  *\r
6  * DESCRIPTION: \r
7  *  This file contains the build configuration script for BMET Eth \r
8  *  and is responsible for configuration of the paths for the various tools\r
9  *  required to build BMET Eth.\r
10  *\r
11  * Copyright (C) 2012, Texas Instruments, Inc.\r
12  *****************************************************************************/\r
13 \r
14 /* Get the Tools Base directory from the Environment Variable. */\r
15 var xdcTargetType = java.lang.System.getenv("XDCTARGET");\r
16 var toolsBaseDir = java.lang.System.getenv("C6X_GEN_INSTALL_PATH");\r
17 \r
18 /* Check if we need to create the Makefiles? */\r
19 var miniBuild = java.lang.System.getenv("MINI_PACKAGE");\r
20 \r
21 /* Get the base directory for the BMET Eth Package */\r
22 var bmetethPath = new java.io.File(".//").getPath();\r
23 \r
24 /* This is the part Number for which the BMET ETH is being created */\r
25 var bmetethPartNumber = java.lang.System.getenv("PARTNO");\r
26 \r
27 if(bmetethPartNumber == null)\r
28 {\r
29     bmetethPartNumber = "c6614";\r
30 }\r
31 \r
32 \r
33 /* Include Path */\r
34 var bmetethIncPath = " -i" + bmetethPath;\r
35 \r
36 /* Configure the BMET Eth Release Version Information */\r
37 var bmetethReleaseVersion = [01,00,00,03];\r
38 \r
39 /* BMET Eth Coverity Analysis: Check the environment variable to determine if Static\r
40  * Analysis has to be done on the BMET Eth Code base or not? */\r
41 var bmetethCoverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
42 \r
43 if(xdcTargetType ==  "ARM11") \r
44\r
45     /* Set path to the ARM11 tools directory */\r
46     var TIArmv6le            = xdc.useModule('ti.targets.arm.Arm11');\r
47     TIArmv6le.rootDir        = toolsBaseDir; \r
48     TIArmv6le.ccOpts.prefix  = "-O2 "  \r
49 \r
50     /* Set path to the ARM11 tools directory */\r
51     var TIArmv6be            = xdc.useModule('ti.targets.arm.Arm11_big_endian');\r
52     TIArmv6be.rootDir        = toolsBaseDir; \r
53     TIArmv6be.ccOpts.prefix  = "-O2 -DBIGENDIAN"  \r
54 }\r
55 else\r
56 {\r
57     \r
58     /* C66 ELF compiler configuration for Little Endian Mode. */\r
59     var C66LE          = xdc.useModule('ti.targets.elf.C66');\r
60     C66LE.rootDir       = toolsBaseDir;\r
61     C66LE.ccOpts.prefix  = "-mo -o3 -q -k -eo.o";\r
62 \r
63 }\r
64 \r
65 /* Check if we need to run the STATIC Analysis or not? */\r
66 var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
67 \r
68 /* Setup the Coverity Filters to perform Static Analysis. */\r
69 if (coverityAnalysis == "ON") {\r
70     var file = xdc.module('xdc.services.io.File');\r
71         var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");\r
72         \r
73     var cfgBase = file.getDOSPath(xdc.getPackageBase("tisb.coverity.filters")) + "cfg";\r
74 \r
75     var coverityFilter = [\r
76     {\r
77         moduleName: "tisb.coverity.filters.Coverity",\r
78         params: {\r
79             cfgDir:  cfgBase,  // The Coverity configuration file directory\r
80             rootDir: coverityInstallPath,\r
81             outDir: xdc.csd() + "cov_out",\r
82             analyzeLibs: true\r
83         }\r
84     },\r
85     ];\r
86 \r
87     /* Run the coverity filters on the LE Build only. */\r
88     C66LE.profiles["release"].filters = coverityFilter;\r
89 }\r
90 \r
91 if (miniBuild == "ON") {\r
92 \r
93     var makeC66LEFilter = {\r
94         moduleName: "build.filter.Make",\r
95         params: {\r
96           makefileName: "simpleC66LE.mak",\r
97         }\r
98     };\r
99 \r
100     C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter;\r
101 \r
102 }\r
103 /* List all the build targets here. */\r
104 if(xdcTargetType == "ARM11")\r
105 {\r
106     Build.targets = [ TIArmv6le, TIArmv6be ];\r
107 }\r
108 else\r
109 {\r
110     Build.targets = [ C66LE ];\r
111 }    \r
112 \r