summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Batni2015-10-27 13:45:06 -0500
committerAravind Batni2015-10-27 13:45:06 -0500
commit5d602b948d661d95ced397bfb900d48fdc354aac (patch)
tree2fca2478025f5f76bf8b3d38f9093fad1c479449
parenta26b771cc6647a7a2172d3d5e91830eaf1acd2ff (diff)
downloadhyplnk-lld-5d602b948d661d95ced397bfb900d48fdc354aac.tar.gz
hyplnk-lld-5d602b948d661d95ced397bfb900d48fdc354aac.tar.xz
hyplnk-lld-5d602b948d661d95ced397bfb900d48fdc354aac.zip
fixed CGT tool install variable for yocto
-rw-r--r--config.bld378
-rw-r--r--[-rwxr-xr-x]docs/Module.xs1
2 files changed, 189 insertions, 190 deletions
diff --git a/config.bld b/config.bld
index aafb70f..a36cd2e 100644
--- a/config.bld
+++ b/config.bld
@@ -1,200 +1,200 @@
1/****************************************************************************** 1/******************************************************************************
2 * FILE PURPOSE: Build configuration Script for the hyplnk LLD 2 * FILE PURPOSE: Build configuration Script for the hyplnk LLD
3 ****************************************************************************** 3 ******************************************************************************
4 * FILE NAME: config.bld 4 * FILE NAME: config.bld
5 * 5 *
6 * DESCRIPTION: 6 * DESCRIPTION:
7 * This file contains the build configuration script for the hyplnk LLD 7 * This file contains the build configuration script for the hyplnk LLD
8 * and is responsible for configuration of the paths for the various 8 * and is responsible for configuration of the paths for the various
9 * tools required to build the driver. 9 * tools required to build the driver.
10 * 10 *
11 * Copyright (C) 2009-2014, Texas Instruments, Inc. 11 * Copyright (C) 2009-2014, Texas Instruments, Inc.
12 *****************************************************************************/ 12 *****************************************************************************/
13 13
14/* Get the Tools Base directory from the Environment Variable. */ 14/* Get the Tools Base directory from the Environment Variable. */
15var toolsBaseDir = java.lang.System.getenv("XDCCGROOT"); 15var toolsBaseDir = java.lang.System.getenv("C6X_GEN_INSTALL_PATH");
16 16
17/* Check if we need to create the Makefiles? */ 17/* Check if we need to create the Makefiles? */
18var miniBuild = java.lang.System.getenv("MINI_PACKAGE"); 18var miniBuild = java.lang.System.getenv("MINI_PACKAGE");
19 19
20/* Get the extended debug flags */ 20/* Get the extended debug flags */
21var extDbgFlags = java.lang.System.getenv("EXTDBGFLAGS"); 21var extDbgFlags = java.lang.System.getenv("EXTDBGFLAGS");
22 22
23/* Get the base directory for the hyplnk LLD Package */ 23/* Get the base directory for the hyplnk LLD Package */
24var hyplnklldPath = new java.io.File(".//").getPath(); 24var hyplnklldPath = new java.io.File(".//").getPath();
25 25
26/* This is the part number for which the hyplnk LLD is being created */ 26/* This is the part number for which the hyplnk LLD is being created */
27var hyplnklldPartNumber = java.lang.System.getenv("PARTNO"); 27var hyplnklldPartNumber = java.lang.System.getenv("PARTNO");
28 28
29if(hyplnklldPartNumber == null) 29if(hyplnklldPartNumber == null)
30{ 30{
31 hyplnklldPartNumber = "keystone2"; 31 hyplnklldPartNumber = "keystone2";
32} 32}
33 33
34/* Include Path */ 34/* Include Path */
35var hyplnklldIncPath = " -i" + hyplnklldPath; 35var hyplnklldIncPath = " -i" + hyplnklldPath;
36 36
37/* Configure the hyplnk LLD Version Information */ 37/* Configure the hyplnk LLD Version Information */
38/* 3 steps: remove SPACE and TAB, convert to string and split to make array */ 38/* 3 steps: remove SPACE and TAB, convert to string and split to make array */
39var hyplnklldReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(','); 39var hyplnklldReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');
40 40
41/* hyplnk LLD Coverity Analysis: Check the environment variable to determine if Static 41/* hyplnk LLD Coverity Analysis: Check the environment variable to determine if Static
42 * Analysis has to be done on the driver Code base or not? */ 42 * Analysis has to be done on the driver Code base or not? */
43var hyplnkCoverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE"); 43var hyplnkCoverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");
44 44
45/* C66 ELF compiler configuration for Little Endian Mode. */ 45/* C66 ELF compiler configuration for Little Endian Mode. */
46var C66LE = xdc.useModule('ti.targets.elf.C66'); 46var C66LE = xdc.useModule('ti.targets.elf.C66');
47C66LE.rootDir = toolsBaseDir; 47C66LE.rootDir = toolsBaseDir;
48C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o"; 48C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o";
49if(extDbgFlags) 49if(extDbgFlags)
50 C66LE.ccOpts.prefix = C66LE.ccOpts.prefix + " " + extDbgFlags; 50 C66LE.ccOpts.prefix = C66LE.ccOpts.prefix + " " + extDbgFlags;
51 51
52/* C66 ELF compiler configuration for Big Endian Mode. */ 52/* C66 ELF compiler configuration for Big Endian Mode. */
53var C66BE = xdc.useModule('ti.targets.elf.C66_big_endian'); 53var C66BE = xdc.useModule('ti.targets.elf.C66_big_endian');
54C66BE.rootDir = toolsBaseDir; 54C66BE.rootDir = toolsBaseDir;
55C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o -DBIGENDIAN"; 55C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o -DBIGENDIAN";
56if(extDbgFlags) 56if(extDbgFlags)
57 C66BE.ccOpts.prefix = C66BE.ccOpts.prefix + " " + extDbgFlags; 57 C66BE.ccOpts.prefix = C66BE.ccOpts.prefix + " " + extDbgFlags;
58 58
59 59
60 60
61/* device name (k2?) is inserted between first an second element of this 61/* device name (k2?) is inserted between first an second element of this
62 list to construct device file name for each device */ 62 list to construct device file name for each device */
63var deviceConstruct = [ "device/", "/src/hyplnk_device.c" ]; 63var deviceConstruct = [ "device/", "/src/hyplnk_device.c" ];
64 64
65/* Create the SoC List */ 65/* Create the SoC List */
66var socs = { 66var socs = {
67 /* device independent libraries */ 67 /* device independent libraries */
68 all : 68 all :
69 { 69 {
70 /* Build this library */ 70 /* Build this library */
71 build: "true", 71 build: "true",
72 /* SoC lib disabled as this is device independent lib */ 72 /* SoC lib disabled as this is device independent lib */
73 socDevLib: "false", 73 socDevLib: "false",
74 /* Library options */ 74 /* Library options */
75 copts: "", 75 copts: "",
76 /* target lists, kept blank now, would be updated based on argument lists */ 76 /* target lists, kept blank now, would be updated based on argument lists */
77 targets: [] 77 targets: []
78 }, 78 },
79 k2h : 79 k2h :
80 { 80 {
81 /* this variable would be reinitialized to true, if XDCARGS contains k2h */ 81 /* this variable would be reinitialized to true, if XDCARGS contains k2h */
82 build: "false", 82 build: "false",
83 /* SoC lib enabled */ 83 /* SoC lib enabled */
84 socDevLib: "true", 84 socDevLib: "true",
85 /* Library options */ 85 /* Library options */
86 copts: " -DDEVICE_K2H -DSOC_K2H", 86 copts: " -DDEVICE_K2H -DSOC_K2H",
87 /* target list */ 87 /* target list */
88 targets: [ C66LE, C66BE ] 88 targets: [ C66LE, C66BE ]
89 }, 89 },
90 k2k : 90 k2k :
91 { 91 {
92 /* this variable would be reinitialized to true, if XDCARGS contains k2k */ 92 /* this variable would be reinitialized to true, if XDCARGS contains k2k */
93 build: "false", 93 build: "false",
94 /* SoC lib enabled */ 94 /* SoC lib enabled */
95 socDevLib: "true", 95 socDevLib: "true",
96 /* Library options */ 96 /* Library options */
97 copts: " -DDEVICE_K2K -DSOC_K2K", 97 copts: " -DDEVICE_K2K -DSOC_K2K",
98 /* target list */ 98 /* target list */
99 targets: [ C66LE, C66BE ] 99 targets: [ C66LE, C66BE ]
100 }, 100 },
101 k2e : 101 k2e :
102 { 102 {
103 /* this variable would be reinitialized to true, if XDCARGS contains k2e */ 103 /* this variable would be reinitialized to true, if XDCARGS contains k2e */
104 build: "false", 104 build: "false",
105 /* SoC lib enabled */ 105 /* SoC lib enabled */
106 socDevLib: "true", 106 socDevLib: "true",
107 /* Library options */ 107 /* Library options */
108 copts: " -DDEVICE_K2E -DSOC_K2E", 108 copts: " -DDEVICE_K2E -DSOC_K2E",
109 /* target list */ 109 /* target list */
110 targets: [ C66LE, C66BE ] 110 targets: [ C66LE, C66BE ]
111 }, 111 },
112 c6678 : 112 c6678 :
113 { 113 {
114 /* this variable would be reinitialized to true, if XDCARGS contains c6678 */ 114 /* this variable would be reinitialized to true, if XDCARGS contains c6678 */
115 build: "false", 115 build: "false",
116 /* SoC lib enabled */ 116 /* SoC lib enabled */
117 socDevLib: "true", 117 socDevLib: "true",
118 /* Library options */ 118 /* Library options */
119 copts: " -DSOC_C6678", 119 copts: " -DSOC_C6678",
120 /* target list */ 120 /* target list */
121 targets: [ C66LE, C66BE ] 121 targets: [ C66LE, C66BE ]
122 }, 122 },
123 c6657 : 123 c6657 :
124 { 124 {
125 /* this variable would be reinitialized to true, if XDCARGS contains c6657 */ 125 /* this variable would be reinitialized to true, if XDCARGS contains c6657 */
126 build: "false", 126 build: "false",
127 /* SoC lib enabled */ 127 /* SoC lib enabled */
128 socDevLib: "true", 128 socDevLib: "true",
129 /* Library options */ 129 /* Library options */
130 copts: " -DSOC_C6657", 130 copts: " -DSOC_C6657",
131 /* target list */ 131 /* target list */
132 targets: [ C66LE, C66BE ] 132 targets: [ C66LE, C66BE ]
133 }, 133 },
134}; 134};
135 135
136/************************************************************************** 136/**************************************************************************
137 * FUNCTION NAME : merge 137 * FUNCTION NAME : merge
138 ************************************************************************** 138 **************************************************************************
139 * DESCRIPTION : 139 * DESCRIPTION :
140 * The function is used to merge two arrarys 140 * The function is used to merge two arrarys
141 **************************************************************************/ 141 **************************************************************************/
142function merge() { 142function merge() {
143 var args = arguments; 143 var args = arguments;
144 var hash = {}; 144 var hash = {};
145 var arr = []; 145 var arr = [];
146 for (var i = 0; i < args.length; i++) { 146 for (var i = 0; i < args.length; i++) {
147 for (var j = 0; j < args[i].length; j++) { 147 for (var j = 0; j < args[i].length; j++) {
148 if (hash[args[i][j]] !== true) { 148 if (hash[args[i][j]] !== true) {
149 arr[arr.length] = args[i][j]; 149 arr[arr.length] = args[i][j];
150 hash[args[i][j]] = true; 150 hash[args[i][j]] = true;
151 } 151 }
152 } 152 }
153 } 153 }
154 return arr; 154 return arr;
155} 155}
156 156
157/* Grab input from XDCARGS */ 157/* Grab input from XDCARGS */
158var buildArguments = []; 158var buildArguments = [];
159 159
160/* Construct the build arguments */ 160/* Construct the build arguments */
161for (var tmp=0; arguments[tmp] != undefined; tmp++) 161for (var tmp=0; arguments[tmp] != undefined; tmp++)
162{ 162{
163 163
164 /* If no arguments are provided, override for building all */ 164 /* If no arguments are provided, override for building all */
165 if ( ( arguments.length == 1) && (arguments[tmp].equals("./config.bld")) ) 165 if ( ( arguments.length == 1) && (arguments[tmp].equals("./config.bld")) )
166 buildArguments[buildArguments.length++] = "all"; 166 buildArguments[buildArguments.length++] = "all";
167 else 167 else
168 buildArguments[buildArguments.length++] = arguments[tmp]; 168 buildArguments[buildArguments.length++] = arguments[tmp];
169} 169}
170 170
171/* Build targets on this build */ 171/* Build targets on this build */
172var build_targets = []; 172var build_targets = [];
173var soc_names = Object.keys(socs); 173var soc_names = Object.keys(socs);
174 174
175for (var i=0; i < buildArguments.length; i++ ) { 175for (var i=0; i < buildArguments.length; i++ ) {
176 /* Build it for all targets */ 176 /* Build it for all targets */
177 if (buildArguments[i] == "all") { 177 if (buildArguments[i] == "all") {
178 for (var j = 0; j < soc_names.length; j++) { 178 for (var j = 0; j < soc_names.length; j++) {
179 build_targets = merge (build_targets.slice(0), socs[soc_names[j]].targets.slice(0)); 179 build_targets = merge (build_targets.slice(0), socs[soc_names[j]].targets.slice(0));
180 /* Set build to "true" for that SoC */ 180 /* Set build to "true" for that SoC */
181 socs[soc_names[j]].build = "true"; 181 socs[soc_names[j]].build = "true";
182 } 182 }
183 } 183 }
184 else { 184 else {
185 /* Skip the first argument, which is ./config.bld to get to next SoCs */ 185 /* Skip the first argument, which is ./config.bld to get to next SoCs */
186 if (i == 0) continue; 186 if (i == 0) continue;
187 /* Set that build to true if it is found in supported build socs */ 187 /* Set that build to true if it is found in supported build socs */
188 for (j = 0; j < soc_names.length; j++) { 188 for (j = 0; j < soc_names.length; j++) {
189 if (buildArguments[i] == soc_names[j]) { 189 if (buildArguments[i] == soc_names[j]) {
190 socs[buildArguments[i]].build = "true"; 190 socs[buildArguments[i]].build = "true";
191 build_targets = merge (build_targets.slice(0), socs[buildArguments[i]].targets.slice(0)); 191 build_targets = merge (build_targets.slice(0), socs[buildArguments[i]].targets.slice(0));
192 break; 192 break;
193 } 193 }
194 } 194 }
195 } 195 }
196} 196}
197 197
198/* Update the Build target generated list */ 198/* Update the Build target generated list */
199socs["all"].targets = build_targets; 199socs["all"].targets = build_targets;
200Build.targets = build_targets; 200Build.targets = build_targets;
diff --git a/docs/Module.xs b/docs/Module.xs
index 1cc47e1..d69fa1c 100755..100644
--- a/docs/Module.xs
+++ b/docs/Module.xs
@@ -30,7 +30,6 @@ function modBuild()
30 Pkg.makePrologue += "\t @echo -------------------------------------------------------\n"; 30 Pkg.makePrologue += "\t @echo -------------------------------------------------------\n";
31 31
32 /* Add the documentation file to the package. */ 32 /* Add the documentation file to the package. */
33 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/hyplnkDocs.chm";
34 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/tifooter.htm"; 33 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/tifooter.htm";
35 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/tiheader.htm"; 34 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/tiheader.htm";
36 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/tilogo.gif"; 35 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/tilogo.gif";