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 objListSimTCI6498 = [
69 /* The configuration file. */
70 "src/configs/edma3_tci6498_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 objListSimDM740 = [
78 /* The configuration file. */
79 "src/configs/edma3_dm740_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 objList = [
87 objListDA830,
88 objListSimTCI6498,
89 objListC6748,
90 objListOMAPL138,
91 objListSimDM740,
92 ];
94 /* Platforms supported */
95 var plat_supported = [
96 'ti.platforms.evmDA830',
97 'ti.platforms.simTCI6498',
98 'ti.platforms.evm6748',
99 'ti.platforms.evmOMAPL138',
100 'ti.platforms.simDM740',
101 ];
103 /* Directories for each platform */
104 var dir = [
105 'da830/',
106 'tci6498/',
107 'c6748/',
108 'omapl138/',
109 'dm740/',
110 ];
112 for each (var targ in Build.targets)
113 {
114 for each (var plat in targ.platforms)
115 {
116 var lib = "lib/";
117 var bool = 0;
119 for (var i = 0; i < plat_supported.length; i++)
120 {
121 if (java.lang.String(plat).equals(plat_supported[i]))
122 {
123 /* Choose the selected platform */
124 lib = lib + dir[i];
125 bool = 1;
126 break;
127 }
128 }
130 if (bool == 0)
131 throw new Error('Unexpected value in "platform" parameter')
133 if (java.lang.String(targ.model.endian).equals("big")) {
134 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
135 { defs:"-DBIG_ENDIAN_MODE", profile: "debug"}
136 ).addObjects(objList[i]);
137 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
138 { defs:"-DBIG_ENDIAN_MODE", profile: "release"}
139 ).addObjects(objList[i]);
140 } else {
141 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
142 { defs:"", profile: "debug"}
143 ).addObjects(objList[i]);
144 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
145 { defs:"", profile: "release"}
146 ).addObjects(objList[i]);
147 }
148 }
149 }
152 Pkg.otherFiles=[
153 '.settings/org.eclipse.cdt.core.prefs',
154 'docs',
155 'lib/da830/Debug/ti.sdo.edma3.rm.a674',
156 'lib/da830/Release/ti.sdo.edma3.rm.a674',
157 'lib/c6748/Debug/ti.sdo.edma3.rm.a674',
158 'lib/c6748/Release/ti.sdo.edma3.rm.a674',
159 'lib/omapl138/Debug/ti.sdo.edma3.rm.a674',
160 'lib/omapl138/Release/ti.sdo.edma3.rm.a674',
161 'lib/tci6498/Debug/ti.sdo.edma3.rm.a64P',
162 'lib/tci6498/Debug/ti.sdo.edma3.rm.a64Pe',
163 'lib/tci6498/Release/ti.sdo.edma3.rm.a64P',
164 'lib/tci6498/Release/ti.sdo.edma3.rm.a64Pe',
165 'lib/dm740/Debug/ti.sdo.edma3.rm.a674',
166 'lib/dm740/Release/ti.sdo.edma3.rm.a674',
167 'src',
168 '.cdtproject',
169 '.project',
170 'edma3_common.h',
171 'edma3_rm.h',
172 'package.bld',
173 'package.xs',
174 'RM.xdc',
175 'RM.xdt',
176 ];