4c96ce9aca10bc3d53e2f4041c9988f78a52e7ef
1 /*
2 * package.bld
3 *
4 * xdc build specification file for the RM sample module.
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 */
40 var Build = xdc.useModule('xdc.bld.BuildEnvironment');
41 var Pkg = xdc.useModule('xdc.bld.PackageContents');
43 var objListDA830 = [
44 "src/platforms/sample_da830_cfg.c",
45 "src/platforms/sample_da830_int_reg.c",
46 "src/sample_cs.c",
47 "src/sample_init.c",
48 ];
50 var objListC6748 = [
51 "src/platforms/sample_c6748_cfg.c",
52 "src/platforms/sample_c6748_int_reg.c",
53 "src/sample_cs.c",
54 "src/sample_init.c",
55 ];
57 var objListOMAPL138 = [
58 "src/platforms/sample_omapl138_cfg.c",
59 "src/platforms/sample_omapl138_int_reg.c",
60 "src/sample_cs.c",
61 "src/sample_init.c",
62 ];
64 var objListOMAPL138ARM = [
65 "src/platforms/sample_omapl138_arm_cfg.c",
66 "src/platforms/sample_omapl138_arm_int_reg.c",
67 "src/sample_arm_cs.c",
68 "src/sample_init.c",
69 ];
71 var objListSimTCI6498 = [
72 "src/platforms/sample_tci6498_cfg.c",
73 "src/platforms/sample_tci6498_int_reg.c",
74 "src/sample_cs.c",
75 "src/sample_init.c",
76 ];
78 var objListSimDM740 = [
79 "src/platforms/sample_dm740_cfg.c",
80 "src/platforms/sample_dm740_int_reg.c",
81 "src/sample_cs.c",
82 "src/sample_init.c",
83 ];
85 /* Platforms supported */
86 var plat_supported = [
87 {
88 platform: 'ti.platforms.evmDA830', targ : 'C674', objList: objListDA830, dir : 'da830/'
89 },
90 {
91 platform: 'ti.platforms.simTCI6498', targ : 'C64P',objList: objListSimTCI6498, dir : 'tci6498/'
92 },
93 {
94 platform: 'ti.platforms.simTCI6498', targ : 'C64P_big_endian',objList: objListSimTCI6498, dir : 'tci6498/'
95 },
96 {
97 platform: 'ti.platforms.evm6748', targ : 'C674', objList: objListC6748, dir : 'c6748/'
98 },
99 {
100 platform: 'ti.platforms.evmOMAPL138',targ : 'C674', objList: objListOMAPL138, dir : 'omapl138/'
101 },
102 {
103 platform: 'ti.platforms.evmOMAPL138',targ : 'Arm9', objList: objListOMAPL138ARM, dir : 'omapl138/'
104 },
105 {
106 platform: 'ti.platforms.simDM740', targ : 'C674',objList: objListSimDM740, dir : 'dm740/'
107 }
108 ];
110 for each (var targ in Build.targets)
111 {
112 for each (var plat in targ.platforms)
113 {
114 var lib = "lib/";
115 var bool = 0;
117 for (var i = 0; i < plat_supported.length; i++)
118 {
119 if (java.lang.String(plat).equals(plat_supported[i].platform))
120 {
121 if (java.lang.String(targ.name).equals(plat_supported[i].targ))
122 {
123 /* Choose the selected platform */
124 lib = lib + plat_supported[i].dir;
125 bool = 1;
126 break;
127 }
128 }
129 }
131 if (bool == 0)
132 throw new Error('Unexpected value in "platform" parameter')
134 if (java.lang.String(targ.model.endian).equals("big")) {
135 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
136 { defs:"-DBIG_ENDIAN_MODE", profile: "debug"}
137 ).addObjects(plat_supported[i].objList);
138 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
139 { defs:"-DBIG_ENDIAN_MODE", profile: "release"}
140 ).addObjects(plat_supported[i].objList);
141 } else {
142 Pkg.addLibrary(lib + "Debug/" + Pkg.name, targ,
143 { defs:"", profile: "debug"}
144 ).addObjects(plat_supported[i].objList);
145 Pkg.addLibrary(lib + "Release/" + Pkg.name, targ,
146 { defs:"", profile: "release"}
147 ).addObjects(plat_supported[i].objList);
148 }
149 }
150 }
153 Pkg.otherFiles=[
154 '.settings/org.eclipse.cdt.core.prefs',
155 'lib/da830/Debug/ti.sdo.edma3.rm.sample.a674',
156 'lib/da830/Release/ti.sdo.edma3.rm.sample.a674',
157 'lib/c6748/Debug/ti.sdo.edma3.rm.sample.a674',
158 'lib/c6748/Release/ti.sdo.edma3.rm.sample.a674',
159 'lib/omapl138/Debug/ti.sdo.edma3.rm.sample.a674',
160 'lib/omapl138/Release/ti.sdo.edma3.rm.sample.a674',
161 'lib/omapl138/Debug/ti.sdo.edma3.rm.sample.ae9',
162 'lib/omapl138/Release/ti.sdo.edma3.rm.sample.ae9',
163 'lib/tci6498/Debug/ti.sdo.edma3.rm.sample.a64P',
164 'lib/tci6498/Debug/ti.sdo.edma3.rm.sample.a64Pe',
165 'lib/tci6498/Release/ti.sdo.edma3.rm.sample.a64P',
166 'lib/tci6498/Release/ti.sdo.edma3.rm.sample.a64Pe',
167 'lib/dm740/Debug/ti.sdo.edma3.rm.sample.a674',
168 'lib/dm740/Release/ti.sdo.edma3.rm.sample.a674',
169 'src/sample_cs.c',
170 'src/sample_init.c',
171 'src/sample_arm_cs.c',
172 'src/sample_arm_init.c',
173 'src/platforms/sample_da830_cfg.c',
174 'src/platforms/sample_da830_int_reg.c',
175 'src/platforms/sample_c6748_cfg.c',
176 'src/platforms/sample_c6748_int_reg.c',
177 'src/platforms/sample_omapl138_cfg.c',
178 'src/platforms/sample_omapl138_int_reg.c',
179 'src/platforms/sample_omapl138_arm_cfg.c',
180 'src/platforms/sample_omapl138_arm_int_reg.c',
181 'src/platforms/sample_tci6498_cfg.c',
182 'src/platforms/sample_tci6498_int_reg.c',
183 'src/platforms/sample_dm740_cfg.c',
184 'src/platforms/sample_dm740_int_reg.c',
185 '.cdtproject',
186 '.project',
187 'bios6_edma3_rm_sample.h',
188 'package.bld',
189 'package.xs',
190 ];