index a1a3c83078832ed630170f7ddaa052bde0ac1a78..7e32769d428ccac186d5566548a0bc029bafe290 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
var BIOS = null;
var Build = null;
+var Ipc = null;
+
+var custom6xOpts = " -q -mi10 -mo -pdr -pden -pds=238 -pds=880 -pds1110 ";
+var customARP32xOpts = " -q --gen_func_subsections ";
+var customArmOpts = " -q -ms --opt_for_speed=2 ";
+var customGnuArmM3Opts = " ";
+var customGnuArmM4Opts = " ";
+var customGnuArmM4FOpts = " ";
+var customGnuArmA9Opts = " ";
+var customGnuArmA8Opts = " ";
+var customGnuArmA15Opts = " ";
+
+var ccOptsList = {
+ "ti.targets.C64P" : custom6xOpts,
+ "ti.targets.elf.C64P" : custom6xOpts,
+ "ti.targets.C64P_big_endian" : custom6xOpts,
+ "ti.targets.elf.C64P_big_endian" : custom6xOpts,
+ "ti.targets.C674" : custom6xOpts,
+ "ti.targets.elf.C674" : custom6xOpts,
+ "ti.targets.elf.C67P" : custom6xOpts,
+ "ti.targets.elf.C64T" : custom6xOpts,
+ "ti.targets.elf.C66" : custom6xOpts,
+ "ti.targets.elf.C66_big_endian" : custom6xOpts,
+ "ti.targets.arp32.elf.ARP32" : customARP32xOpts,
+ "ti.targets.arp32.elf.ARP32_far" : customARP32xOpts,
+ "ti.targets.arm.elf.Arm9" : customArmOpts,
+ "ti.targets.arm.elf.A8F" : customArmOpts,
+ "ti.targets.arm.elf.A8Fnv" : customArmOpts,
+ "ti.targets.arm.elf.M3" : customArmOpts,
+ "ti.targets.arm.elf.M4" : customArmOpts,
+ "ti.targets.arm.elf.M4F" : customArmOpts,
+ "gnu.targets.arm.M3" : customGnuArmM3Opts,
+ "gnu.targets.arm.M4" : customGnuArmM4Opts,
+ "gnu.targets.arm.M4F" : customGnuArmM4FOpts,
+ "gnu.targets.arm.A8F" : customGnuArmA8Opts,
+ "gnu.targets.arm.A9F" : customGnuArmA9Opts,
+ "gnu.targets.arm.A15F" : customGnuArmA15Opts,
+};
+
+var ipcPackages = [
+ "ti.sdo.ipc",
+ "ti.sdo.ipc.family.omap4430",
+ "ti.sdo.ipc.family.omap3530",
+ "ti.sdo.ipc.family.da830",
+ "ti.sdo.ipc.family.dm6446",
+ "ti.sdo.ipc.family.ti81xx",
+ "ti.sdo.ipc.family.arctic",
+ "ti.sdo.ipc.family.f28m35x",
+ "ti.sdo.ipc.family.f2837x",
+ "ti.sdo.ipc.family.c647x",
+ "ti.sdo.ipc.family.c6a8149",
+ "ti.sdo.ipc.family.tci663x",
+ "ti.sdo.ipc.family.tda3xx",
+ "ti.sdo.ipc.family.vayu",
+ "ti.sdo.ipc.gates",
+ "ti.sdo.ipc.heaps",
+ "ti.sdo.ipc.notifyDrivers",
+ "ti.sdo.ipc.nsremote",
+ "ti.sdo.ipc.transports",
+ "ti.sdo.utils",
+ "ti.ipc.family.tci6614",
+ "ti.ipc.family.tci6638",
+ "ti.ipc.family.vayu",
+ "ti.ipc.namesrv",
+ "ti.ipc.remoteproc",
+ "ti.ipc.transports"
+];
+
+var cFiles = {
+ "ti.ipc.ipcmgr" : {
+ cSources: [ "IpcMgr.c" ]
+ },
+ "ti.ipc.family.vayu" : {
+ cSources: [ "VirtQueue.c" ]
+ },
+ "ti.ipc.rpmsg" : {
+ cSources: [ "NameMap.c", "RPMessage.c" ]
+ }
+};
+
+/*
+ * ======== module$meta$init ========
+ */
+function module$meta$init()
+{
+ /* Only process during "cfg" phase */
+ if (xdc.om.$name != "cfg") {
+ return;
+ }
+
+ Build = this;
+
+ /*
+ * Set default verbose level for custom build flow
+ * User can override this in their cfg file.
+ */
+ var SourceDir = xdc.module("xdc.cfg.SourceDir");
+ SourceDir.verbose = 2;
+
+ /* register onSet hooks */
+ var GetSet = xdc.module("xdc.services.getset.GetSet");
+ GetSet.onSet(this, "libType", _setLibType);
+
+ /* Construct default customCCOpts value.
+ * User can override this in their cfg file.
+ */
+ Build.customCCOpts = Build.getDefaultCustomCCOpts();
+
+ /* needed by IPackage.close() method */
+ Build.$private.ipcPkgs = ipcPackages;
+ Build.$private.cFiles = cFiles;
+}
/*
* ======== module$use ========
function module$use()
{
BIOS = xdc.module("ti.sysbios.BIOS");
- Build = this;
+ var profile;
/* inform ti.sdo.utils.Build *not* to contribute libraries */
- xdc.module("ti.sdo.utils.Build").doBuild = false;
+// xdc.module("ti.sdo.utils.Build").doBuild = false;
+
+ /* if Build.libType is undefined, use BIOS.libType */
+ if (Build.libType == undefined) {
+ switch (BIOS.libType) {
+ case BIOS.LibType_Instrumented:
+ Build.libType = Build.LibType_Instrumented;
+ break;
+ case BIOS.LibType_NonInstrumented:
+ Build.libType = Build.LibType_NonInstrumented;
+ break;
+ case BIOS.LibType_Custom:
+ Build.libType = Build.LibType_Custom;
+ break;
+ case BIOS.LibType_Debug:
+ Build.libType = Build.LibType_Debug;
+ break;
+ }
+ }
+
+ /* Get the profile associated with the ti.sdo.ipc package. The
+ * profile may be specified per package with a line like this
+ * in your .cfg script:
+ *
+ * xdc.loadPackage('ti.sdo.ipc').profile = "release";
+ */
+ if (this.$package.profile != undefined) {
+ profile = this.$package.profile;
+ }
+ else {
+ profile = Program.build.profile;
+ }
+
+ /* gracefully handle non-supported whole_program profiles */
+ if (profile.match(/whole_program/) &&
+ (Build.libType != Build.LibType_Debug)) {
+
+ /* allow build to proceed */
+ Build.libType = Build.LibType_Debug;
+ /* but warning the user */
+ Build.$logWarning(
+ "The '" + profile + "' build profile will not be supported " +
+ "in future releases of IPC. Use 'release' or 'debug' profiles " +
+ "together with the 'Build.libType' configuration parameter to " +
+ "specify your preferred library. See the compatibility section " +
+ "of your IPC release notes for more information.",
+ "Profile Deprecation Warning", Build);
+ }
/* inform getLibs() about location of library */
- switch (BIOS.libType) {
- case BIOS.LibType_Instrumented:
+ switch (Build.libType) {
+ case Build.LibType_Instrumented:
this.$private.libraryName = "/ipc.a" + Program.build.target.suffix;
- this.$private.outputDir = this.$package.packageBase + "lib/"
- + (BIOS.smpEnabled ? "smpipc/instrumented/" : "ipc/instrumented/");
+ this.$private.outputDir = this.$package.packageBase + "lib/" +
+ (BIOS.smpEnabled ? "smpipc/instrumented/":"ipc/instrumented/");
break;
- case BIOS.LibType_NonInstrumented:
+ case Build.LibType_NonInstrumented:
this.$private.libraryName = "/ipc.a" + Program.build.target.suffix;
- this.$private.outputDir = this.$package.packageBase + "lib/"
- + (BIOS.smpEnabled ? "smpipc/nonInstrumented/" : "ipc/nonInstrumented/");
+ this.$private.outputDir = this.$package.packageBase + "lib/" +
+ (BIOS.smpEnabled ? "smpipc/nonInstrumented/" :
+ "ipc/nonInstrumented/");
break;
- case BIOS.LibType_Custom:
+ case Build.LibType_Debug:
+ case Build.LibType_Custom:
this.$private.libraryName = "/ipc.a" + Program.build.target.suffix;
var SourceDir = xdc.useModule("xdc.cfg.SourceDir");
/* if building a pre-built library */
if (BIOS.buildingAppLib == false) {
- var appName = Program.name.substring(0, Program.name.lastIndexOf('.'));
+ var appName = Program.name.substring(0,
+ Program.name.lastIndexOf('.'));
this.$private.libDir = this.$package.packageBase + Build.libDir;
if (!java.io.File(this.$private.libDir).exists()) {
java.io.File(this.$private.libDir).mkdir();
}
else {
var curPath = java.io.File(".").getCanonicalPath();
- /* If package.bld world AND building an application OR pre-built lib */
+ /* If package.bld world AND building an application OR
+ * pre-built lib... */
if (java.io.File(curPath).getName() != "configPkg") {
- var appName = Program.name.substring(0, Program.name.lastIndexOf('.'));
- appName = appName + "_p" + Program.build.target.suffix + ".src";
+ var appName = Program.name.substring(0,
+ Program.name.lastIndexOf('.'));
+ appName = appName + "_p" + Program.build.target.suffix +
+ ".src";
SourceDir.outputDir = "package/cfg/" + appName;
SourceDir.toBuildDir = ".";
var src = SourceDir.create("ipc");
/* Here ONLY if building an application in CCS world */
else {
/* request output source directory for generated files */
- var appName = Program.name.substring(0, Program.name.lastIndexOf('.'));
- appName = appName + "_" + Program.name.substr(Program.name.lastIndexOf('.')+1);
+ var appName = Program.name.substring(0,
+ Program.name.lastIndexOf('.'));
+ appName = appName + "_" + Program.name.substr(
+ Program.name.lastIndexOf('.')+1);
SourceDir.toBuildDir = "..";
var src = SourceDir.create("ipc/");
src.libraryName = this.$private.libraryName.substring(1);
- /* save this directory in our private state (to be read during
- * generation, see Gen.xdt)
- */
+ /* save this directory in our private state (to be
+ * read during generation, see Gen.xdt)
+ */
this.$private.outputDir = src.getGenSourceDir();
}
}
}
/*
- * Add pre-built Instrumented and Non-Intrumented release libs
+ * ======== module$validate ========
+ * Some redundant tests are here to catch changes since
+ * module$static$init() and instance$static$init().
+ */
+function module$validate()
+{
+ var Defaults = xdc.module('xdc.runtime.Defaults');
+ var Diags = xdc.module("xdc.runtime.Diags");
+ var libType = getEnumString(Build.libType);
+
+ switch (Build.libType) {
+ case Build.LibType_Instrumented:
+ if (Build.assertsEnabled == false) {
+ Build.$logWarning(
+ "Build.assertsEnabled must be set to true when " +
+ "Build.libType == Build." + libType + ". " + "Set " +
+ "Build.libType = Build.LibType_Custom to build a " +
+ "custom library or update your configuration.",
+ Build, "assertsEnabled");
+ }
+ if (Build.logsEnabled == false) {
+ Build.$logWarning(
+ "Build.logsEnabled must be set to true when " +
+ "Build.libType == Build." + libType + ". " + "Set " +
+ "Build.libType = Build.LibType_Custom to build a " +
+ "custom library or update your configuration.",
+ Build, "logsEnabled");
+ }
+ break;
+
+ case Build.LibType_NonInstrumented:
+ if ((Build.assertsEnabled == true) &&
+ Build.$written("assertsEnabled")){
+ Build.$logWarning(
+ "Build.assertsEnabled must be set to false when " +
+ "Build.libType == Build." + libType + ". " + "Set " +
+ "Build.libType = Build.LibType_Custom to build a " +
+ "custom library or update your configuration.",
+ Build, "assertsEnabled");
+ }
+ if ((Build.logsEnabled == true) && Build.$written("logsEnabled")) {
+ Build.$logWarning(
+ "Build.logsEnabled must be set to false when " +
+ "Build.libType == Build." + libType + ". " + "Set " +
+ "Build.libType = Build.LibType_Custom to build a " +
+ "custom library or update your configuration.",
+ Build, "logsEnabled");
+ }
+ break;
+
+ case Build.LibType_Custom:
+ if ((Build.assertsEnabled == true)
+ && (Defaults.common$.diags_ASSERT == Diags.ALWAYS_OFF)
+ && (Defaults.common$.diags_INTERNAL == Diags.ALWAYS_OFF)) {
+ Build.$logWarning(
+ "Build.assertsEnabled should be set to 'false' when " +
+ "Defaults.common$.diags_ASSERT == Diags.ALWAYS_OFF.",
+ Build, "assertsEnabled");
+ }
+ break;
+ }
+}
+
+/*
+ * ======== getCCOpts ========
*/
+function getCCOpts(target)
+{
+ var ccOpts = "";
-var ipcSources = "ipc/GateMP.c " +
- "ipc/ListMP.c " +
- "ipc/SharedRegion.c " +
- "ipc/MessageQ.c " +
- "ipc/Notify.c ";
+ if (target.$name.match(/^ti\.targets\./)) {
+ if (("ti.ipc.rpmsg" in xdc.om) || ("ti.ipc.transports" in xdc.om)) {
+ ccOpts += " --gcc";
+ }
+ }
+
+ return (Build.customCCOpts + ccOpts);
+}
-var gatesSources = "ipc/gates/GatePeterson.c " +
- "ipc/gates/GatePetersonN.c " +
- "ipc/gates/GateMPSupportNull.c ";
+/*
+ * ======== getEnumString ========
+ * Return the enum value as a string.
+ *
+ * Example usage:
+ * If obj contains an enumeration type property "Enum enumProp"
+ *
+ * view.enumString = getEnumString(obj.enumProp);
+ */
+function getEnumString(enumProperty)
+{
+ /* Split the string into tokens in order to get rid of the
+ * huge package path that precedes the enum string name.
+ * Return the last two tokens concatenated with "_".
+ */
+ var enumStrArray = String(enumProperty).split(".");
+ var len = enumStrArray.length;
+ return (enumStrArray[len - 1]);
+}
-var heapsSources = "ipc/heaps/HeapBufMP.c " +
- "ipc/heaps/HeapMemMP.c " +
- "ipc/heaps/HeapMultiBufMP.c ";
+/*
+ * Add pre-built Instrumented and Non-Intrumented release libs
+ */
+var ipcSources = "ti/sdo/ipc/GateMP.c " +
+ "ti/sdo/ipc/ListMP.c " +
+ "ti/sdo/ipc/SharedRegion.c " +
+ "ti/sdo/ipc/MessageQ.c " +
+ "ti/sdo/ipc/Ipc.c " +
+ "ti/sdo/ipc/Notify.c " +
+ "ti/ipc/namesrv/NameServerRemoteRpmsg.c " +
+ "ti/ipc/remoteproc/Resource.c ";
+
+var gatesSources = "ti/sdo/ipc/gates/GatePeterson.c " +
+ "ti/sdo/ipc/gates/GatePetersonN.c " +
+ "ti/sdo/ipc/gates/GateMPSupportNull.c ";
+
+var heapsSources = "ti/sdo/ipc/heaps/HeapBufMP.c " +
+ "ti/sdo/ipc/heaps/HeapMemMP.c " +
+ "ti/sdo/ipc/heaps/HeapMultiBufMP.c ";
var notifyDriverSources =
- "ipc/notifyDrivers/NotifyDriverCirc.c " +
- "ipc/notifyDrivers/NotifySetupNull.c " +
- "ipc/notifyDrivers/NotifyDriverShm.c ";
+ "ti/sdo/ipc/notifyDrivers/NotifyDriverCirc.c " +
+ "ti/sdo/ipc/notifyDrivers/NotifySetupNull.c " +
+ "ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c ";
var nsremoteSources =
- "ipc/nsremote/NameServerRemoteNotify.c " +
- "ipc/nsremote/NameServerMessageQ.c ";
+ "ti/sdo/ipc/nsremote/NameServerRemoteNotify.c " +
+ "ti/sdo/ipc/nsremote/NameServerMessageQ.c ";
var transportsSources =
- "ipc/transports/TransportShm.c " +
- "ipc/transports/TransportShmCircSetup.c " +
- "ipc/transports/TransportShmNotifySetup.c " +
- "ipc/transports/TransportShmCirc.c " +
- "ipc/transports/TransportShmNotify.c " +
- "ipc/transports/TransportShmSetup.c " +
- "ipc/transports/TransportNullSetup.c " ;
-
-var utilsSources = "utils/MultiProc.c " +
- "utils/List.c " +
- "utils/NameServerRemoteNull.c " +
- "utils/NameServer.c ";
+ "ti/sdo/ipc/transports/TransportShm.c " +
+ "ti/sdo/ipc/transports/TransportShmCircSetup.c " +
+ "ti/sdo/ipc/transports/TransportShmNotifySetup.c " +
+ "ti/sdo/ipc/transports/TransportShmCirc.c " +
+ "ti/sdo/ipc/transports/TransportShmNotify.c " +
+ "ti/sdo/ipc/transports/TransportShmSetup.c " +
+ "ti/sdo/ipc/transports/TransportNullSetup.c " ;
+
+var utilsSources = "ti/sdo/utils/MultiProc.c " +
+ "ti/sdo/utils/List.c " +
+ "ti/sdo/utils/NameServerRemoteNull.c " +
+ "ti/sdo/utils/NameServer.c ";
var commonSources = ipcSources +
gatesSources +
heapsSources +
notifyDriverSources +
nsremoteSources +
- transportsSources +
- utilsSources;
-
-var C64PSources =
- "ipc/gates/GateAAMonitor.c " +
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/gates/GateHWSem.c " +
- "ipc/family/dm6446/NotifySetup.c " +
- "ipc/family/dm6446/NotifyCircSetup.c " +
- "ipc/family/dm6446/InterruptDsp.c " +
- "ipc/family/omap3530/NotifySetup.c " +
- "ipc/family/omap3530/NotifyCircSetup.c " +
- "ipc/family/omap3530/InterruptDsp.c ";
-
-var C66Sources = "ipc/gates/GateHWSem.c " +
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/family/tci663x/Interrupt.c " +
- "ipc/family/tci663x/MultiProcSetup.c " +
- "ipc/family/tci663x/NotifyCircSetup.c " +
- "ipc/family/tci663x/NotifySetup.c " +
- "ipc/family/vayu/InterruptDsp.c " +
- "ipc/family/vayu/NotifySetup.c ";
-
-var C674Sources =
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/family/da830/NotifySetup.c " +
- "ipc/family/da830/NotifyCircSetup.c " +
- "ipc/family/da830/InterruptDsp.c " +
- "ipc/family/arctic/NotifySetup.c " +
- "ipc/family/arctic/NotifyCircSetup.c " +
- "ipc/family/arctic/InterruptDsp.c " +
- "ipc/family/ti81xx/NotifySetup.c " +
- "ipc/family/ti81xx/NotifyCircSetup.c " +
- "ipc/family/ti81xx/InterruptDsp.c " +
- "ipc/family/ti81xx/NotifyMbxSetup.c " +
- "ipc/family/ti81xx/NotifyDriverMbx.c " +
- "ipc/family/c6a8149/NotifySetup.c " +
- "ipc/family/c6a8149/NotifyCircSetup.c " +
- "ipc/family/c6a8149/InterruptDsp.c " +
- "ipc/family/c6a8149/NotifyMbxSetup.c " +
- "ipc/family/c6a8149/NotifyDriverMbx.c ";
-
-
-var C647xSources = "ipc/family/c647x/Interrupt.c " +
- "ipc/family/c647x/NotifyCircSetup.c " +
- "ipc/family/c647x/MultiProcSetup.c " +
- "ipc/family/c647x/NotifySetup.c ";
-
-var C64TSources =
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/family/omap4430/NotifyCircSetup.c " +
- "ipc/family/omap4430/NotifySetup.c " +
- "ipc/family/omap4430/InterruptDsp.c ";
-
-var C28Sources = "ipc/family/f28m35x/NotifyDriverCirc.c " +
- "ipc/family/f28m35x/IpcMgr.c " +
- "ipc/family/f28m35x/TransportCirc.c " +
- "ipc/family/f28m35x/NameServerBlock.c ";
-
-var M3Sources =
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/family/omap4430/NotifySetup.c " +
- "ipc/family/omap4430/NotifyCircSetup.c " +
- "ipc/family/omap4430/InterruptDucati.c " +
- "ipc/family/ti81xx/NotifySetup.c " +
- "ipc/family/ti81xx/NotifyCircSetup.c " +
- "ipc/family/ti81xx/InterruptDucati.c " +
- "ipc/family/ti81xx/NotifyMbxSetup.c " +
- "ipc/family/ti81xx/NotifyDriverMbx.c " +
- "ipc/family/c6a8149/NotifySetup.c " +
- "ipc/family/c6a8149/NotifyCircSetup.c " +
- "ipc/family/c6a8149/InterruptDucati.c " +
- "ipc/family/c6a8149/NotifyMbxSetup.c " +
- "ipc/family/c6a8149/NotifyDriverMbx.c " +
- "ipc/family/f28m35x/IpcMgr.c " +
- "ipc/family/f28m35x/NotifyDriverCirc.c " +
- "ipc/family/f28m35x/TransportCirc.c " +
- "ipc/family/f28m35x/NameServerBlock.c " +
- "ipc/family/vayu/InterruptIpu.c " +
- "ipc/family/vayu/NotifySetup.c ";
-
-var M4Sources =
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/family/vayu/InterruptIpu.c " +
- "ipc/family/vayu/NotifySetup.c ";
-
-var Arm9Sources = "ipc/family/dm6446/NotifySetup.c " +
- "ipc/family/dm6446/NotifyCircSetup.c " +
- "ipc/family/dm6446/InterruptArm.c " +
- "ipc/family/da830/NotifySetup.c " +
- "ipc/family/da830/NotifyCircSetup.c " +
- "ipc/family/da830/InterruptArm.c ";
-
-var A8FSources =
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/family/ti81xx/NotifySetup.c " +
- "ipc/family/ti81xx/NotifyCircSetup.c " +
- "ipc/family/ti81xx/InterruptHost.c " +
- "ipc/family/ti81xx/NotifyMbxSetup.c " +
- "ipc/family/ti81xx/NotifyDriverMbx.c " +
- "ipc/family/c6a8149/NotifySetup.c " +
- "ipc/family/c6a8149/NotifyCircSetup.c " +
- "ipc/family/c6a8149/InterruptHost.c " +
- "ipc/family/c6a8149/NotifyMbxSetup.c " +
- "ipc/family/c6a8149/NotifyDriverMbx.c " +
- "ipc/family/omap3530/NotifySetup.c " +
- "ipc/family/omap3530/NotifyCircSetup.c " +
- "ipc/family/omap3530/InterruptHost.c ";
-
-var A8gSources =
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/family/ti81xx/NotifySetup.c " +
- "ipc/family/ti81xx/NotifyCircSetup.c " +
- "ipc/family/ti81xx/InterruptHost.c " +
- "ipc/family/ti81xx/NotifyMbxSetup.c " +
- "ipc/family/ti81xx/NotifyDriverMbx.c " +
- "ipc/family/c6a8149/NotifySetup.c " +
- "ipc/family/c6a8149/NotifyCircSetup.c " +
- "ipc/family/c6a8149/InterruptHost.c " +
- "ipc/family/c6a8149/NotifyMbxSetup.c " +
- "ipc/family/c6a8149/NotifyDriverMbx.c " +
- "ipc/family/omap3530/NotifySetup.c " +
- "ipc/family/omap3530/NotifyCircSetup.c " +
- "ipc/family/omap3530/InterruptHost.c ";
-
-
-var A15gSources = "ipc/family/vayu/InterruptHost.c " +
- "ipc/family/vayu/NotifySetup.c " +
- "ipc/gates/GateHWSpinlock.c ";
-
-var ARP32Sources =
- "ipc/gates/GateHWSpinlock.c " +
- "ipc/family/arctic/NotifySetup.c " +
- "ipc/family/arctic/NotifyCircSetup.c " +
- "ipc/family/arctic/InterruptArp32.c " +
- "ipc/family/c6a8149/NotifySetup.c " +
- "ipc/family/c6a8149/NotifyCircSetup.c " +
- "ipc/family/c6a8149/InterruptEve.c " +
- "ipc/family/vayu/InterruptArp32.c " +
- "ipc/family/vayu/NotifySetup.c ";
+ transportsSources;
+
+var C64PSources = "ti/sdo/ipc/gates/GateAAMonitor.c " +
+ "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/gates/GateHWSem.c " +
+ "ti/sdo/ipc/family/dm6446/NotifySetup.c " +
+ "ti/sdo/ipc/family/dm6446/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/dm6446/InterruptDsp.c " +
+ "ti/sdo/ipc/family/omap3530/NotifySetup.c " +
+ "ti/sdo/ipc/family/omap3530/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/omap3530/InterruptDsp.c ";
+
+var C66Sources = "ti/sdo/ipc/gates/GateHWSem.c " +
+ "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/family/tci663x/Interrupt.c " +
+ "ti/sdo/ipc/family/tci663x/MultiProcSetup.c " +
+ "ti/sdo/ipc/family/tci663x/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/tci663x/NotifySetup.c " +
+ "ti/sdo/ipc/family/vayu/InterruptDsp.c " +
+ "ti/sdo/ipc/family/vayu/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/vayu/NotifySetup.c " +
+ "ti/sdo/ipc/family/tda3xx/InterruptDsp.c " +
+ "ti/sdo/ipc/family/tda3xx/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/tda3xx/NotifySetup.c " +
+ "ti/ipc/family/tci6614/Interrupt.c " +
+ "ti/ipc/family/tci6614/VirtQueue.c " +
+ "ti/ipc/family/tci6614/NotifySetup.c " +
+ "ti/ipc/family/tci6638/Interrupt.c " +
+ "ti/ipc/family/tci6638/VirtQueue.c " +
+ "ti/ipc/family/tci6638/NotifyCircSetup.c " +
+ "ti/ipc/family/vayu/VirtQueue.c ";
+
+var C674Sources = "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/family/da830/NotifySetup.c " +
+ "ti/sdo/ipc/family/da830/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/da830/InterruptDsp.c " +
+ "ti/sdo/ipc/family/arctic/NotifySetup.c " +
+ "ti/sdo/ipc/family/arctic/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/arctic/InterruptDsp.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifySetup.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/ti81xx/InterruptDsp.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyMbxSetup.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifySetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/InterruptDsp.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyMbxSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyDriverMbx.c ";
+
+var C647xSources = "ti/sdo/ipc/family/c647x/Interrupt.c " +
+ "ti/sdo/ipc/family/c647x/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/c647x/MultiProcSetup.c " +
+ "ti/sdo/ipc/family/c647x/NotifySetup.c ";
+
+var C64TSources = "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/family/omap4430/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/omap4430/NotifySetup.c " +
+ "ti/sdo/ipc/family/omap4430/InterruptDsp.c ";
+
+var M3Sources = "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/family/omap4430/NotifySetup.c " +
+ "ti/sdo/ipc/family/omap4430/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/omap4430/InterruptDucati.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifySetup.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/ti81xx/InterruptDucati.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyMbxSetup.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifySetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/InterruptDucati.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyMbxSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/f28m35x/IpcMgr.c " +
+ "ti/sdo/ipc/family/f28m35x/NotifyDriverCirc.c " +
+ "ti/sdo/ipc/family/f28m35x/TransportCirc.c " +
+ "ti/sdo/ipc/family/f28m35x/NameServerBlock.c " +
+ "ti/sdo/ipc/family/vayu/InterruptIpu.c " +
+ "ti/sdo/ipc/family/vayu/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/vayu/NotifySetup.c " +
+ "ti/sdo/ipc/family/tda3xx/InterruptIpu.c " +
+ "ti/sdo/ipc/family/tda3xx/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/tda3xx/NotifySetup.c " +
+ "ti/ipc/family/vayu/VirtQueue.c ";
+
+var M4Sources = "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/family/vayu/InterruptIpu.c " +
+ "ti/sdo/ipc/family/vayu/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/vayu/NotifySetup.c " +
+ "ti/sdo/ipc/family/tda3xx/InterruptIpu.c " +
+ "ti/sdo/ipc/family/tda3xx/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/tda3xx/NotifySetup.c " +
+ "ti/ipc/family/vayu/VirtQueue.c ";
+
+var Arm9Sources = "ti/sdo/ipc/family/dm6446/NotifySetup.c " +
+ "ti/sdo/ipc/family/dm6446/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/dm6446/InterruptArm.c " +
+ "ti/sdo/ipc/family/da830/NotifySetup.c " +
+ "ti/sdo/ipc/family/da830/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/da830/InterruptArm.c ";
+
+var A8FSources = "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifySetup.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/ti81xx/InterruptHost.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyMbxSetup.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifySetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/InterruptHost.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyMbxSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/omap3530/NotifySetup.c " +
+ "ti/sdo/ipc/family/omap3530/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/omap3530/InterruptHost.c ";
+
+var A8gSources = "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifySetup.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/ti81xx/InterruptHost.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyMbxSetup.c " +
+ "ti/sdo/ipc/family/ti81xx/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifySetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/InterruptHost.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyMbxSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/omap3530/NotifySetup.c " +
+ "ti/sdo/ipc/family/omap3530/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/omap3530/InterruptHost.c ";
+
+var A15gSources = "ti/sdo/ipc/family/vayu/InterruptHost.c " +
+ "ti/sdo/ipc/family/vayu/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/vayu/NotifySetup.c " +
+ "ti/sdo/ipc/gates/GateHWSpinlock.c ";
+
+var ARP32Sources = "ti/sdo/ipc/gates/GateHWSpinlock.c " +
+ "ti/sdo/ipc/family/arctic/NotifySetup.c " +
+ "ti/sdo/ipc/family/arctic/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/arctic/InterruptArp32.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifySetup.c " +
+ "ti/sdo/ipc/family/c6a8149/NotifyCircSetup.c " +
+ "ti/sdo/ipc/family/c6a8149/InterruptEve.c " +
+ "ti/sdo/ipc/family/vayu/InterruptArp32.c " +
+ "ti/sdo/ipc/family/vayu/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/vayu/NotifySetup.c " +
+ "ti/sdo/ipc/family/tda3xx/InterruptArp32.c " +
+ "ti/sdo/ipc/family/tda3xx/NotifyDriverMbx.c " +
+ "ti/sdo/ipc/family/tda3xx/NotifySetup.c ";
var cList = {
- "ti.targets.C28_large" : commonSources + C28Sources,
- "ti.targets.C28_float" : commonSources + C28Sources,
-
- "ti.targets.C64P" : commonSources + C647xSources + C64PSources,
- "ti.targets.C64P_big_endian" : commonSources + C647xSources + C64PSources,
+ "ti.targets.C64P" : commonSources + C647xSources +
+ C64PSources,
+ "ti.targets.C64P_big_endian" : commonSources + C647xSources +
+ C64PSources,
"ti.targets.C674" : commonSources + C674Sources,
- "ti.targets.elf.C64P" : commonSources + C647xSources + C64PSources,
- "ti.targets.elf.C64P_big_endian" : commonSources + C647xSources + C64PSources,
+ "ti.targets.elf.C64P" : commonSources + C647xSources +
+ C64PSources,
+ "ti.targets.elf.C64P_big_endian" : commonSources + C647xSources +
+ C64PSources,
"ti.targets.elf.C674" : commonSources + C674Sources,
"ti.targets.elf.C64T" : commonSources + C64TSources,
- "ti.targets.elf.C66" : commonSources + C647xSources + C66Sources,
- "ti.targets.elf.C66_big_endian" : commonSources + C647xSources + C66Sources,
+ "ti.targets.elf.C66" : commonSources + C647xSources +
+ C66Sources,
+ "ti.targets.elf.C66_big_endian" : commonSources + C647xSources +
+ C66Sources,
"ti.targets.arp32.elf.ARP32" : commonSources + ARP32Sources,
"ti.targets.arp32.elf.ARP32_far" : commonSources + ARP32Sources,
"gnu.targets.arm.M4F" : commonSources + M4Sources,
};
-var ipcPackages = [
- "ti.sdo.ipc",
- "ti.sdo.ipc.family.omap4430",
- "ti.sdo.ipc.family.omap3530",
- "ti.sdo.ipc.family.da830",
- "ti.sdo.ipc.family.dm6446",
- "ti.sdo.ipc.family.ti81xx",
- "ti.sdo.ipc.family.arctic",
- "ti.sdo.ipc.family.f28m35x",
- "ti.sdo.ipc.family.c647x",
- "ti.sdo.ipc.family.c6a8149",
- "ti.sdo.ipc.family.tci663x",
- "ti.sdo.ipc.family.vayu",
- "ti.sdo.ipc.gates",
- "ti.sdo.ipc.heaps",
- "ti.sdo.ipc.notifyDrivers",
- "ti.sdo.ipc.nsremote",
- "ti.sdo.ipc.transports",
- "ti.sdo.utils",
-];
-
var asmListNone = [
];
var asmList64P = [
- "ipc/gates/GateAAMonitor_asm.s64P",
+ "ti/sdo/ipc/gates/GateAAMonitor_asm.s64P",
];
var asmList = {
- "ti.targets.C28_large" : asmListNone,
- "ti.targets.C28_float" : asmListNone,
-
"ti.targets.C64P" : asmList64P,
"ti.targets.C64P_big_endian" : asmList64P,
"ti.targets.C674" : asmList64P,
"gnu.targets.arm.A15F" : asmListNone,
};
-var cFiles = {};
-
-/*
- * ======== getCFiles ========
- */
-function getCFiles(target)
+function getDefaultCustomCCOpts()
{
- var localSources = "ipc/Ipc.c ";
-
- /*
- * logic to trim the C files down to just what the application needs
- * 3/2/11 disabled for now ...
- */
- if (BIOS.buildingAppLib == true) {
- for each (var mod in Program.targetModules()) {
- var mn = mod.$name;
- var pn = mn.substring(0, mn.lastIndexOf("."));
- /* sanity check package path */
- var packageMatch = false;
+ /* start with target.cc.opts */
+ var customCCOpts = Program.build.target.cc.opts;
- for (var i = 0; i < ipcPackages.length; i++) {
- if (pn == ipcPackages[i]) {
- packageMatch = true;
- break;
- }
- }
+ /* add target unique custom ccOpts */
+ if (!(ccOptsList[Program.build.target.$name] === undefined)) {
+ customCCOpts += ccOptsList[Program.build.target.$name];
+ }
- if (packageMatch && !mn.match(/Proxy/) &&
- (mn != "ti.sdo.ipc.Ipc")) {
- if (cFiles[mn] === undefined) {
- var prefix = mn.substr(mn.indexOf("sdo")+4);
- var mod = mn.substr(mn.lastIndexOf(".")+1);
- prefix = prefix.substring(0, prefix.lastIndexOf('.')+1);
- prefix = prefix.replace(/\./g, "/");
- localSources += prefix + mod + ".c ";
- }
- else {
- for (i in cFiles[mn].cSources) {
- var prefix = mn.substr(mn.indexOf("sdo")+8);
- prefix = prefix.substring(0, prefix.lastIndexOf('.')+1);
- prefix = prefix.replace(/\./g, "/");
- localSources += prefix + cFiles[mn].cSources[i] + " ";
- }
- }
- }
- }
+ /* gnu targets need to pick up ccOpts.prefix and suffix */
+ if (Program.build.target.$name.match(/gnu/)) {
+ customCCOpts += " -O3 ";
+ customCCOpts += " " + Program.build.target.ccOpts.prefix + " ";
+ customCCOpts += " " + Program.build.target.ccOpts.suffix + " ";
+ }
+ else if (Program.build.target.$name.match(/iar/)) {
+ throw new Error("IAR not supported by IPC");
}
else {
- localSources += cList[target];
+ /* ti targets do program level compile */
+ customCCOpts += " --program_level_compile -o3 -g " +
+ "--optimize_with_debug ";
}
- /* remove trailing " " */
- localSources = localSources.substring(0, localSources.length-1);
-
- return (localSources);
-}
+ /* undo optimizations if this is a debug build */
+ if (Build.libType == Build.LibType_Debug) {
+ if (Program.build.target.$name.match(/gnu/)) {
+ customCCOpts = customCCOpts.replace("-O3","");
+ /* add in stack frames for stack back trace */
+ customCCOpts += " -mapcs ";
+ }
+ else {
+ customCCOpts = customCCOpts.replace(" -o3","");
+ customCCOpts = customCCOpts.replace(" --optimize_with_debug","");
+ if (Program.build.target.$name.match(/arm/)) {
+ customCCOpts = customCCOpts.replace(" --opt_for_speed=2","");
+ }
+ }
+ }
-/*
- * ======== getAsmFiles ========
- */
-function getAsmFiles(target)
-{
- return (asmList[target]);
+ return (customCCOpts);
}
/*
var defs = "";
- if ((BIOS.assertsEnabled == false) ||
+ if ((Build.assertsEnabled == false) ||
((Defaults.common$.diags_ASSERT == Diags.ALWAYS_OFF)
&& (Defaults.common$.diags_INTERNAL == Diags.ALWAYS_OFF))) {
defs += " -Dxdc_runtime_Assert_DISABLE_ALL";
}
- if (BIOS.logsEnabled == false) {
+ if (Build.logsEnabled == false) {
defs += " -Dxdc_runtime_Log_DISABLE_ALL";
}
- defs += " -Dti_sdo_ipc_MessageQ_traceFlag__D=" + (MessageQ.traceFlag ? "TRUE" : "FALSE");
+ defs += " -Dti_sdo_ipc_MessageQ_traceFlag__D=" +
+ (MessageQ.traceFlag ? "TRUE" : "FALSE");
- var InterruptDucati = xdc.module("ti.sdo.ipc.family.ti81xx.InterruptDucati");
+ if ("ti.ipc.ipcmgr.IpcMgr" in xdc.om) {
+ defs += xdc.module("ti.ipc.ipcmgr.IpcMgr").getDefs();
+ }
- /*
- * If we truely know which platform we're building against,
+ if ("ti.ipc.rpmsg" in xdc.om) {
+ defs += xdc.module('ti.ipc.rpmsg.Build').getDefs();
+ }
+
+ var InterruptDucati =
+ xdc.module("ti.sdo.ipc.family.ti81xx.InterruptDucati");
+
+ /* If we truely know which platform we're building against,
* add these application specific -D's
*/
if (BIOS.buildingAppLib == true) {
- defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_videoProcId__D=" + InterruptDucati.videoProcId;
- defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_hostProcId__D=" + InterruptDucati.hostProcId;
- defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_vpssProcId__D=" + InterruptDucati.vpssProcId;
- defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_dspProcId__D=" + InterruptDucati.dspProcId;
- defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_ducatiCtrlBaseAddr__D=" + InterruptDucati.ducatiCtrlBaseAddr;
- defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_mailboxBaseAddr__D=" + InterruptDucati.mailboxBaseAddr;
+ defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_videoProcId__D="
+ + InterruptDucati.videoProcId;
+ defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_hostProcId__D="
+ + InterruptDucati.hostProcId;
+ defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_vpssProcId__D="
+ + InterruptDucati.vpssProcId;
+ defs += " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_dspProcId__D="
+ + InterruptDucati.dspProcId;
+ defs +=
+ " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_ducatiCtrlBaseAddr__D="
+ + InterruptDucati.ducatiCtrlBaseAddr;
+ defs +=
+ " -Dti_sdo_ipc_family_ti81xx_InterruptDucati_mailboxBaseAddr__D="
+ + InterruptDucati.mailboxBaseAddr;
}
return (defs);
}
/*
- * ======== getLibs ========
+ * ======== getCFiles ========
*/
-function getLibs(pkg)
+function getCFiles(target)
{
- var BIOS = xdc.module("ti.sysbios.BIOS");
+ var localSources = "";
- if (BIOS.libType != BIOS.LibType_Debug) {
- return null;
- }
+ if (BIOS.buildingAppLib == true) {
+ var targetModules = Program.targetModules();
- var lib = "";
- var name = pkg.$name + ".a" + prog.build.target.suffix;
+ for (var m = 0; m < targetModules.length; m++) {
+ var mod = targetModules[m];
+ var mn = mod.$name;
+ var pn = mod.$package.$name;
- if (BIOS.smpEnabled == true) {
- lib = "lib/smpipc/debug/" + name;
+ /* determine if this is an ipc package */
+ var packageMatch = false;
+
+ for (var i = 0; i < ipcPackages.length; i++) {
+ if (pn == ipcPackages[i]) {
+ packageMatch = true;
+ break;
+ }
+ }
+
+ if (packageMatch && !mn.match(/Proxy/)) {
+ localSources += mn.replace(/\./g, "/") + ".c" + " ";
+ }
+ }
+
+ /* special handling for non-target modules */
+ for (var p in cFiles) {
+ if (p in xdc.om) {
+ for (var f in cFiles[p].cSources) {
+ localSources += p.replace(/\./g, "/")
+ + "/" + cFiles[p].cSources[f] + " ";
+ }
+ }
+ }
}
else {
- lib = "lib/ipc/debug/" + name;
+ localSources += cList[target];
}
- if (java.io.File(pkg.packageBase + lib).exists()) {
- return lib;
- }
+ /* remove trailing " " */
+ localSources = localSources.substring(0, localSources.length-1);
- /* could not find any library, throw exception */
- throw Error("Library not found: " + name);
+ return (localSources);
}
+/*
+ * ======== getAsmFiles ========
+ */
+function getAsmFiles(target)
+{
+ return (asmList[target]);
+}
+
+/*
+ * ======== getLibs ========
+ * This function called by all IPC packages except ti.sdo.ipc package.
+ */
+function getLibs(pkg)
+{
+ var libPath = "";
+ var name = "";
+ var suffix;
+
+ switch (Build.libType) {
+ case Build.LibType_Custom:
+ case Build.LibType_Instrumented:
+ case Build.LibType_NonInstrumented:
+ case Build.LibType_Debug:
+ return null;
+
+ case Build.LibType_PkgLib:
+ throw new Error("internal error: Build.getLibs() called with " +
+ "incorret context (libType == PkgLib)");
+ break;
+
+ default:
+ throw new Error("Build.libType not supported: " + Build.libType);
+ break;
+ }
+}
/*
* ======== getProfiles ========
/*
* ======== buildLibs ========
* This function generates the makefile goals for the libraries
- * produced by a ti.sysbios package.
+ * produced by a package.
*/
function buildLibs(objList, relList, filter, xdcArgs)
{
- for (var i = 0; i < xdc.module('xdc.bld.BuildEnvironment').targets.length; i++) {
- var targ = xdc.module('xdc.bld.BuildEnvironment').targets[i];
+ var Build = xdc.useModule('xdc.bld.BuildEnvironment');
+
+ for (var i = 0; i < Build.targets.length; i++) {
+ var targ = Build.targets[i];
/* skip target if not supported */
if (!supportsTarget(targ, filter)) {
}
}
-
/*
* ======== supportsTarget ========
* Returns true if target is in the filter object. If filter
return (false);
}
+
+/*
+ * ======== _setLibType ========
+ * The "real-time" setter setLibType function
+ * This function is called whenever libType changes.
+ */
+function _setLibType(field, val)
+{
+ var Build = this;
+
+ if (val == Build.LibType_Instrumented) {
+ Build.assertsEnabled = true;
+ Build.logsEnabled = true;
+ }
+ else if (val == Build.LibType_NonInstrumented) {
+ Build.assertsEnabled = false;
+ Build.logsEnabled = false;
+ }
+ else if (val == Build.LibType_Custom) {
+ Build.assertsEnabled = true;
+ Build.logsEnabled = true;
+ }
+ else if (val == Build.LibType_Debug) {
+ Build.assertsEnabled = true;
+ Build.logsEnabled = true;
+ }
+ else if (val == Build.LibType_PkgLib) {
+ Build.assertsEnabled = true;
+ Build.logsEnabled = true;
+ }
+ else {
+ print(Build.$name + ": unknown libType setting: " + val);
+ }
+
+ /* re-construct default Build.customCCOpts */
+ Build.customCCOpts = Build.getDefaultCustomCCOpts();
+}