Tests: Update tests to use DRA7XX platform instance
[ipc/ipcdev.git] / packages / ti / ipc / tests / package.bld
1 /*
2  * Copyright (c) 2012-2013, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*
33  *  ======== package.bld ========
34  *
35  */
37 var Build = xdc.useModule('xdc.bld.BuildEnvironment');
38 var Pkg = xdc.useModule('xdc.bld.PackageContents');
40 Pkg.otherFiles = [ "mmrpc_test.c" ];
42 /* when constructing a release, release everything */
43 Pkg.attrs.exportAll = true;
45 /* Uncomment this to build the app with debug support */
46 Pkg.attrs.profile = "debug";
48 /* bin/ is a generated directory that 'xdc clean' should remove */
49 Pkg.generatedFiles.$add("bin/");
51 /* define the platform instances we support */
52 /* OMAPL138 */
53 var evmOMAPL138_ExtMemMap = {
54     DDR: {
55         name: "DDR",
56         base: 0xc3100000,
57         len:  0x00800000,
58         space: "code/data"
59     }
60 };
62 Build.platformTable["ti.platforms.evmOMAPL138:DSP"] = {
63     externalMemoryMap: [
64         [ "DDR", evmOMAPL138_ExtMemMap.DDR ]
65     ],
66     codeMemory: "DDR",
67     dataMemory: "DDR",
68     stackMemory: "DDR",
69     l2Mode: "32k"
70 };
72 /*  Memory Map for ti.platforms.sdp5430:IPU
73  *
74  *  --- External Memory ---
75  *  Virtual     Physical        Size            Comment
76  *  ------------------------------------------------------------------------
77  *  0000_4000   ????_????    5F_C000  (  ~6 MB) EXT_CODE
78  *  8000_0000   ????_????    60_0000  (   6 MB) EXT_DATA
79  *  8060_0000   ????_????   960_0000  (  86 MB) EXT_HEAP
80  *  9F00_0000   9F00_0000     6_0000  ( 384 kB) TRACE_BUF
81  *  9F06_0000   9F06_0000     1_0000  (  64 kB) EXC_DATA
82  *  9F07_0000   9F07_0000     2_0000  ( 128 kB) PM_DATA (Power mgmt)
83  */
84 var sdp5430_ExtMemMapIpu = {
85     EXT_CODE: {
86         name: "EXT_CODE",
87         base: 0x00004000,
88         len:  0x005FC000,
89         space: "code",
90         access: "RWX"
91     },
92     EXT_DATA: {
93         name: "EXT_DATA",
94         base: 0x80000000,
95         len:  0x00600000,
96         space: "data",
97         access: "RW"
98     },
99     EXT_HEAP: {
100         name: "EXT_HEAP",
101         base: 0x80600000,
102         len:  0x09600000,
103         space: "data",
104         access: "RW"
105     },
106     TRACE_BUF: {
107         name: "TRACE_BUF",
108         base: 0x9F000000,
109         len:  0x00060000,
110         space: "data",
111         access: "RW"
112     },
113     EXC_DATA: {
114         name: "EXC_DATA",
115         base: 0x9F060000,
116         len:  0x00010000,
117         space: "data",
118         access: "RW"
119     },
120     PM_DATA: {
121         name: "PM_DATA",
122         base: 0x9F070000,
123         len:  0x00020000,
124         space: "data",
125         access: "RWX"  /* should this have execute perm? */
126     }
127 };
129 Build.platformTable["ti.platforms.sdp5430:IPU"] = {
130     externalMemoryMap: [
131         [ "EXT_CODE", sdp5430_ExtMemMapIpu.EXT_CODE ],
132         [ "EXT_DATA", sdp5430_ExtMemMapIpu.EXT_DATA ],
133         [ "EXT_HEAP", sdp5430_ExtMemMapIpu.EXT_HEAP ],
134         [ "TRACE_BUF", sdp5430_ExtMemMapIpu.TRACE_BUF ],
135         [ "EXC_DATA", sdp5430_ExtMemMapIpu.EXC_DATA ],
136         [ "PM_DATA", sdp5430_ExtMemMapIpu.PM_DATA ]
137     ],
138     codeMemory: "EXT_CODE",
139     dataMemory: "EXT_DATA",
140     stackMemory: "EXT_DATA",
141 };
143 /*  Memory Map for ti.platforms.sdp5430:DSP
144  *
145  *  --- External Memory ---
146  *  Virtual     Physical        Size            Comment
147  *  ------------------------------------------------------------------------
148  *  2000_0000   ????_????    10_0000  (   1 MB) EXT_CODE
149  *  9000_0000   ????_????    10_0000  (   1 MB) EXT_DATA
150  *  9010_0000   ????_????    30_0000  (   3 MB) EXT_HEAP
151  *  9F00_0000   9F00_0000     6_0000  ( 384 kB) TRACE_BUF
152  *  9F06_0000   9F06_0000     1_0000  (  64 kB) EXC_DATA
153  *  9F07_0000   9F07_0000     2_0000  ( 128 kB) PM_DATA (Power mgmt)
154  */
155 var sdp5430_ExtMemMapDsp = {
156     EXT_CODE: {
157         name: "EXT_CODE",
158         base: 0x20000000,
159         len:  0x00100000,
160         space: "code",
161         access: "RWX"
162     },
163     EXT_DATA: {
164         name: "EXT_DATA",
165         base: 0x90000000,
166         len:  0x00100000,
167         space: "data",
168         access: "RW"
169     },
170     EXT_HEAP: {
171         name: "EXT_HEAP",
172         base: 0x90100000,
173         len:  0x00300000,
174         space: "data",
175         access: "RW"
176     },
177     TRACE_BUF: {
178         name: "TRACE_BUF",
179         base: 0x9F000000,
180         len:  0x00060000,
181         space: "data",
182         access: "RW"
183     },
184     EXC_DATA: {
185         name: "EXC_DATA",
186         base: 0x9F060000,
187         len:  0x00010000,
188         space: "data",
189         access: "RW"
190     },
191     PM_DATA: {
192         name: "PM_DATA",
193         base: 0x9F070000,
194         len:  0x00020000,
195         space: "data",
196         access: "RWX"  /* should this have execute perm? */
197     }
198 };
200 Build.platformTable["ti.platforms.sdp5430:DSP"] = {
201     externalMemoryMap: [
202         [ "EXT_CODE", sdp5430_ExtMemMapDsp.EXT_CODE ],
203         [ "EXT_DATA", sdp5430_ExtMemMapDsp.EXT_DATA ],
204         [ "EXT_HEAP", sdp5430_ExtMemMapDsp.EXT_HEAP ],
205         [ "TRACE_BUF", sdp5430_ExtMemMapDsp.TRACE_BUF ],
206         [ "EXC_DATA", sdp5430_ExtMemMapDsp.EXC_DATA ],
207         [ "PM_DATA", sdp5430_ExtMemMapDsp.PM_DATA ]
208     ],
209     codeMemory: "EXT_CODE",
210     dataMemory: "EXT_DATA",
211     stackMemory: "EXT_DATA",
212 };
214 /*  Memory Map for ti.platforms.evmDRA7XX:dsp1
215  *
216  *  --- External Memory ---
217  *  Virtual     Physical        Size            Comment
218  *  ------------------------------------------------------------------------
219  *  0000_4000   ????_????    5F_C000  (  ~6 MB) EXT_CODE
220  *  8000_0000   ????_????    60_0000  (   6 MB) EXT_DATA
221  *  8060_0000   ????_????   960_0000  (  86 MB) EXT_HEAP
222  *  9F00_0000   9F00_0000     6_0000  ( 384 kB) TRACE_BUF
223  *  9F06_0000   9F06_0000     1_0000  (  64 kB) EXC_DATA
224  *  9F07_0000   9F07_0000     2_0000  ( 128 kB) PM_DATA (Power mgmt)
225  */
226 var evmDRA7XX_ExtMemMapDsp1 = {
227     EXT_CODE: {
228         name: "EXT_CODE",
229         base: 0x95000000,
230         len:  0x00100000,
231         space: "code",
232         access: "RWX"
233     },
234     EXT_DATA: {
235         name: "EXT_DATA",
236         base: 0x95100000,
237         len:  0x00100000,
238         space: "data",
239         access: "RW"
240     },
241     EXT_HEAP: {
242         name: "EXT_HEAP",
243         base: 0x95200000,
244         len:  0x00300000,
245         space: "data",
246         access: "RW"
247     },
248     TRACE_BUF: {
249         name: "TRACE_BUF",
250         base: 0x9F000000,
251         len:  0x00060000,
252         space: "data",
253         access: "RW"
254     },
255     EXC_DATA: {
256         name: "EXC_DATA",
257         base: 0x9F060000,
258         len:  0x00010000,
259         space: "data",
260         access: "RW"
261     },
262     PM_DATA: {
263         name: "PM_DATA",
264         base: 0x9F070000,
265         len:  0x00020000,
266         space: "data",
267         access: "RWX"  /* should this have execute perm? */
268     }
269 };
271 Build.platformTable["ti.platforms.evmDRA7XX:dsp1"] = {
272     externalMemoryMap: [
273         [ "EXT_CODE", evmDRA7XX_ExtMemMapDsp1.EXT_CODE ],
274         [ "EXT_DATA", evmDRA7XX_ExtMemMapDsp1.EXT_DATA ],
275         [ "EXT_HEAP", evmDRA7XX_ExtMemMapDsp1.EXT_HEAP ],
276         [ "TRACE_BUF", evmDRA7XX_ExtMemMapDsp1.TRACE_BUF ],
277         [ "EXC_DATA", evmDRA7XX_ExtMemMapDsp1.EXC_DATA ],
278         [ "PM_DATA", evmDRA7XX_ExtMemMapDsp1.PM_DATA ]
279     ],
280     codeMemory: "EXT_CODE",
281     dataMemory: "EXT_DATA",
282     stackMemory: "EXT_DATA",
283 };
286 /*  Memory Map for ti.platforms.evmDRA7XX:ipu2
287  *
288  *  --- External Memory ---
289  *  Virtual     Physical        Size            Comment
290  *  ------------------------------------------------------------------------
291  *  0000_4000   ????_????    5F_C000  (  ~6 MB) EXT_CODE
292  *  8000_0000   ????_????    60_0000  (   6 MB) EXT_DATA
293  *  8060_0000   ????_????   960_0000  (  86 MB) EXT_HEAP
294  *  9F00_0000   9F00_0000     6_0000  ( 384 kB) TRACE_BUF
295  *  9F06_0000   9F06_0000     1_0000  (  64 kB) EXC_DATA
296  *  9F07_0000   9F07_0000     2_0000  ( 128 kB) PM_DATA (Power mgmt)
297  */
298 var evmDRA7XX_ExtMemMapIpu2 = {
299     EXT_CODE: {
300         name: "EXT_CODE",
301         base: 0x00004000,
302         len:  0x005FC000,
303         space: "code",
304         access: "RWX"
305     },
306     EXT_DATA: {
307         name: "EXT_DATA",
308         base: 0x80000000,
309         len:  0x00600000,
310         space: "data",
311         access: "RW"
312     },
313     EXT_HEAP: {
314         name: "EXT_HEAP",
315         base: 0x80600000,
316         len:  0x09600000,
317         space: "data",
318         access: "RW"
319     },
320     TRACE_BUF: {
321         name: "TRACE_BUF",
322         base: 0x9F000000,
323         len:  0x00060000,
324         space: "data",
325         access: "RW"
326     },
327     EXC_DATA: {
328         name: "EXC_DATA",
329         base: 0x9F060000,
330         len:  0x00010000,
331         space: "data",
332         access: "RW"
333     },
334     PM_DATA: {
335         name: "PM_DATA",
336         base: 0x9F070000,
337         len:  0x00020000,
338         space: "data",
339         access: "RWX"  /* should this have execute perm? */
340     }
341 };
343 Build.platformTable["ti.platforms.evmDRA7XX:ipu2"] = {
344     externalMemoryMap: [
345         [ "EXT_CODE", evmDRA7XX_ExtMemMapIpu2.EXT_CODE ],
346         [ "EXT_DATA", evmDRA7XX_ExtMemMapIpu2.EXT_DATA ],
347         [ "EXT_HEAP", evmDRA7XX_ExtMemMapIpu2.EXT_HEAP ],
348         [ "TRACE_BUF", evmDRA7XX_ExtMemMapIpu2.TRACE_BUF ],
349         [ "EXC_DATA", evmDRA7XX_ExtMemMapIpu2.EXC_DATA ],
350         [ "PM_DATA", evmDRA7XX_ExtMemMapIpu2.PM_DATA ]
351     ],
352     codeMemory: "EXT_CODE",
353     dataMemory: "EXT_DATA",
354     stackMemory: "EXT_DATA",
355 };
357 for (var i = 0; i < Build.targets.length; i++) {
358     var targ = Build.targets[i];
360 //    print("building for target " + targ.name + " ...");
362     /* currently only build for OMAPL138, Keystone II, OMAP5, and Vayu*/
363     if (!((targ.isa == "674") || (targ.isa == "66") ||
364           (targ.isa.match(/v7M(|4)/)) || (targ.isa == "64T"))) {
365         continue;
366     }
368     /* Platforms were added to targ.platforms[] in config.bld */
369     for (var j = 0; j < targ.platforms.length; j++) {
370         var platform = targ.platforms[j];
372         /* currently only build for OMAPL138, Keystone II, OMAP5, and Vayu*/
373         if (!((platform.match(/^ti\.platforms\.evm6614\:DSP/)) ||
374               (platform.match(/^ti\.platforms\.simKepler/)) ||
375               (platform.match(/^ti.platforms.evmTCI6638K2K/)) ||
376               (platform.match(/^ti\.platform\.omap54xx/)) ||
377               (platform.match(/^ti\.platforms\.sdp5430/)) ||
378               (platform.match(/^ti\.platform\.vayu/)) ||
379               (platform.match(/^ti\.platforms\.evmDRA7XX/)) ||
380               (platform.match(/\.platforms\.evmOMAPL138/)))) {
381              continue;
382         }
384         print("  platform:  " + platform);
385         // name = bin/platform/name.x+suffix
386         var name = "bin/" +
387                 // replace all ':' and '.' with '_' in platform name
388                 platform.replace(/\:/g, "_").replace(/\./g, "_");
390         var extraDefs = "";
392         /* Vayu and OMAP5 require MmRpc and therefore use RPMSG_NS_2_0 */
393         if (platform.match(/^ti\.platform\.vayu/) ||
394                 platform.match(/^ti\.platforms\.evmDRA7XX/) ||
395                 platform.match(/^ti\.platform\.sdp5430$/)) {
396             extraDefs = " -DRPMSG_NS_2_0";
397         }
399         /* ping_rpmsg */
400         Pkg.addExecutable(name + "/ping_rpmsg", targ, platform, {
401             cfgScript: "ping_rpmsg",
402             defs: extraDefs
403         }).addObjects(["ping_rpmsg.c"]);
405         /* messageq_multicore - only for our homogeneous multicore platforms */
406         if (platform.match(/^ti\.platforms\.simKepler/) ||
407                 (platform.match(/^ti.platforms.evmTCI6638K2K/)) ||
408                 (platform.match(/^ti\.platforms\.evm6614\:DSP/))) {
409             Pkg.addExecutable(name + "/messageq_multicore", targ, platform, {
410                 cfgScript: "messageq_multicore",
411                 //defs: "-D TCI6614_v33"
412                 //defs: "-D TCI6614"
413                 defs: "-D TCI6638"
414             }).addObjects(["messageq_multicore.c"]);
416             Pkg.addExecutable(name + "/dual_transports", targ, platform, {
417                 cfgScript: "dual_transports",
418             }).addObjects(["dual_transports.c"]);
419         }
421         /* messageq_multi */
422         Pkg.addExecutable(name + "/messageq_multi", targ, platform, {
423             cfgScript: "rpmsg_transport",
424             defs: "-D BENCHMARK" + extraDefs
425         }).addObjects(["messageq_multi.c"]);
427         /* messageq_single */
428         Pkg.addExecutable(name + "/messageq_single", targ, platform, {
429             cfgScript: "rpmsg_transport",
430             defs: "-D BENCHMARK " + extraDefs
431         }).addObjects(["messageq_single.c"]);
433         /* nano_test - demonstrates passing ptrs using CMEM */
434         if (platform.match(/^ti\.platforms\.evmOMAPL138\:DSP/)) {
435             Pkg.addExecutable(name + "/nano_test", targ, platform, {
436                 cfgScript: "rpmsg_transport"
437             }).addObjects(["nano_test.c"]);
438         }
440         var test_omx_SRCS = ["test_omx.c","ping_tasks.c","rpc_task.c",
441                 "MxServer.c"];
443         if (platform.match(/^ti\.platforms\.sdp5430/) &&
444                 (targ.isa == "v7M4")) {
445             Pkg.addExecutable(name + "/test_omx_ipu_omap5", targ, platform, {
446                 cfgScript: "test_omx_ipu_omap5",
447                 defs: "-D IPU -D OMAP5xxx -DRPMSG_NS_2_0"
448             }).addObjects(test_omx_SRCS);
449         }
451         if (platform.match(/^ti\.platforms\.sdp5430/) &&
452                 (targ.isa == "64T")) {
453             Pkg.addExecutable(name + "/test_omx_dsp_omap5", targ, platform, {
454                 cfgScript: "test_omx_dsp_omap5",
455                 defs: "-D DSP -D OMAP5xxx -DRPMSG_NS_2_0"
456             }).addObjects(test_omx_SRCS);
457         }
459         if (platform.match(/^ti\.platform\.vayu\.ipu2/) ||
460                 platform.match(/^ti\.platforms\.evmDRA7XX:ipu2$/)) {
461             Pkg.addExecutable(name + "/test_omx_ipu2_vayu", targ, platform, {
462                 cfgScript: "test_omx_ipu_vayu",
463                 defs: "-D IPU -D VAYU -DRPMSG_NS_2_0"
464             }).addObjects(test_omx_SRCS);
465         }
467         if (platform.match(/^ti\.platform\.vayu\.dsp1/) ||
468                 platform.match(/^ti\.platforms\.evmDRA7XX:dsp1$/)) {
469             Pkg.addExecutable(name + "/test_omx_dsp1_vayu", targ, platform, {
470                 cfgScript: "test_omx_dsp_vayu",
471                 defs: "-D DSP -D VAYU -DRPMSG_NS_2_0"
472             }).addObjects(test_omx_SRCS);
473         }
474     }