2b6059b4bc916800c8047ce41dfdf5f26cc67c30
[keystone-rtos/edma3_lld.git] / packages / ti / sdo / edma3 / drv / sample / package.bld
1 /*
2  * package.bld
3  *
4  * xdc build specification file for the EDMA DRV sample 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 */
41 var Build = xdc.useModule('xdc.bld.BuildEnvironment');
42 var Pkg = xdc.useModule('xdc.bld.PackageContents');
44 var objListDA830 = [
45     "src/platforms/sample_da830_cfg.c",
46     "src/platforms/sample_da830_int_reg.c",
47     "src/sample_cs.c",
48     "src/sample_init.c",
49 ];
51 var objListC6748 = [
52     "src/platforms/sample_c6748_cfg.c",
53     "src/platforms/sample_c6748_int_reg.c",
54     "src/sample_cs.c",
55     "src/sample_init.c",
56 ];
58 var objListOMAPL138 = [
59     "src/platforms/sample_omapl138_cfg.c",
60     "src/platforms/sample_omapl138_int_reg.c",
61     "src/sample_cs.c",
62     "src/sample_init.c",
63 ];
65 var objListTI814X = [
66     "src/platforms/sample_ti814x_cfg.c",
67     "src/platforms/sample_ti814x_int_reg.c",
68     "src/sample_cs.c",
69     "src/sample_init.c",
70 ];
72 var objListOMAPL138ARM = [
73     "src/platforms/sample_omapl138_arm_cfg.c",
74     "src/platforms/sample_omapl138_arm_int_reg.c",
75     "src/sample_arm_cs.c",
76     "src/sample_arm_init.c",
77 ];
79 var objListTI814XARM = [
80     "src/platforms/sample_ti814x_arm_cfg.c",
81     "src/platforms/sample_ti814x_arm_int_reg.c",
82     "src/sample_arm_cs.c",
83     "src/sample_arm_init.c",
84 ];
85 var objListSimTCI6608 = [
86     "src/platforms/sample_tci6608_cfg.c",
87     "src/platforms/sample_tci6608_int_reg.c",
88     "src/sample_cs.c",
89     "src/sample_init.c",
90 ];
91 var objListSimTCI6616 = [
92     "src/platforms/sample_tci6616_cfg.c",
93     "src/platforms/sample_tci6616_int_reg.c",
94     "src/sample_cs.c",
95     "src/sample_init.c",
96 ];
97 var objListSimTCI6614 = [
98     "src/platforms/sample_tci6614_cfg.c",
99     "src/platforms/sample_tci6614_int_reg.c",
100     "src/sample_cs.c",
101     "src/sample_init.c",
102 ];
103 var objListSimC6657 = [
104     "src/platforms/sample_c6657_cfg.c",
105     "src/platforms/sample_c6657_int_reg.c",
106     "src/sample_cs.c",
107     "src/sample_init.c",
108 ];
110 var objListEVM6670 = [
111     "src/platforms/sample_c6670_cfg.c",
112     "src/platforms/sample_c6670_int_reg.c",
113     "src/sample_cs.c",
114     "src/sample_init.c",
115 ];
117 var objListEVM6678 = [
118     "src/platforms/sample_c6678_cfg.c",
119     "src/platforms/sample_c6678_int_reg.c",
120     "src/sample_cs.c",
121     "src/sample_init.c",
122 ];
124 var objListEVMTCI6614 = [
125     "src/platforms/sample_tci6614_cfg.c",
126     "src/platforms/sample_tci6614_int_reg.c",
127     "src/sample_cs.c",
128     "src/sample_init.c",
129 ];
131 var objListEVM6657 = [
132     "src/platforms/sample_c6657_cfg.c",
133     "src/platforms/sample_c6657_int_reg.c",
134     "src/sample_cs.c",
135     "src/sample_init.c",
136 ];
138 var objListSimTI816X = [
139     "src/platforms/sample_ti816x_cfg.c",
140     "src/platforms/sample_ti816x_int_reg.c",
141     "src/sample_cs.c",
142     "src/sample_init.c",
143 ];
145 var objListEVMTI816X = [
146     "src/platforms/sample_ti816x_cfg.c",
147     "src/platforms/sample_ti816x_int_reg.c",
148     "src/sample_cs.c",
149     "src/sample_init.c",
150 ];
152 var objListEVM6472 = [
153     "src/platforms/sample_c6472_cfg.c",
154     "src/platforms/sample_c6472_int_reg.c",
155     "src/sample_cs.c",
156     "src/sample_init.c",
157 ];
159 var objListEVMTCI6486 = [
160     "src/platforms/sample_tci6486_cfg.c",
161     "src/platforms/sample_tci6486_int_reg.c",
162     "src/sample_cs.c",
163     "src/sample_init.c",
164 ];
166 var objListTI816XARM = [
167     "src/platforms/sample_ti816x_m3video_cfg.c",
168     "src/platforms/sample_ti816x_m3video_int_reg.c",
169     "src/sample_arm_cs.c",
170     "src/sample_arm_init.c",
171 ];
173 var chipdefines = [
174                     'CHIP_DA830',
175                     'SIMTCI6608',
176                     'SIMTCI6608',
177                     'SIMTCI6616',
178                     'SIMTCI6616',
179                     'SIMTCI6614',
180                     'SIMTCI6614',
181                     'SIMC6657',
182                     'SIMC6657',
183                     'CHIP_C6670',
184                     'CHIP_C6670',
185                     'CHIP_C6678',
186                     'CHIP_C6678',
187                     'CHIP_TCI6614',
188                     'CHIP_TCI6614',
189                     'CHIP_C6657',
190                     'CHIP_C6657',
191                     'CHIP_C6748',
192                     'CHIP_OMAPL138',
193                     'CHIP_OMAPL138',
194                     'SIMTI816X',
195                     'CHIP_TI816X',
196                     'CHIP_C6472',
197                     'CHIP_C6472',
198                     'CHIP_TCI6486',
199                     'CHIP_TCI6486',
200                     'CHIP_TI814X',
201                     'CHIP_TI814X',
202                     'CHIP_TI816X',
203                   ];
205 /* Platforms supported */
206 var plat_supported = [
207                         {
208                            platform: 'ti.platforms.evmDA830',   targ : 'C674', objList: objListDA830, dir : 'da830-evm/674/'
209                         },
210                         {
211                             platform: 'ti.platforms.simTCI6608', targ : 'C66',objList: objListSimTCI6608, dir : 'tci6608-sim/66/'
212                         },
213                         {
214                             platform: 'ti.platforms.simTCI6608', targ : 'C66_big_endian',objList: objListSimTCI6608, dir : 'tci6608-sim/66/'
215                         },
216                         {
217                             platform: 'ti.platforms.simTCI6616', targ : 'C66',objList: objListSimTCI6616, dir : 'tci6616-sim/66/'
218                         },
219                         {
220                             platform: 'ti.platforms.simTCI6616', targ : 'C66_big_endian',objList: objListSimTCI6616, dir : 'tci6616-sim/66/'
221                         },
222                         {
223                             platform: 'ti.platforms.simTCI6614', targ : 'C66',objList: objListSimTCI6614, dir : 'tci6614-sim/66/'
224                         },
225                         {
226                             platform: 'ti.platforms.simTCI6614', targ : 'C66_big_endian',objList: objListSimTCI6614, dir : 'tci6614-sim/66/'
227                         },
228                         {
229                             platform: 'ti.platforms.simC6657', targ : 'C66',objList: objListSimC6657, dir : 'c6657-sim/66/'
230                         },
231                         {
232                             platform: 'ti.platforms.simC6657', targ : 'C66_big_endian',objList: objListSimC6657, dir : 'c6657-sim/66/'
233                         },
234                         {
235                             platform: 'ti.platforms.evm6670', targ : 'C66',objList: objListEVM6670, dir : 'c6670-evm/66'
236                         },
237                         {
238                             platform: 'ti.platforms.evm6670', targ : 'C66_big_endian',objList: objListEVM6670, dir : 'c6670-evm/66'
239                         },
240                         {
241                             platform: 'ti.platforms.evm6678', targ : 'C66',objList: objListEVM6678, dir : 'c6678-evm/66'
242                         },
243                         {
244                             platform: 'ti.platforms.evm6678', targ : 'C66_big_endian',objList: objListEVM6678, dir : 'c6678-evm/66'
245                         },
246                         {
247                             platform: 'ti.platforms.evmTCI6614', targ : 'C66',objList: objListEVMTCI6614, dir : 'tci6614-evm/66'
248                         },
249                         {
250                             platform: 'ti.platforms.evmTCI6614', targ : 'C66_big_endian',objList: objListEVMTCI6614, dir : 'tci6614-evm/66'
251                         },
252                         {
253                             platform: 'ti.platforms.evm6657', targ : 'C66',objList: objListEVM6657, dir : 'c6657-evm/66'
254                         },
255                         {
256                             platform: 'ti.platforms.evm6657', targ : 'C66_big_endian',objList: objListEVM6657, dir : 'c6657-evm/66'
257                         },
258                         {
259                             platform: 'ti.platforms.evm6748',    targ : 'C674', objList: objListC6748, dir : 'c6748-evm/674/'
260                         },
261                         {
262                             platform: 'ti.platforms.evmOMAPL138',targ : 'C674', objList: objListOMAPL138, dir : 'omapl138-evm/674/'
263                         },
264                         {
265                             platform: 'ti.platforms.evmOMAPL138',targ : 'Arm9', objList: objListOMAPL138ARM, dir : 'omapl138-evm/arm9/'
266                         },
267                         {
268                             platform: 'ti.platforms.simDM8168', targ : 'C674',objList: objListSimTI816X, dir : 'ti816x-sim/674/'
269                         },
270                         {
271                             platform: 'ti.platforms.evmDM8168', targ : 'C674',objList: objListEVMTI816X, dir : 'ti816x-evm/674/'
272                         },
273                         {
274                             platform: 'ti.platforms.evm6472', targ : 'C64P', objList: objListEVM6472, dir : 'c6472-evm/64p/'
275                         },
276                         {
277                             platform: 'ti.platforms.evm6472', targ : 'C64P_big_endian', objList: objListEVM6472, dir : 'c6472-evm/64p/'
278                         },
279                         {
280                             platform: 'ti.platforms.evmTCI6486', targ : 'C64P', objList: objListEVMTCI6486, dir : 'tci6486-evm/64p/'
281                         },
282                         {
283                             platform: 'ti.platforms.evmTCI6486', targ : 'C64P_big_endian', objList: objListEVMTCI6486, dir : 'tci6486-evm/64p/'
284                         },
285                         {
286                             platform: 'ti.platforms.evmDM8148',targ : 'C674', objList: objListTI814X, dir : 'ti814x-evm/674/'
287                         },
288                         {
289                             platform: 'ti.platforms.evmDM8148',targ : 'A8F', objList: objListTI814XARM, dir : 'ti814x-evm/a8/'
290                         },
291                         {
292                             platform: 'ti.platforms.evmTI816X',targ : 'M3', objList: objListTI816XARM, dir : 'ti816x-evm/m3/'
293                         },
294                      ];
296 for each (var targ in Build.targets)
298     for each (var plat in targ.platforms)
299     {
300         var lib = "lib/";
301         var bool = 0;
303         if (targ.platforms.length == 0)
304                 break;
305         
306         for (var i = 0; i < plat_supported.length; i++)
307         {
308              if (java.lang.String(plat).equals(plat_supported[i].platform))
309             {
310                 var chip = "-D";
311                 if (java.lang.String(targ.name).equals(plat_supported[i].targ))
312                 {
313                     /* Choose the selected platform */
314                     lib = lib + plat_supported[i].dir;
315                     chip = chip + chipdefines[i];
316                     bool = 1;
317                     break;
318                 }
319             }
320         }
322         if (bool == 0)
323                 {
324             throw new Error('Unexpected value in "platform" parameter')
325                 }
327         if (java.lang.String(targ.model.endian).equals("big"))  {
328             Pkg.addLibrary(lib + "debug/" + Pkg.name, targ,
329                 { defs:"-DBIG_ENDIAN_MODE", profile: "debug"}
330                 ).addObjects(plat_supported[i].objList);
331             Pkg.addLibrary(lib + "release/" + Pkg.name, targ,
332                 { defs:"-DBIG_ENDIAN_MODE", profile: "release"}
333                 ).addObjects(plat_supported[i].objList);
334         } else {
335             Pkg.addLibrary(lib + "debug/" + Pkg.name, targ,
336                 { defs:chip, profile: "debug"}
337                 ).addObjects(plat_supported[i].objList);
338             Pkg.addLibrary(lib + "release/" + Pkg.name, targ,
339                 { defs:chip, profile: "release"}
340                 ).addObjects(plat_supported[i].objList);
341         }
342     }
346 Pkg.otherFiles=[
347         '.settings/org.eclipse.cdt.core.prefs',
348         'lib/da830/debug/ti.sdo.edma3.drv.sample.a674',
349         'lib/da830/release/ti.sdo.edma3.drv.sample.a674',
350         'lib/c6748/debug/ti.sdo.edma3.drv.sample.a674',
351         'lib/c6748/release/ti.sdo.edma3.drv.sample.a674',
352         'lib/omapl138/debug/ti.sdo.edma3.drv.sample.a674',
353         'lib/omapl138/release/ti.sdo.edma3.drv.sample.a674',
354         'lib/omapl138/debug/ti.sdo.edma3.drv.sample.ae9',
355         'lib/omapl138/release/ti.sdo.edma3.drv.sample.ae9',
356         'lib/ti814x/debug/ti.sdo.edma3.drv.sample.a674',
357         'lib/ti814x/release/ti.sdo.edma3.drv.sample.a674',
358         'lib/ti814x/debug/ti.sdo.edma3.drv.sample.aea8f',
359         'lib/ti814x/release/ti.sdo.edma3.drv.sample.aea8f',
360         'lib/tci6608/debug/ti.sdo.edma3.drv.sample.ae66',
361         'lib/tci6608/debug/ti.sdo.edma3.drv.sample.ae66e',
362         'lib/tci6608/release/ti.sdo.edma3.drv.sample.ae66',
363         'lib/tci6608/release/ti.sdo.edma3.drv.sample.ae66e',
364         'lib/tci6616/debug/ti.sdo.edma3.drv.sample.ae66',
365         'lib/tci6616/debug/ti.sdo.edma3.drv.sample.ae66e',
366         'lib/tci6616/release/ti.sdo.edma3.drv.sample.ae66',
367         'lib/tci6616/release/ti.sdo.edma3.drv.sample.ae66e',
368         'lib/tci6614/debug/ti.sdo.edma3.drv.sample.ae66',
369         'lib/tci6614/debug/ti.sdo.edma3.drv.sample.ae66e',
370         'lib/tci6614/release/ti.sdo.edma3.drv.sample.ae66',
371         'lib/tci6614/release/ti.sdo.edma3.drv.sample.ae66e',
372         'lib/c6657/debug/ti.sdo.edma3.drv.sample.ae66',
373         'lib/c6657/debug/ti.sdo.edma3.drv.sample.ae66e',
374         'lib/c6657/release/ti.sdo.edma3.drv.sample.ae66',
375         'lib/c6657/release/ti.sdo.edma3.drv.sample.ae66e',
376         'lib/c6670/debug/ti.sdo.edma3.drv.sample.ae66',
377         'lib/c6670/debug/ti.sdo.edma3.drv.sample.ae66e',
378         'lib/c6670/release/ti.sdo.edma3.drv.sample.ae66',
379         'lib/c6670/release/ti.sdo.edma3.drv.sample.ae66e',
380         'lib/c6678/debug/ti.sdo.edma3.drv.sample.ae66',
381         'lib/c6678/debug/ti.sdo.edma3.drv.sample.ae66e',
382         'lib/c6678/release/ti.sdo.edma3.drv.sample.ae66',
383         'lib/c6678/release/ti.sdo.edma3.drv.sample.ae66e',
384         'lib/simti816x/debug/ti.sdo.edma3.drv.sample.a674',
385         'lib/simti816x/release/ti.sdo.edma3.drv.sample.a674',
386         'lib/evmti816x/debug/ti.sdo.edma3.drv.sample.a674',
387         'lib/evmti816x/release/ti.sdo.edma3.drv.sample.a674',
388         'lib/c6472/debug/ti.sdo.edma3.drv.sample.a64P',
389         'lib/c6472/debug/ti.sdo.edma3.drv.sample.a64Pe',
390         'lib/c6472/release/ti.sdo.edma3.drv.sample.a64P',
391         'lib/c6472/release/ti.sdo.edma3.drv.sample.a64Pe',
392         'lib/tci6486/debug/ti.sdo.edma3.drv.sample.a64P',
393         'lib/tci6486/debug/ti.sdo.edma3.drv.sample.a64Pe',
394         'lib/tci6486/release/ti.sdo.edma3.drv.sample.a64P',
395         'lib/tci6486/release/ti.sdo.edma3.drv.sample.a64Pe',
396         'src/sample_cs.c',
397         'src/sample_init.c',
398         'src/sample_arm_cs.c',
399         'src/sample_arm_init.c',
400         'src/platforms/sample_da830_cfg.c',
401         'src/platforms/sample_da830_int_reg.c',
402         'src/platforms/sample_c6748_cfg.c',
403         'src/platforms/sample_c6748_int_reg.c',
404         'src/platforms/sample_omapl138_cfg.c',
405         'src/platforms/sample_omapl138_int_reg.c',
406         'src/platforms/sample_omapl138_arm_cfg.c',
407         'src/platforms/sample_omapl138_arm_int_reg.c',
408         'src/platforms/sample_ti814x_cfg.c',
409         'src/platforms/sample_ti814x_int_reg.c',
410         'src/platforms/sample_ti814x_arm_cfg.c',
411         'src/platforms/sample_ti814x_arm_int_reg.c',
412         'src/platforms/sample_tci6608_cfg.c',
413         'src/platforms/sample_tci6608_int_reg.c',
414         'src/platforms/sample_tci6616_cfg.c',
415         'src/platforms/sample_tci6616_int_reg.c',
416         'src/platforms/sample_tci6614_cfg.c',
417         'src/platforms/sample_tci6614_int_reg.c',
418         'src/platforms/sample_c6657_cfg.c',
419         'src/platforms/sample_c6657_int_reg.c',
420         'src/platforms/sample_c6670_cfg.c',
421         'src/platforms/sample_c6670_int_reg.c',
422         'src/platforms/sample_c6678_cfg.c',
423         'src/platforms/sample_c6678_int_reg.c',
424         'src/platforms/sample_ti816x_cfg.c',
425         'src/platforms/sample_ti816x_int_reg.c',
426         'src/platforms/sample_c6472_cfg.c',
427         'src/platforms/sample_c6472_int_reg.c',
428         'src/platforms/sample_tci6486_cfg.c',
429         'src/platforms/sample_tci6486_int_reg.c',
430         '.cdtproject',
431         '.project',
432         'bios6_edma3_drv_sample.h',
433         'package.bld',
434         'package.xs',
435 ];