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 - currently only OMAPL138 */
52 var evmOMAPL138_ExtMemMap = {
53 DDR: {
54 name: "DDR",
55 base: 0xc3100000,
56 len: 0x00800000,
57 space: "code/data"
58 }
59 };
61 Build.platformTable["ti.platforms.evmOMAPL138:DSP"] = {
62 externalMemoryMap: [
63 [ "DDR", evmOMAPL138_ExtMemMap.DDR ]
64 ],
65 codeMemory: "DDR",
66 dataMemory: "DDR",
67 stackMemory: "DDR",
68 l2Mode: "32k"
69 };
71 for (var i = 0; i < Build.targets.length; i++) {
72 var targ = Build.targets[i];
74 // print("building for target " + targ.name + " ...");
76 /* currently only build for OMAPL138, Keystone II, and OMAP5*/
77 if (!((targ.isa == "674") || (targ.isa == "66") ||
78 (targ.isa.match(/v7M(|4)/)) || (targ.isa == "64T"))) {
79 continue;
80 }
82 /* Platforms were added to targ.platforms[] in config.bld */
83 for (var j = 0; j < targ.platforms.length; j++) {
84 var platform = targ.platforms[j];
86 /* currently only build for OMAPL138, Keystone II, and OMAP5*/
87 if (!((platform.match(/^ti\.platforms\.evm6614\:DSP/)) ||
88 (platform.match(/^ti\.platforms\.simKepler/)) ||
89 (platform.match(/^ti.platforms.evmTCI6638K2K/)) ||
90 (platform.match(/^ti\.platform\.omap54xx/)) ||
91 (platform.match(/\.platforms\.evmOMAPL138/)))) {
92 continue;
93 }
95 print(" platform: " + platform);
96 // name = bin/platform/name.x+suffix
97 var name = "bin/" +
98 // replace all ':' and '.' with '_' in platform name
99 platform.replace(/\:/g, "_").replace(/\./g, "_");
101 if (targ.isa.match(/^v7M(|4)$/)) {
102 Pkg.addExecutable(name + "/ping_rpmsg", targ, platform, {
103 cfgScript: "ping_rpmsg",
104 defs: " -DOMAP5"
105 }).addObjects(["ping_rpmsg.c"]);
106 } else {
107 Pkg.addExecutable(name + "/ping_rpmsg", targ, platform, {
108 cfgScript: "ping_rpmsg"
109 }).addObjects(["ping_rpmsg.c"]);
110 }
112 /* Only build this for our multicore platforms: */
113 if (platform.match(/^ti\.platforms\.simKepler/) ||
114 (platform.match(/^ti.platforms.evmTCI6638K2K/)) ||
115 (platform.match(/^ti\.platforms\.evm6614\:DSP/))) {
116 Pkg.addExecutable(name + "/messageq_multicore", targ, platform, {
117 cfgScript: "messageq_multicore",
118 //defs: "-D TCI6614_v33"
119 //defs: "-D TCI6614"
120 defs: "-D TCI6638"
121 }).addObjects(["messageq_multicore.c"]);
123 Pkg.addExecutable(name + "/dual_transports", targ, platform, {
124 cfgScript: "dual_transports",
125 }).addObjects(["dual_transports.c"]);
126 }
128 Pkg.addExecutable(name + "/messageq_multi", targ, platform, {
129 cfgScript: "rpmsg_transport",
130 defs: "-D BENCHMARK "
131 }).addObjects(["messageq_multi.c"]);
133 Pkg.addExecutable(name + "/messageq_single", targ, platform, {
134 cfgScript: "rpmsg_transport",
135 defs: "-D BENCHMARK "
136 }).addObjects(["messageq_single.c"]);
138 if (platform.match(/^ti\.platforms\.evmOMAPL138\:DSP/)) {
139 Pkg.addExecutable(name + "/nano_test", targ, platform, {
140 cfgScript: "rpmsg_transport"
141 }).addObjects(["nano_test.c"]);
142 }
144 if (platform.match(/^ti\.platform\.omap54xx\.ipu/)) {
145 Pkg.addExecutable(name + "/test_omx_ipu_omap5", targ, platform, {
146 cfgScript: "test_omx_ipu_omap5",
147 defs: "-D IPU -D OMAP5xxx -DOMAP5"
148 }).addObjects(["test_omx.c","ping_tasks.c","rpc_task.c",
149 "MxServer.c"]);
150 }
152 if (platform.match(/^ti\.platform\.omap54xx\.dsp/)) {
153 Pkg.addExecutable(name + "/test_omx_dsp_omap5", targ, platform, {
154 cfgScript: "test_omx_dsp_omap5",
155 defs: "-D DSP -D OMAP5xxx"
156 }).addObjects(["test_omx.c","ping_tasks.c","rpc_task",
157 "MxServer.c"]);
158 }
159 }
160 }