1 /*
2 * package.bld
3 *
4 * xdc build specification file for the RM package.
5 *
6 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
7 *
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 *
13 * Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the
19 * distribution.
20 *
21 * Neither the name of Texas Instruments Incorporated nor the names of
22 * its contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 */
38 var Build = xdc.useModule('xdc.bld.BuildEnvironment');
39 var Pkg = xdc.useModule('xdc.bld.PackageContents');
41 var objListDA830 = [
42 /* The configuration file. */
43 "src/configs/edma3_da830_cfg.c",
44 /* Common file. */
45 "src/edma3resmgr.c",
46 /* File defining internal data structures. */
47 "src/edma3_rm_gbl_data.c",
48 ];
50 var objListC6748 = [
51 /* The configuration file. */
52 "src/configs/edma3_c6748_cfg.c",
53 /* Common file. */
54 "src/edma3resmgr.c",
55 /* File defining internal data structures. */
56 "src/edma3_rm_gbl_data.c",
57 ];
59 var objListOMAPL138 = [
60 /* The configuration file. */
61 "src/configs/edma3_omapl138_cfg.c",
62 /* Common file. */
63 "src/edma3resmgr.c",
64 /* File defining internal data structures. */
65 "src/edma3_rm_gbl_data.c",
66 ];
68 var objListTI814X = [
69 /* The configuration file. */
70 "src/configs/edma3_ti814x_cfg.c",
71 /* Common file. */
72 "src/edma3resmgr.c",
73 /* File defining internal data structures. */
74 "src/edma3_rm_gbl_data.c",
75 ];
77 var objListSimTCI6498 = [
78 /* The configuration file. */
79 "src/configs/edma3_tci6498_cfg.c",
80 /* Common file. */
81 "src/edma3resmgr.c",
82 /* File defining internal data structures. */
83 "src/edma3_rm_gbl_data.c",
84 ];
86 var objListSimTI816X = [
87 /* The configuration file. */
88 "src/configs/edma3_ti816x_cfg.c",
89 /* Common file. */
90 "src/edma3resmgr.c",
91 /* File defining internal data structures. */
92 "src/edma3_rm_gbl_data.c",
93 ];
95 var objListEVMTI816X = [
96 /* The configuration file. */
97 "src/configs/edma3_ti816x_cfg.c",
98 /* Common file. */
99 "src/edma3resmgr.c",
100 /* File defining internal data structures. */
101 "src/edma3_rm_gbl_data.c",
102 ];
104 var objListEVM6472 = [
105 /* The configuration file. */
106 "src/configs/edma3_c6472_cfg.c",
107 /* Common file. */
108 "src/edma3resmgr.c",
109 /* File defining internal data structures. */
110 "src/edma3_rm_gbl_data.c",
111 ];
113 var objListEVMTCI6486 = [
114 /* The configuration file. */
115 "src/configs/edma3_tci6486_cfg.c",
116 /* Common file. */
117 "src/edma3resmgr.c",
118 /* File defining internal data structures. */
119 "src/edma3_rm_gbl_data.c",
120 ];
122 var objListGeneric = [
123 /* Common file. */
124 "src/edma3resmgr.c",
125 /* File defining internal data structures. */
126 "src/edma3_rm_gbl_data.c",
127 ];
130 var objList = [
131 objListDA830,
132 objListSimTCI6498,
133 objListC6748,
134 objListOMAPL138,
135 objListSimTI816X,
136 objListEVMTI816X,
137 objListEVM6472,
138 objListEVMTCI6486,
139 objListTI814X,
140 ];
142 /* Platforms supported */
143 var plat_supported = [
144 'ti.platforms.evmDA830',
145 'ti.platforms.simTCI6498',
146 'ti.platforms.evm6748',
147 'ti.platforms.evmOMAPL138',
148 'ti.platforms.simDM8168',
149 'ti.platforms.evmDM8168',
150 'ti.platforms.evm6472',
151 'ti.platforms.evmTCI6486',
152 'ti.platforms.evmDM8148',
153 ];
155 /* Directories for each platform */
156 var dir = [
157 'da830/',
158 'tci6498/',
159 'c6748/',
160 'omapl138/',
161 'simti816x/',
162 'evmti816x/',
163 'c6472/',
164 'tci6486/',
165 'ti814x/',
166 'generic/',
167 ];
169 for each (var targ in Build.targets)
170 {
171 for each (var plat in targ.platforms)
172 {
173 var lib = "lib/";
174 var bool = 0;
176 for (var i = 0; i < plat_supported.length; i++)
177 {
178 if (java.lang.String(plat).equals(plat_supported[i]))
179 {
180 /* Choose the selected platform */
181 lib = lib + dir[i];
182 bool = 1;
183 break;
184 }
185 }
187 if (bool == 0) {
188 //throw new Error('Unexpected value in "platform" parameter')
189 }
191 if (java.lang.String(targ.model.endian).equals("big")) {
192 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
193 { defs:"-DBIG_ENDIAN_MODE", profile: "debug"}
194 ).addObjects(objList[i]);
195 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
196 { defs:"-DBIG_ENDIAN_MODE", profile: "release"}
197 ).addObjects(objList[i]);
198 } else {
199 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
200 { defs:"", profile: "debug"}
201 ).addObjects(objList[i]);
202 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
203 { defs:"", profile: "release"}
204 ).addObjects(objList[i]);
205 }
206 }
208 var lib = "lib/generic/";
210 /* Also build a generic library */
211 if (java.lang.String(targ.model.endian).equals("big")) {
212 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
213 { defs:"-DBIG_ENDIAN_MODE -DGENERIC ", profile: "debug"}
214 ).addObjects(objListGeneric);
215 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
216 { defs:"-DBIG_ENDIAN_MODE -DGENERIC ", profile: "release"}
217 ).addObjects(objListGeneric);
218 } else {
219 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
220 { defs:" -DGENERIC ", profile: "debug"}
221 ).addObjects(objListGeneric);
222 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
223 { defs:" -DGENERIC ", profile: "release"}
224 ).addObjects(objListGeneric);
225 }
226 }
229 Pkg.otherFiles=[
230 '.settings/org.eclipse.cdt.core.prefs',
231 'docs',
232 'lib/da830/Debug/ti.sdo.edma3.rm.a674',
233 'lib/da830/Release/ti.sdo.edma3.rm.a674',
234 'lib/c6748/Debug/ti.sdo.edma3.rm.a674',
235 'lib/c6748/Release/ti.sdo.edma3.rm.a674',
236 'lib/omapl138/Debug/ti.sdo.edma3.rm.a674',
237 'lib/omapl138/Release/ti.sdo.edma3.rm.a674',
238 'lib/ti814x/Debug/ti.sdo.edma3.rm.a674',
239 'lib/ti814x/Release/ti.sdo.edma3.rm.a674',
240 'lib/tci6498/Debug/ti.sdo.edma3.rm.a64P',
241 'lib/tci6498/Debug/ti.sdo.edma3.rm.a64Pe',
242 'lib/tci6498/Release/ti.sdo.edma3.rm.a64P',
243 'lib/tci6498/Release/ti.sdo.edma3.rm.a64Pe',
244 'lib/simti816x/Debug/ti.sdo.edma3.rm.a674',
245 'lib/simti816x/Release/ti.sdo.edma3.rm.a674',
246 'lib/evmti816x/Debug/ti.sdo.edma3.rm.a674',
247 'lib/evmti816x/Release/ti.sdo.edma3.rm.a674',
248 'lib/c6472/Debug/ti.sdo.edma3.rm.a64P',
249 'lib/c6472/Debug/ti.sdo.edma3.rm.a64P',
250 'lib/c6472/Debug/ti.sdo.edma3.rm.a64Pe',
251 'lib/c6472/Release/ti.sdo.edma3.rm.a64P',
252 'lib/c6472/Release/ti.sdo.edma3.rm.a64Pe',
253 'lib/tci6486/Debug/ti.sdo.edma3.rm.a64P',
254 'lib/tci6486/Debug/ti.sdo.edma3.rm.a64Pe',
255 'lib/tci6486/Release/ti.sdo.edma3.rm.a64P',
256 'lib/tci6486/Release/ti.sdo.edma3.rm.a64Pe',
257 'lib/generic/Debug/ti.sdo.edma3.rm.a674',
258 'lib/generic/Release/ti.sdo.edma3.rm.a674',
259 'lib/generic/Debug/ti.sdo.edma3.rm.a64P',
260 'lib/generic/Debug/ti.sdo.edma3.rm.a64Pe',
261 'lib/generic/Release/ti.sdo.edma3.rm.a64P',
262 'lib/generic/Release/ti.sdo.edma3.rm.a64Pe',
263 'src',
264 '.cdtproject',
265 '.project',
266 'edma3_common.h',
267 'edma3_rm.h',
268 'package.bld',
269 'package.xs',
270 'RM.xdc',
271 'RM.xdt',
272 ];