1 /*
2 * Copyright 2006 by Texas Instruments Incorporated.
3 *
4 * All rights reserved. Property of Texas Instruments Incorporated.
5 * Restricted rights to use, duplicate or disclose this code are
6 * granted through contract.
7 *
8 */
10 var Build = xdc.useModule('xdc.bld.BuildEnvironment');
11 var Pkg = xdc.useModule('xdc.bld.PackageContents');
13 var objListDA830 = [
14 /* The configuration file. */
15 "src/configs/edma3_da830_cfg.c",
16 /* Common file. */
17 "src/edma3resmgr.c",
18 /* File defining internal data structures. */
19 "src/edma3_rm_gbl_data.c",
20 ];
22 var objListSimTCI6498 = [
23 /* The configuration file. */
24 "src/configs/edma3_tci6498_cfg.c",
25 /* Common file. */
26 "src/edma3resmgr.c",
27 /* File defining internal data structures. */
28 "src/edma3_rm_gbl_data.c",
29 ];
31 var objList = [
32 objListDA830,
33 objListSimTCI6498,
34 ];
36 /* Platforms supported */
37 var plat_supported = [
38 'ti.platforms.evmDA830',
39 'ti.platforms.simTCI6498',
40 ];
42 /* Directories for each platform */
43 var dir = [
44 'da830/',
45 'tci6498/',
46 ];
48 for each (var targ in Build.targets)
49 {
50 for each (var plat in targ.platforms)
51 {
52 var lib = "lib/";
53 var bool = 0;
55 for (var i = 0; i < plat_supported.length; i++)
56 {
57 if (java.lang.String(plat).equals(plat_supported[i]))
58 {
59 /* Choose the selected platform */
60 lib = lib + dir[i];
61 bool = 1;
62 break;
63 }
64 }
66 if (bool == 0)
67 throw new Error('Unexpected value in "platform" parameter')
69 if (java.lang.String(targ.model.endian).equals("big")) {
70 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
71 { defs:"-DBIG_ENDIAN_MODE", profile: "debug"}
72 ).addObjects(objList[i]);
73 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
74 { defs:"-DBIG_ENDIAN_MODE", profile: "release"}
75 ).addObjects(objList[i]);
76 } else {
77 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
78 { defs:"", profile: "debug"}
79 ).addObjects(objList[i]);
80 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
81 { defs:"", profile: "release"}
82 ).addObjects(objList[i]);
83 }
84 }
85 }
88 Pkg.otherFiles=[
89 'docs',
90 'lib/da830/Debug/ti.sdo.edma3.rm.a674',
91 'lib/da830/Release/ti.sdo.edma3.rm.a674',
92 'src',
93 'edma3_common.h',
94 'edma3_rm.h',
95 'package.bld',
96 'package.xs',
97 'RM.xdc',
98 'RM.xdt',
99 ];