/* * Copyright (c) 2012-2013, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * ======== package.bld ======== * */ var Build = xdc.useModule('xdc.bld.BuildEnvironment'); var Pkg = xdc.useModule('xdc.bld.PackageContents'); Pkg.otherFiles = [ "mmrpc_test.c" ]; /* when constructing a release, release everything */ Pkg.attrs.exportAll = true; /* Uncomment this to build the app with debug support */ Pkg.attrs.profile = "debug"; /* bin/ is a generated directory that 'xdc clean' should remove */ Pkg.generatedFiles.$add("bin/"); /* define the platform instances we support - currently only OMAPL138 */ var evmOMAPL138_ExtMemMap = { DDR: { name: "DDR", base: 0xc3100000, len: 0x00800000, space: "code/data" } }; Build.platformTable["ti.platforms.evmOMAPL138:DSP"] = { externalMemoryMap: [ [ "DDR", evmOMAPL138_ExtMemMap.DDR ] ], codeMemory: "DDR", dataMemory: "DDR", stackMemory: "DDR", l2Mode: "32k" }; for (var i = 0; i < Build.targets.length; i++) { var targ = Build.targets[i]; // print("building for target " + targ.name + " ..."); /* currently only build for OMAPL138, Keystone II, OMAP5, and Vayu*/ if (!((targ.isa == "674") || (targ.isa == "66") || (targ.isa.match(/v7M(|4)/)) || (targ.isa == "64T"))) { continue; } /* Platforms were added to targ.platforms[] in config.bld */ for (var j = 0; j < targ.platforms.length; j++) { var platform = targ.platforms[j]; /* currently only build for OMAPL138, Keystone II, OMAP5, and Vayu*/ if (!((platform.match(/^ti\.platforms\.evm6614\:DSP/)) || (platform.match(/^ti\.platforms\.simKepler/)) || (platform.match(/^ti.platforms.evmTCI6638K2K/)) || (platform.match(/^ti\.platform\.omap54xx/)) || (platform.match(/^ti\.platform\.vayu/)) || (platform.match(/\.platforms\.evmOMAPL138/)))) { continue; } print(" platform: " + platform); // name = bin/platform/name.x+suffix var name = "bin/" + // replace all ':' and '.' with '_' in platform name platform.replace(/\:/g, "_").replace(/\./g, "_"); if (targ.isa.match(/^v7M(|4)$/)) { Pkg.addExecutable(name + "/ping_rpmsg", targ, platform, { cfgScript: "ping_rpmsg", defs: " -DRPMSG_NS_2_0" }).addObjects(["ping_rpmsg.c"]); } else if (targ.isa == "64T") { Pkg.addExecutable(name + "/ping_rpmsg", targ, platform, { cfgScript: "ping_rpmsg", defs: " -DRPMSG_NS_2_0" }).addObjects(["ping_rpmsg.c"]); } else if (targ.isa == "66" && platform.match(/^ti\.platform\.vayu/)) { Pkg.addExecutable(name + "/ping_rpmsg", targ, platform, { cfgScript: "ping_rpmsg", defs: " -DRPMSG_NS_2_0" }).addObjects(["ping_rpmsg.c"]); } else { Pkg.addExecutable(name + "/ping_rpmsg", targ, platform, { cfgScript: "ping_rpmsg" }).addObjects(["ping_rpmsg.c"]); } /* Only build this for our multicore platforms: */ if (platform.match(/^ti\.platforms\.simKepler/) || (platform.match(/^ti.platforms.evmTCI6638K2K/)) || (platform.match(/^ti\.platforms\.evm6614\:DSP/))) { Pkg.addExecutable(name + "/messageq_multicore", targ, platform, { cfgScript: "messageq_multicore", //defs: "-D TCI6614_v33" //defs: "-D TCI6614" defs: "-D TCI6638" }).addObjects(["messageq_multicore.c"]); Pkg.addExecutable(name + "/dual_transports", targ, platform, { cfgScript: "dual_transports", }).addObjects(["dual_transports.c"]); } Pkg.addExecutable(name + "/messageq_multi", targ, platform, { cfgScript: "rpmsg_transport", defs: "-D BENCHMARK " }).addObjects(["messageq_multi.c"]); Pkg.addExecutable(name + "/messageq_single", targ, platform, { cfgScript: "rpmsg_transport", defs: "-D BENCHMARK " }).addObjects(["messageq_single.c"]); if (platform.match(/^ti\.platforms\.evmOMAPL138\:DSP/)) { Pkg.addExecutable(name + "/nano_test", targ, platform, { cfgScript: "rpmsg_transport" }).addObjects(["nano_test.c"]); } if (platform.match(/^ti\.platform\.omap54xx\.ipu/)) { Pkg.addExecutable(name + "/test_omx_ipu_omap5", targ, platform, { cfgScript: "test_omx_ipu_omap5", defs: "-D IPU -D OMAP5xxx -DRPMSG_NS_2_0" }).addObjects(["test_omx.c","ping_tasks.c","rpc_task.c", "MxServer.c"]); } if (platform.match(/^ti\.platform\.omap54xx\.dsp/)) { Pkg.addExecutable(name + "/test_omx_dsp_omap5", targ, platform, { cfgScript: "test_omx_dsp_omap5", defs: "-D DSP -D OMAP5xxx -DRPMSG_NS_2_0" }).addObjects(["test_omx.c","ping_tasks.c","rpc_task.c", "MxServer.c"]); } if (platform.match(/^ti\.platform\.vayu\.ipu2/)) { Pkg.addExecutable(name + "/test_omx_ipu2_vayu", targ, platform, { cfgScript: "test_omx_ipu_vayu", defs: "-D IPU -D VAYU -DRPMSG_NS_2_0" }).addObjects(["test_omx.c","ping_tasks.c","rpc_task.c", "MxServer.c"]); } if (platform.match(/^ti\.platform\.vayu\.dsp1/)) { Pkg.addExecutable(name + "/test_omx_dsp1_vayu", targ, platform, { cfgScript: "test_omx_dsp_vayu", defs: "-D DSP -D VAYU -DRPMSG_NS_2_0" }).addObjects(["test_omx.c","ping_tasks.c","rpc_task.c", "MxServer.c"]); } } }