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 objListSimTCI6608 = [
69 /* The configuration file. */
70 "src/configs/edma3_tci6608_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 objListSimTCI6616 = [
78 /* The configuration file. */
79 "src/configs/edma3_tci6616_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 objListSimTCI6614 = [
87 /* The configuration file. */
88 "src/configs/edma3_tci6614_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 objListSimC6657 = [
96 /* The configuration file. */
97 "src/configs/edma3_c6657_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 objListSimTCI6638K2K = [
105 /* The configuration file. */
106 "src/configs/edma3_tci6638k2k_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 objListEVM6670 = [
114 /* The configuration file. */
115 "src/configs/edma3_c6670_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 objListEVM6678 = [
123 /* The configuration file. */
124 "src/configs/edma3_c6678_cfg.c",
125 /* Common file. */
126 "src/edma3resmgr.c",
127 /* File defining internal data structures. */
128 "src/edma3_rm_gbl_data.c",
129 ];
131 var objListEVMTCI6614 = [
132 /* The configuration file. */
133 "src/configs/edma3_tci6614_cfg.c",
134 /* Common file. */
135 "src/edma3resmgr.c",
136 /* File defining internal data structures. */
137 "src/edma3_rm_gbl_data.c",
138 ];
140 var objListEVM6657 = [
141 /* The configuration file. */
142 "src/configs/edma3_c6657_cfg.c",
143 /* Common file. */
144 "src/edma3resmgr.c",
145 /* File defining internal data structures. */
146 "src/edma3_rm_gbl_data.c",
147 ];
149 var objListEVMTCI6638K2K = [
150 /* The configuration file. */
151 "src/configs/edma3_tci6638k2k_cfg.c",
152 /* Common file. */
153 "src/edma3resmgr.c",
154 /* File defining internal data structures. */
155 "src/edma3_rm_gbl_data.c",
156 ];
158 var objListEVMTCI6636K2H = [
159 /* The configuration file. */
160 "src/configs/edma3_tci6636k2h_cfg.c",
161 /* Common file. */
162 "src/edma3resmgr.c",
163 /* File defining internal data structures. */
164 "src/edma3_rm_gbl_data.c",
165 ];
167 var objListEVMTCI6630K2L = [
168 /* The configuration file. */
169 "src/configs/edma3_tci6630k2l_cfg.c",
170 /* Common file. */
171 "src/edma3resmgr.c",
172 /* File defining internal data structures. */
173 "src/edma3_rm_gbl_data.c",
174 ];
175 var objListEVMC66AK2E = [
176 /* The configuration file. */
177 "src/configs/edma3_c66ak2e_cfg.c",
178 /* Common file. */
179 "src/edma3resmgr.c",
180 /* File defining internal data structures. */
181 "src/edma3_rm_gbl_data.c",
182 ];
183 var objListSimTI816X = [
184 /* The configuration file. */
185 "src/configs/edma3_ti816x_cfg.c",
186 /* Common file. */
187 "src/edma3resmgr.c",
188 /* File defining internal data structures. */
189 "src/edma3_rm_gbl_data.c",
190 ];
192 var objListEVMTI816X = [
193 /* The configuration file. */
194 "src/configs/edma3_ti816x_cfg.c",
195 /* Common file. */
196 "src/edma3resmgr.c",
197 /* File defining internal data structures. */
198 "src/edma3_rm_gbl_data.c",
199 ];
201 var objListEVM6472 = [
202 /* The configuration file. */
203 "src/configs/edma3_c6472_cfg.c",
204 /* Common file. */
205 "src/edma3resmgr.c",
206 /* File defining internal data structures. */
207 "src/edma3_rm_gbl_data.c",
208 ];
210 var objListEVMTCI6486 = [
211 /* The configuration file. */
212 "src/configs/edma3_tci6486_cfg.c",
213 /* Common file. */
214 "src/edma3resmgr.c",
215 /* File defining internal data structures. */
216 "src/edma3_rm_gbl_data.c",
217 ];
219 var objListTI814X = [
220 /* The configuration file. */
221 "src/configs/edma3_ti814x_cfg.c",
222 /* Common file. */
223 "src/edma3resmgr.c",
224 /* File defining internal data structures. */
225 "src/edma3_rm_gbl_data.c",
226 ];
228 var objListGeneric = [
229 /* Common file. */
230 "src/edma3resmgr.c",
231 /* File defining internal data structures. */
232 "src/edma3_rm_gbl_data.c",
233 ];
235 var objListTI816XARM = [
236 /* The configuration file. */
237 "src/configs/edma3_ti816x_cfg.c",
238 /* Common file. */
239 "src/edma3resmgr.c",
240 /* File defining internal data structures. */
241 "src/edma3_rm_gbl_data.c",
242 ];
244 /* Platforms supported */
245 var plat_supported = [
246 {
247 platform: 'ti.platforms.evmDA830', targ : 'C674', objList: objListDA830, dir : 'da830-evm/674/'
248 },
249 {
250 platform: 'ti.platforms.simTCI6608', targ : 'C66',objList: objListSimTCI6608, dir : 'tci6608-sim/66/'
251 },
252 {
253 platform: 'ti.platforms.simTCI6608', targ : 'C66_big_endian',objList: objListSimTCI6608, dir : 'tci6608-sim/66/'
254 },
255 {
256 platform: 'ti.platforms.simTCI6616', targ : 'C66',objList: objListSimTCI6616, dir : 'tci6616-sim/66/'
257 },
258 {
259 platform: 'ti.platforms.simTCI6616', targ : 'C66_big_endian',objList: objListSimTCI6616, dir : 'tci6616-sim/66/'
260 },
261 {
262 platform: 'ti.platforms.simTCI6614', targ : 'C66',objList: objListSimTCI6614, dir : 'tci6614-sim/66/'
263 },
264 {
265 platform: 'ti.platforms.simTCI6614', targ : 'C66_big_endian',objList: objListSimTCI6614, dir : 'tci6614-sim/66/'
266 },
267 {
268 platform: 'ti.platforms.simC6657', targ : 'C66',objList: objListSimC6657, dir : 'c6657-sim/66/'
269 },
270 {
271 platform: 'ti.platforms.simC6657', targ : 'C66_big_endian',objList: objListSimC6657, dir : 'c6657-sim/66/'
272 },
273 {
274 platform: 'ti.platforms.simKepler', targ : 'C66',objList: objListSimTCI6638K2K, dir : 'tci6638k2k-sim/66/'
275 },
276 {
277 platform: 'ti.platforms.simKepler', targ : 'C66_big_endian',objList: objListSimTCI6638K2K, dir : 'tci6638k2k-sim/66/'
278 },
279 {
280 platform: 'ti.platforms.evm6670', targ : 'C66',objList: objListEVM6670, dir : 'c6670-evm/66/'
281 },
282 {
283 platform: 'ti.platforms.evm6670', targ : 'C66_big_endian',objList: objListEVM6670, dir : 'c6670-evm/66/'
284 },
285 {
286 platform: 'ti.platforms.evm6678', targ : 'C66',objList: objListEVM6678, dir : 'c6678-evm/66/'
287 },
288 {
289 platform: 'ti.platforms.evm6678', targ : 'C66_big_endian',objList: objListEVM6678, dir : 'c6678-evm/66/'
290 },
291 {
292 platform: 'ti.platforms.evmTCI6614', targ : 'C66',objList: objListEVMTCI6614, dir : 'tci6614-evm/66/'
293 },
294 {
295 platform: 'ti.platforms.evmTCI6614', targ : 'C66_big_endian',objList: objListEVMTCI6614, dir : 'tci6614-evm/66/'
296 },
297 {
298 platform: 'ti.platforms.evm6657', targ : 'C66',objList: objListEVM6657, dir : 'c6657-evm/66/'
299 },
300 {
301 platform: 'ti.platforms.evm6657', targ : 'C66_big_endian',objList: objListEVM6657, dir : 'c6657-evm/66/'
302 },
303 {
304 platform: 'ti.platforms.evmTCI6638K2K', targ : 'C66',objList: objListEVMTCI6638K2K, dir : 'tci6638k2k-evm/66/'
305 },
306 {
307 platform: 'ti.platforms.evmTCI6638K2K', targ : 'C66_big_endian',objList: objListEVMTCI6638K2K, dir : 'tci6638k2k-evm/66/'
308 },
309 {
310 platform: 'ti.platforms.evmTCI6636K2H', targ : 'C66',objList: objListEVMTCI6636K2H, dir : 'tci6636k2h-evm/66/'
311 },
312 {
313 platform: 'ti.platforms.evmTCI6636K2H', targ : 'C66_big_endian',objList: objListEVMTCI6636K2H, dir : 'tci6636k2h-evm/66/'
314 },
315 {
316 platform: 'ti.platforms.evmTCI6630K2L', targ : 'C66',objList: objListEVMTCI6630K2L, dir : 'tci6630k2l-evm/66/'
317 },
318 {
319 platform: 'ti.platforms.evmTCI6630K2L', targ : 'C66_big_endian',objList: objListEVMTCI6630K2L, dir : 'tci6630k2l-evm/66/'
320 },
321 {
322 platform: 'ti.platforms.evmC66AK2E', targ : 'C66',objList: objListEVMC66AK2E, dir : 'c66ak2e-evm/66/'
323 },
324 {
325 platform: 'ti.platforms.evmC66AK2E', targ : 'C66_big_endian',objList: objListEVMC66AK2E, dir : 'c66ak2e-evm/66/'
326 },
327 {
328 platform: 'ti.platforms.evm6748', targ : 'C674', objList: objListC6748, dir : 'c6748-evm/674/'
329 },
330 {
331 platform: 'ti.platforms.evmOMAPL138',targ : 'C674', objList: objListOMAPL138, dir : 'omapl138-evm/674/'
332 },
333 {
334 platform: 'ti.platforms.evmOMAPL138',targ : 'Arm9', objList: objListOMAPL138, dir : 'omapl138-evm/arm9/'
335 },
336 {
337 platform: 'ti.platforms.simDM8168', targ : 'C674',objList: objListSimTI816X, dir : 'ti816x-sim/674/'
338 },
339 {
340 platform: 'ti.platforms.evmDM8168', targ : 'C674',objList: objListEVMTI816X, dir : 'ti816x-evm/674/'
341 },
342 {
343 platform: 'ti.platforms.evm6472', targ : 'C64P', objList: objListEVM6472, dir : 'c6472-evm/64p/'
344 },
345 {
346 platform: 'ti.platforms.evm6472', targ : 'C64P_big_endian', objList: objListEVM6472, dir : 'c6472-evm/64p/'
347 },
348 {
349 platform: 'ti.platforms.evmTCI6486', targ : 'C64P', objList: objListEVMTCI6486, dir : 'tci6486-evm/64p/'
350 },
351 {
352 platform: 'ti.platforms.evmTCI6486', targ : 'C64P_big_endian', objList: objListEVMTCI6486, dir : 'tci6486-evm/64p/'
353 },
354 {
355 platform: 'ti.platforms.evmDM8148',targ : 'C674', objList: objListTI814X, dir : 'ti814x-evm/674/'
356 },
357 {
358 platform: 'ti.platforms.evmDM8148',targ : 'A8F', objList: objListTI814X, dir : 'ti814x-evm/a8/'
359 },
360 {
361 platform: 'ti.platforms.evmTI816X',targ : 'M3', objList: objListTI816XARM, dir : 'ti816x-evm/m3/'
362 },
363 ];
365 /* Targets supported */
366 var targ_supported = [
367 'C64P',
368 'C64P_big_endian',
369 'C674',
370 'Arm9',
371 'A8F',
372 'C66',
373 'C66_big_endian',
374 'M3'
375 ];
377 /* Directories for each target */
378 var dir = [
379 '64p/',
380 '64p/',
381 '674/',
382 'arm9/',
383 'a8/',
384 '66/',
385 '66/',
386 'm3/',
387 ];
389 for each (var targ in Build.targets)
390 {
391 for each (var plat in targ.platforms)
392 {
393 var lib = "lib/";
394 var bool = 0;
396 if (targ.platforms.length == 0)
397 break;
399 for (var i = 0; i < plat_supported.length; i++)
400 {
401 if (java.lang.String(plat).equals(plat_supported[i].platform))
402 {
403 if (java.lang.String(targ.name).equals(plat_supported[i].targ))
404 {
405 /* Choose the selected platform */
406 lib = lib + plat_supported[i].dir;
407 bool = 1;
408 break;
409 }
410 }
411 }
413 if (bool == 0) {
414 //throw new Error('Unexpected value in "platform" parameter')
415 }
417 if (java.lang.String(targ.model.endian).equals("big")) {
418 Pkg.addLibrary(lib + "debug/" + Pkg.name, targ,
419 { defs:"-DBIG_ENDIAN_MODE", profile: "debug"}
420 ).addObjects(plat_supported[i].objList);
421 Pkg.addLibrary(lib + "release/" + Pkg.name, targ,
422 { defs:"-DBIG_ENDIAN_MODE", profile: "release"}
423 ).addObjects(plat_supported[i].objList);
424 } else {
425 Pkg.addLibrary(lib + "debug/" + Pkg.name, targ,
426 { defs:"", profile: "debug"}
427 ).addObjects(plat_supported[i].objList);
428 Pkg.addLibrary(lib + "release/" + Pkg.name, targ,
429 { defs:"", profile: "release"}
430 ).addObjects(plat_supported[i].objList);
431 }
432 }
434 var lib = "lib/generic/";
436 for (var i = 0; i < targ_supported.length; i++)
437 {
438 if (java.lang.String(targ.name).equals(targ_supported[i]))
439 {
440 /* Choose the selected target */
441 lib = lib + dir[i];
442 bool = 1;
443 break;
444 }
445 }
447 /* Also build a generic library */
448 if (java.lang.String(targ.model.endian).equals("big")) {
449 Pkg.addLibrary(lib + "debug/" + Pkg.name, targ,
450 { defs:"-DBIG_ENDIAN_MODE -DGENERIC ", profile: "debug"}
451 ).addObjects(objListGeneric);
452 Pkg.addLibrary(lib + "release/" + Pkg.name, targ,
453 { defs:"-DBIG_ENDIAN_MODE -DGENERIC ", profile: "release"}
454 ).addObjects(objListGeneric);
455 } else {
456 Pkg.addLibrary(lib + "debug/" + Pkg.name, targ,
457 { defs:" -DGENERIC ", profile: "debug"}
458 ).addObjects(objListGeneric);
459 Pkg.addLibrary(lib + "release/" + Pkg.name, targ,
460 { defs:" -DGENERIC ", profile: "release"}
461 ).addObjects(objListGeneric);
462 }
463 }
466 Pkg.otherFiles=[
467 '.settings/org.eclipse.cdt.core.prefs',
468 'docs',
469 'lib/da830/debug/ti.sdo.edma3.rm.a674',
470 'lib/da830/release/ti.sdo.edma3.rm.a674',
471 'lib/c6748/debug/ti.sdo.edma3.rm.a674',
472 'lib/c6748/release/ti.sdo.edma3.rm.a674',
473 'lib/omapl138/debug/ti.sdo.edma3.rm.a674',
474 'lib/omapl138/release/ti.sdo.edma3.rm.a674',
475 'lib/omapl138/debug/ti.sdo.edma3.rm.ae9',
476 'lib/omapl138/release/ti.sdo.edma3.rm.ae9',
477 'lib/ti814x/debug/ti.sdo.edma3.rm.a674',
478 'lib/ti814x/release/ti.sdo.edma3.rm.a674',
479 'lib/ti814x/debug/ti.sdo.edma3.rm.aea8f',
480 'lib/ti814x/release/ti.sdo.edma3.rm.aea8f',
481 'lib/tci6608/debug/ti.sdo.edma3.rm.ae66',
482 'lib/tci6608/debug/ti.sdo.edma3.rm.ae66e',
483 'lib/tci6608/release/ti.sdo.edma3.rm.ae66',
484 'lib/tci6608/release/ti.sdo.edma3.rm.ae66e',
485 'lib/tci6616/debug/ti.sdo.edma3.rm.ae66',
486 'lib/tci6616/debug/ti.sdo.edma3.rm.ae66e',
487 'lib/tci6616/release/ti.sdo.edma3.rm.ae66',
488 'lib/tci6616/release/ti.sdo.edma3.rm.ae66e',
489 'lib/tci6614/debug/ti.sdo.edma3.rm.ae66',
490 'lib/tci6614/debug/ti.sdo.edma3.rm.ae66e',
491 'lib/tci6614/release/ti.sdo.edma3.rm.ae66',
492 'lib/tci6614/release/ti.sdo.edma3.rm.ae66e',
493 'lib/c6657/debug/ti.sdo.edma3.rm.ae66',
494 'lib/c6657/debug/ti.sdo.edma3.rm.ae66e',
495 'lib/c6657/release/ti.sdo.edma3.rm.ae66',
496 'lib/c6657/release/ti.sdo.edma3.rm.ae66e',
497 'lib/tci6638k2k/debug/ti.sdo.edma3.rm.ae66',
498 'lib/tci6638k2k/debug/ti.sdo.edma3.rm.ae66e',
499 'lib/tci6638k2k/release/ti.sdo.edma3.rm.ae66',
500 'lib/tci6638k2k/release/ti.sdo.edma3.rm.ae66e',
501 'lib/tci6636k2h/debug/ti.sdo.edma3.rm.ae66',
502 'lib/tci6636k2h/debug/ti.sdo.edma3.rm.ae66e',
503 'lib/tci6636k2h/release/ti.sdo.edma3.rm.ae66',
504 'lib/tci6636k2h/release/ti.sdo.edma3.rm.ae66e',
505 'lib/tci6630k2h/release/ti.sdo.edma3.rm.ae66',
506 'lib/tci6630k2h/release/ti.sdo.edma3.rm.ae66e',
507 'lib/c66ak2e/debug/ti.sdo.edma3.rm.ae66',
508 'lib/c66ak2e/debug/ti.sdo.edma3.rm.ae66e',
509 'lib/c66ak2e/release/ti.sdo.edma3.rm.ae66',
510 'lib/c66ak2e/release/ti.sdo.edma3.rm.ae66e',
511 'lib/c6670/debug/ti.sdo.edma3.rm.ae66',
512 'lib/c6670/debug/ti.sdo.edma3.rm.ae66e',
513 'lib/c6670/release/ti.sdo.edma3.rm.ae66',
514 'lib/c6670/release/ti.sdo.edma3.rm.ae66e',
515 'lib/c6678/debug/ti.sdo.edma3.rm.ae66',
516 'lib/c6678/debug/ti.sdo.edma3.rm.ae66e',
517 'lib/c6678/release/ti.sdo.edma3.rm.ae66',
518 'lib/c6678/release/ti.sdo.edma3.rm.ae66e',
519 'lib/simti816x/debug/ti.sdo.edma3.rm.a674',
520 'lib/simti816x/release/ti.sdo.edma3.rm.a674',
521 'lib/evmti816x/debug/ti.sdo.edma3.rm.a674',
522 'lib/evmti816x/release/ti.sdo.edma3.rm.a674',
523 'lib/c6472/debug/ti.sdo.edma3.rm.a64P',
524 'lib/c6472/debug/ti.sdo.edma3.rm.a64Pe',
525 'lib/c6472/release/ti.sdo.edma3.rm.a64P',
526 'lib/c6472/release/ti.sdo.edma3.rm.a64Pe',
527 'lib/tci6486/debug/ti.sdo.edma3.rm.a64P',
528 'lib/tci6486/debug/ti.sdo.edma3.rm.a64Pe',
529 'lib/tci6486/release/ti.sdo.edma3.rm.a64P',
530 'lib/tci6486/release/ti.sdo.edma3.rm.a64Pe',
531 'lib/generic/debug/ti.sdo.edma3.rm.a674',
532 'lib/generic/release/ti.sdo.edma3.rm.a674',
533 'lib/generic/debug/ti.sdo.edma3.rm.a64P',
534 'lib/generic/debug/ti.sdo.edma3.rm.a64Pe',
535 'lib/generic/release/ti.sdo.edma3.rm.a64P',
536 'lib/generic/release/ti.sdo.edma3.rm.a64Pe',
537 'lib/generic/debug/ti.sdo.edma3.rm.ae66',
538 'lib/generic/debug/ti.sdo.edma3.rm.ae66e',
539 'lib/generic/release/ti.sdo.edma3.rm.ae66',
540 'lib/generic/release/ti.sdo.edma3.rm.ae66e',
541 'src',
542 '.cdtproject',
543 '.project',
544 'edma3_common.h',
545 'edma3_rm.h',
546 'package.bld',
547 'package.xs',
548 'RM.xdc',
549 'RM.xdt',
550 ];