SDOCM00114069 IPC custom build does not include files from ti/ipc
authorRamsey Harris <ramsey@ti.com>
Thu, 30 Jul 2015 00:02:50 +0000 (17:02 -0700)
committerRobert Tivy <rtivy@ti.com>
Fri, 7 Aug 2015 19:57:09 +0000 (12:57 -0700)
Update packages in ti.ipc to either contribute to IPC product libraries
or build package product libraries. Participate in custom build flow.
Make ti.sdo.ipc.Build aware of ti.ipc packages. Use full package name
for all source files.

46 files changed:
packages/ti/ipc/family/tci6614/VirtQueue.c
packages/ti/ipc/family/tci6614/VirtQueue.xdc
packages/ti/ipc/family/tci6614/VirtQueue.xdt [new file with mode: 0644]
packages/ti/ipc/family/tci6614/package.bld
packages/ti/ipc/family/tci6614/package.xs
packages/ti/ipc/family/tci6638/Interrupt.c
packages/ti/ipc/family/tci6638/VirtQueue.c
packages/ti/ipc/family/tci6638/VirtQueue.xdc
packages/ti/ipc/family/tci6638/VirtQueue.xdt [new file with mode: 0644]
packages/ti/ipc/family/tci6638/package.bld
packages/ti/ipc/family/tci6638/package.xs
packages/ti/ipc/family/vayu/VirtQueue.c
packages/ti/ipc/family/vayu/VirtQueue.xdc [new file with mode: 0644]
packages/ti/ipc/family/vayu/VirtQueue.xdt [new file with mode: 0644]
packages/ti/ipc/family/vayu/VirtQueue.xs [new file with mode: 0644]
packages/ti/ipc/family/vayu/package.bld
packages/ti/ipc/family/vayu/package.xdc
packages/ti/ipc/family/vayu/package.xs
packages/ti/ipc/ipcmgr/IpcMgr.c
packages/ti/ipc/ipcmgr/IpcMgr.xdc
packages/ti/ipc/ipcmgr/IpcMgr.xs
packages/ti/ipc/ipcmgr/package.bld
packages/ti/ipc/ipcmgr/package.xs
packages/ti/ipc/mm/MmServiceMgr.xs
packages/ti/ipc/namesrv/package.bld
packages/ti/ipc/namesrv/package.xs
packages/ti/ipc/remoteproc/package.bld
packages/ti/ipc/remoteproc/package.xs
packages/ti/ipc/rpmsg/Build.xdc [new file with mode: 0644]
packages/ti/ipc/rpmsg/Build.xs [new file with mode: 0644]
packages/ti/ipc/rpmsg/NameMap.xdc [new file with mode: 0644]
packages/ti/ipc/rpmsg/NameMap.xs [new file with mode: 0644]
packages/ti/ipc/rpmsg/RPMessage.xs
packages/ti/ipc/rpmsg/package.bld
packages/ti/ipc/rpmsg/package.xdc
packages/ti/ipc/rpmsg/package.xs
packages/ti/ipc/transports/package.bld
packages/ti/ipc/transports/package.xs
packages/ti/sdo/ipc/Build.xdc
packages/ti/sdo/ipc/Build.xs
packages/ti/sdo/ipc/instrumented.cfg.xs
packages/ti/sdo/ipc/makefile.xdt
packages/ti/sdo/ipc/makefile_gccArmLto.xdt
packages/ti/srvmgr/omaprpc/OmapRpc.xdc [new file with mode: 0644]
packages/ti/srvmgr/omaprpc/OmapRpc.xs [new file with mode: 0644]
packages/ti/srvmgr/omaprpc/package.xdc

index 13cfb5d631192121688be56873ba149e4c329171..286cb5f53fe793be50e1f80f7bae62d482176328 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2014, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -349,7 +349,7 @@ Int16 VirtQueue_getAvailBuf(VirtQueue_Handle vq, Void **buf, Int *len)
  * ======== VirtQueue_isr ========
  * Note 'msg' is ignored: it is only used where there is a mailbox payload.
  */
-Void VirtQueue_isr(UArg msg)
+static Void VirtQueue_isr(UArg msg)
 {
     VirtQueue_Object *vq;
 
index 3e4cacd11907bc866e46f8bfc4273073e4a01a53..38329ce61a1cbb0f0308396cf137961500de3f71 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -92,10 +92,10 @@ import  ti.sysbios.gates.GateAll;
 
 /*!
  *  ======== VirtQueue ========
- *
  */
-
 @InstanceInitError
+@Template("./VirtQueue.xdt")
+
 module VirtQueue
 {
     // -------- Module Constants --------
@@ -168,6 +168,19 @@ module VirtQueue
     */
     Void startup(UInt16 remoteProcId, Bool isHost);
 
+    /*!
+     *  ======== cacheWb ========
+     *  Flush the SysMin trace buffer
+     *
+     *  This function should be configured as an idle function.
+     *
+     *  @p(code)
+     *  var Idle = xdc.useModule('ti.sysbios.knl.Idle');
+     *  Idle.addFunc('&VirtQueue_cacheWb');
+     *  @p
+     */
+    Void cacheWb();
+
 instance:
 
     /*!
diff --git a/packages/ti/ipc/family/tci6614/VirtQueue.xdt b/packages/ti/ipc/family/tci6614/VirtQueue.xdt
new file mode 100644 (file)
index 0000000..a084286
--- /dev/null
@@ -0,0 +1,45 @@
+%%{
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+var pkg = this.$package.$name.replace(/\./g, "_");
+
+%%}
+#include <ti/ipc/family/tci6614/VirtQueue.h>
+
+/*
+ *  ======== VirtQueue_cacheWb ========
+ */
+Void VirtQueue_cacheWb()
+{
+    `pkg`_VirtQueue_cacheWb();
+}
index 07f1063e5631d3f1ef23fa01fd98b7e69e78ae9b..5a36ced1bf32436de2ac077a0a8ca3fe18b0ff94 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 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');
+var IpcBuild = xdc.loadCapsule("ti/sdo/ipc/Build.xs");
 
-/*
- * This package distributes its sources in the default release.  This is to
- * enable better understanding by the customer/field, as well as enable
- * modification and profiling techniques in the field.
- */
-Pkg.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld"];
+var objList = [
+    "Interrupt.c",
+    "VirtQueue.c",
+    "NotifySetup.c"
+];
 
-var SRCS = ["Interrupt.c", "VirtQueue.c", "NotifySetup.c"];
+var trgFilter = {
+    field: "isa",
+    list: [ "66" ]
+};
 
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
-
-for (var i = 0; i < Build.targets.length; i++) {
-    var targ = Build.targets[i];
-    var lib;
+/* if not building a product release, build package libraries */
+if (Bld_goal != "release") {
+    IpcBuild.buildLibs(objList, undefined, trgFilter, arguments);
+    IpcBuild.buildLibs(objList, undefined, trgFilter, ["profile=smp"]);
+}
 
-//    print("targ.name = " + targ.name);
+Pkg.otherFiles = [
+    "package.bld"
+].concat(objList);
 
-    /* build only for DSP-side TCI6614 (i.e. C66) */
-    if (targ.isa == "66") {
-        /* Build for all profiles */
-        for (var profile in targ.profiles) {
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+Pkg.attrs.exportCfg = true;
 
-            Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
-                profile: profile
-            }).addObjects(SRCS);
-        }
-    }
-}
+Pkg.generatedFiles.$add("lib/");
index 1da79f401db05f7da8f3f3eff0b254e1e6bf7e94..1fcdec8b95b41db1f513354a10fcebccf68c3b72 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /*
  *  ======== package.xs ========
  */
+var Build = null;
 
 /*
  *  ======== close ========
  */
 function close()
 {
+    if (xdc.om.$name != 'cfg') {
+        return;
+    }
+
+    Build = xdc.useModule('ti.sdo.ipc.Build');
+
     /* bring in modules we use in this package */
     xdc.useModule('ti.sysbios.knl.Swi');
     xdc.useModule('ti.sysbios.hal.Cache');
 }
 
-
 /*
- *  ======== getLibs ========
+ *  ======== Package.getLibs ========
+ *  This function is called when a program's configuration files are
+ *  being generated and it returns the name of a library appropriate
+ *  for the program's configuration.
  */
 function getLibs(prog)
 {
-    var suffix = prog.build.target.findSuffix(this);
-    if (suffix == null) {
-        /* no matching lib found in this package, return "" */
-        $trace("Unable to locate a compatible library, returning none.",
-                1, ['getLibs']);
-        return ("");
-    }
-
-    /* the location of the libraries are in lib/<profile>/* */
-    var name = this.$name + ".a" + suffix;
-    var lib = "lib/" + this.profile + "/" + name;
+    var BIOS = xdc.module('ti.sysbios.BIOS');
+    var libPath;
+    var suffix;
 
+    if (Build.libType == Build.LibType_PkgLib) {
+        /* lib path defined in Build.buildLibs() */
+        libPath = (BIOS.smpEnabled ? "lib/smpipc/debug" : "lib/ipc/debug");
 
-    /*
-     * If the requested profile doesn't exist, we return the 'release' library.
-     */
-    if (!java.io.File(this.packageBase + lib).exists()) {
-        $trace("Unable to locate lib for requested '" + this.profile +
-                "' profile.  Using 'release' profile.", 1, ['getLibs']);
-        lib = "lib/release/" + name;
+        /* find a compatible suffix */
+        if ("findSuffix" in prog.build.target) {
+            suffix = prog.build.target.findSuffix(this);
+        }
+        else {
+            suffix = prog.build.target.suffix;
+        }
+        return (libPath + "/" + this.$name + ".a" + suffix);
+    }
+    else {
+        return (Build.getLibs(this));
     }
-
-    return (lib);
 }
index fe4f67e3c7cdb8fd50bd4f318c2e58dbe9ab62db..25fdbeaffd09fa498e266b2b6195aa7e55c11809 100644 (file)
@@ -52,7 +52,6 @@
 
 extern volatile cregister UInt DNUM;
 
-Fxn userFxn = NULL;
 Void Interrupt_isr(UArg arg);
 
 /* Shift to source bit id for CORES 0-3 */
@@ -84,7 +83,6 @@ Int Interrupt_Module_startup(Int phase)
     volatile UInt32 *kick0 = (volatile UInt32 *)Interrupt_KICK0;
     volatile UInt32 *kick1 = (volatile UInt32 *)Interrupt_KICK1;
     UInt16 procId = MultiProc_self();
-    UInt16 hostClusterId;
 
     /* wait for Startup and procId to be set, because user fxn should set it */
     if (!Startup_Module_startupDone()) {
@@ -99,13 +97,14 @@ Int Interrupt_Module_startup(Int phase)
         return (Startup_NOTDONE);
     }
 
+    Interrupt_module->clusterId = MultiProc_getBaseIdOfCluster();
+
     /*  If this assert fails, the MultiProc config has changed to break
      *  an assumption in Linux rpmsg driver, that HOST is listed first in
      *  MultiProc name list configuration.
      */
-    Interrupt_module->clusterId = MultiProc_getBaseIdOfCluster();
-    hostClusterId = MultiProc_getId("HOST") - Interrupt_module->clusterId;
-    Assert_isTrue(0 == hostClusterId, NULL);
+    Assert_isTrue((MultiProc_getId("HOST") - Interrupt_module->clusterId) == 0,
+            NULL);
 
     if (!Interrupt_enableKick) {
         /* Do not unlock the kick registers */
index b3caa632d32e065b138a14f4781fc465dd1950cb..031b5326c5319c1fb668a0cb8c39c2704629a479 100644 (file)
@@ -142,7 +142,10 @@ Int VirtQueue_Instance_init(VirtQueue_Object *vq, UInt16 remoteProcId,
                              const VirtQueue_Params *params, Error_Block *eb)
 {
     void *vringAddr = NULL;
+#if !defined(xdc_runtime_Assert_DISABLE_ALL) \
+        || !defined(xdc_runtime_Log_DISABLE_ALL)
     UInt32 marValue;
+#endif
 
     VirtQueue_module->traceBufPtr = Resource_getTraceBufPtr();
 
@@ -175,7 +178,10 @@ Int VirtQueue_Instance_init(VirtQueue_Object *vq, UInt16 remoteProcId,
                                          (DNUM * VirtQueue_VRING_OFFSET));
 
             /* Also, assert that the vring address is non-cached: */
+#if !defined(xdc_runtime_Assert_DISABLE_ALL) \
+        || !defined(xdc_runtime_Log_DISABLE_ALL)
             marValue = Cache_getMar((Ptr)vringAddr);
+#endif
             Log_print1(Diags_USER1, "Vring cache is %s",
                  (IArg)(marValue & 0x1 ? "enabled" : "disabled"));
             Assert_isTrue(!(marValue & 0x1), NULL);
@@ -350,7 +356,7 @@ Int16 VirtQueue_getAvailBuf(VirtQueue_Handle vq, Void **buf, Int *len)
  * ======== VirtQueue_isr ========
  * Note 'msg' is ignored: it is only used where there is a mailbox payload.
  */
-Void VirtQueue_isr(UArg msg)
+static Void VirtQueue_isr(UArg msg)
 {
     VirtQueue_Object *vq;
 
index 4ad35394289e69ccbcb84d277ef10eb14bbcddc1..30047247b0c43ae89939c9c5f294cc8ac3dae40f 100644 (file)
@@ -92,10 +92,10 @@ import  ti.sysbios.gates.GateAll;
 
 /*!
  *  ======== VirtQueue ========
- *
  */
-
 @InstanceInitError
+@Template("./VirtQueue.xdt")
+
 module VirtQueue
 {
     // -------- Module Constants --------
@@ -166,6 +166,19 @@ module VirtQueue
     */
     Void startup(UInt16 remoteProcId, Bool isHost);
 
+    /*!
+     *  ======== cacheWb ========
+     *  Flush the SysMin trace buffer
+     *
+     *  This function should be configured as an idle function.
+     *
+     *  @p(code)
+     *  var Idle = xdc.useModule('ti.sysbios.knl.Idle');
+     *  Idle.addFunc('&VirtQueue_cacheWb');
+     *  @p
+     */
+    Void cacheWb();
+
 instance:
 
     /*!
diff --git a/packages/ti/ipc/family/tci6638/VirtQueue.xdt b/packages/ti/ipc/family/tci6638/VirtQueue.xdt
new file mode 100644 (file)
index 0000000..65dcb60
--- /dev/null
@@ -0,0 +1,45 @@
+%%{
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+var pkg = this.$package.$name.replace(/\./g, "_");
+
+%%}
+#include <ti/ipc/family/tci6638/VirtQueue.h>
+
+/*
+ *  ======== VirtQueue_cacheWb ========
+ */
+Void VirtQueue_cacheWb()
+{
+    `pkg`_VirtQueue_cacheWb();
+}
index aa6a99d98e1e578c74fd3325126b423df039f90f..df1d3795f1d345d69775a94f068808176b2a2f52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 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');
+var IpcBuild = xdc.loadCapsule("ti/sdo/ipc/Build.xs");
 
-/*
- * This package distributes its sources in the default release.  This is to
- * enable better understanding by the customer/field, as well as enable
- * modification and profiling techniques in the field.
- */
-Pkg.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld"];
+var objList = [
+    "Interrupt.c",
+    "VirtQueue.c",
+    "NotifyCircSetup.c"
+];
 
-var SRCS = ["Interrupt.c", "VirtQueue.c", "NotifyCircSetup.c"];
+var trgFilter = {
+    field: "isa",
+    list: [ "66" ]
+};
 
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
-
-for (var i = 0; i < Build.targets.length; i++) {
-    var targ = Build.targets[i];
-    var lib;
+/* if not building a product release, build package libraries */
+if (Bld_goal != "release") {
+    IpcBuild.buildLibs(objList, undefined, trgFilter, arguments);
+    IpcBuild.buildLibs(objList, undefined, trgFilter, ["profile=smp"]);
+}
 
-//    print("targ.name = " + targ.name);
+Pkg.otherFiles = [
+    "package.bld"
+].concat(objList);
 
-    /* build only for DSP-side TCI6638 (i.e. C66) */
-    if (targ.isa == "66") {
-        /* Build for all profiles */
-        for (var profile in targ.profiles) {
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+Pkg.attrs.exportCfg = true;
 
-            Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
-                profile: profile
-            }).addObjects(SRCS);
-        }
-    }
-}
+Pkg.generatedFiles.$add("lib/");
index 1da79f401db05f7da8f3f3eff0b254e1e6bf7e94..1fcdec8b95b41db1f513354a10fcebccf68c3b72 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /*
  *  ======== package.xs ========
  */
+var Build = null;
 
 /*
  *  ======== close ========
  */
 function close()
 {
+    if (xdc.om.$name != 'cfg') {
+        return;
+    }
+
+    Build = xdc.useModule('ti.sdo.ipc.Build');
+
     /* bring in modules we use in this package */
     xdc.useModule('ti.sysbios.knl.Swi');
     xdc.useModule('ti.sysbios.hal.Cache');
 }
 
-
 /*
- *  ======== getLibs ========
+ *  ======== Package.getLibs ========
+ *  This function is called when a program's configuration files are
+ *  being generated and it returns the name of a library appropriate
+ *  for the program's configuration.
  */
 function getLibs(prog)
 {
-    var suffix = prog.build.target.findSuffix(this);
-    if (suffix == null) {
-        /* no matching lib found in this package, return "" */
-        $trace("Unable to locate a compatible library, returning none.",
-                1, ['getLibs']);
-        return ("");
-    }
-
-    /* the location of the libraries are in lib/<profile>/* */
-    var name = this.$name + ".a" + suffix;
-    var lib = "lib/" + this.profile + "/" + name;
+    var BIOS = xdc.module('ti.sysbios.BIOS');
+    var libPath;
+    var suffix;
 
+    if (Build.libType == Build.LibType_PkgLib) {
+        /* lib path defined in Build.buildLibs() */
+        libPath = (BIOS.smpEnabled ? "lib/smpipc/debug" : "lib/ipc/debug");
 
-    /*
-     * If the requested profile doesn't exist, we return the 'release' library.
-     */
-    if (!java.io.File(this.packageBase + lib).exists()) {
-        $trace("Unable to locate lib for requested '" + this.profile +
-                "' profile.  Using 'release' profile.", 1, ['getLibs']);
-        lib = "lib/release/" + name;
+        /* find a compatible suffix */
+        if ("findSuffix" in prog.build.target) {
+            suffix = prog.build.target.findSuffix(this);
+        }
+        else {
+            suffix = prog.build.target.suffix;
+        }
+        return (libPath + "/" + this.$name + ".a" + suffix);
+    }
+    else {
+        return (Build.getLibs(this));
     }
-
-    return (lib);
 }
index 56a5fdb95f912a5d4eef9400ce0a617d87547b6f..e36666b9b438c80f68373319d0b9b898b701d815 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /** ============================================================================
  *  @file       VirtQueue.c
  *
  *  @brief      Virtio Queue implementation for BIOS
  *
  *  Differences between BIOS version and Linux kernel (include/linux/virtio.h):
- *  - Renamed module from virtio.h to VirtQueue_Object.h to match the API prefixes;
+ *  - Renamed module from virtio.h to VirtQueue_Object.h to match the API
+ *    prefixes;
  *  - BIOS (XDC) types and CamelCasing used;
  *  - virtio_device concept removed (i.e, assumes no containing device);
  *  - simplified scatterlist from Linux version;
- *  - VirtQueue_Objects are created statically here, so just added a VirtQueue_Object_init()
+ *  - VirtQueue_Objects are created statically here, so just added a
+ *    VirtQueue_Object_init()
  *    fxn to take the place of the Virtio vring_new_virtqueue() API;
  *  - The notify function is implicit in the implementation, and not provided
  *    by the client, as it is in Linux virtio.
@@ -57,6 +60,8 @@
 #define Registry_CURDESC ti_ipc_family_vayu__Desc
 #define MODULE_NAME "ti.ipc.family.vayu.VirtQueue"
 
+#include <string.h>
+
 #include <xdc/std.h>
 #include <xdc/runtime/System.h>
 #include <xdc/runtime/Assert.h>
 #include <ti/sysbios/gates/GateHwi.h>
 #include <ti/sysbios/hal/Cache.h>
 
-#include <ti/ipc/remoteproc/Resource.h>
 #include <ti/ipc/MultiProc.h>
-
-#include <ti/ipc/rpmsg/virtio_ring.h>
-#include <ti/pm/IpcPower.h>
-
-#include <string.h>
-
 #include <ti/ipc/remoteproc/Resource.h>
 #include <ti/ipc/remoteproc/rsc_types.h>
+#include <ti/ipc/rpmsg/virtio_ring.h>
 #include <ti/ipc/rpmsg/_VirtQueue.h>
-
+#include <ti/pm/IpcPower.h>
 #include <ti/sdo/ipc/notifyDrivers/IInterrupt.h>
+
 #include "InterruptProxy.h"
 #include "VirtQueue.h"
 
-
 /*
  *  The following three VIRTIO_* defines must match those in
  *  <Linux_kernel>/include/uapi/linux/virtio_config.h
@@ -455,7 +454,7 @@ VirtQueue_Handle VirtQueue_create(UInt16 remoteProcId, VirtQueue_Params *params,
         case ID_SELF_TO_HOST:
         case ID_HOST_TO_SELF:
             vq->basePa = (UInt32)Resource_getVringDA(vq->id);
-            Assert_isTrue(vq->basePa != NULL, NULL);
+            Assert_isTrue(vq->basePa != 0, NULL);
 
             result = Resource_physToVirt(vq->basePa, &(vq->baseVa));
             Assert_isTrue(result == Resource_S_SUCCESS, (Assert_Id)NULL);
@@ -494,9 +493,12 @@ VirtQueue_Handle VirtQueue_create(UInt16 remoteProcId, VirtQueue_Params *params,
  */
 Void VirtQueue_startup()
 {
-    hostProcId      = MultiProc_getId("HOST");
+    hostProcId = MultiProc_getId("HOST");
 
-#ifdef DSP
+/*  Note that "64P" matches 64P, 674, 66 and others.  We prefer 66 on vayu,
+ *  but technically vayu DSPs support any of these.
+ */
+#if defined(xdc_target__isaCompatible_64P)
     intInfo.intVectorId = DSPEVENTID;
 #endif
 
@@ -517,7 +519,8 @@ Void VirtQueue_startup()
     Log_print1(Diags_USER1, "VirtQueue_startup: VDEV status: 0x%x\n",
               Resource_getVdevStatus(VIRTIO_ID_RPMSG));
 
-    InterruptProxy_intRegister(hostProcId, &intInfo, (Fxn)VirtQueue_isr, NULL);
+    InterruptProxy_intRegister(hostProcId, &intInfo, (Fxn)VirtQueue_isr,
+            (UArg)NULL);
     Log_print0(Diags_USER1, "Passed VirtQueue_startup\n");
 }
 
@@ -532,11 +535,11 @@ Void VirtQueue_postCrashToMailbox(Void)
 #define CACHE_WB_TICK_PERIOD    5
 
 /*!
- * ======== VirtQueue_cacheWb ========
+ * ======== ti_ipc_family_vayu_VirtQueue_cacheWb ========
  *
  * Used for flushing SysMin trace buffer.
  */
-Void VirtQueue_cacheWb()
+Void ti_ipc_family_vayu_VirtQueue_cacheWb()
 {
     static UInt32 oldticks = 0;
     UInt32 newticks;
diff --git a/packages/ti/ipc/family/vayu/VirtQueue.xdc b/packages/ti/ipc/family/vayu/VirtQueue.xdc
new file mode 100644 (file)
index 0000000..39046ff
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ *
+ */
+
+/*
+ *  ======== VirtQueue.xdc ========
+ */
+package ti.ipc.family.vayu;
+
+/*!
+ *  ======== VirtQueue ========
+ */
+@Template("./VirtQueue.xdt")
+
+metaonly module VirtQueue
+{
+}
diff --git a/packages/ti/ipc/family/vayu/VirtQueue.xdt b/packages/ti/ipc/family/vayu/VirtQueue.xdt
new file mode 100644 (file)
index 0000000..0964e6d
--- /dev/null
@@ -0,0 +1,45 @@
+%%{
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+var pkg = this.$package.$name.replace(/\./g, "_");
+
+%%}
+extern Void `pkg`_VirtQueue_cacheWb();
+
+/*
+ *  ======== VirtQueue_cacheWb ========
+ */
+Void VirtQueue_cacheWb()
+{
+    `pkg`_VirtQueue_cacheWb();
+}
diff --git a/packages/ti/ipc/family/vayu/VirtQueue.xs b/packages/ti/ipc/family/vayu/VirtQueue.xs
new file mode 100644 (file)
index 0000000..a517dc9
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ *  ======== VirtQueue.xs ========
+ */
+
+/*
+ *  ======== module$use ========
+ *  Use other modules required by this module
+ */
+function module$use()
+{
+    xdc.useModule('ti.ipc.remoteproc.Resource');
+    xdc.loadPackage('ti.pm');
+    xdc.useModule('ti.sdo.utils.MultiProc');
+
+    xdc.useModule('ti.sysbios.hal.Cache');
+    xdc.useModule('ti.sysbios.hal.Hwi');
+    xdc.useModule('ti.sysbios.gates.GateHwi');
+    xdc.useModule('ti.sysbios.knl.Clock');
+
+    xdc.useModule('xdc.runtime.Assert');
+    xdc.useModule('xdc.runtime.Error');
+    xdc.useModule('xdc.runtime.Diags');
+    xdc.useModule('xdc.runtime.Log');
+    xdc.useModule('xdc.runtime.Memory');
+    xdc.useModule('xdc.runtime.Registry');
+    xdc.useModule('xdc.runtime.System');
+
+    /* bring in target specific modules */
+    var Program = xdc.useModule('xdc.cfg.Program');
+    var targIsaChain = "/" + Program.build.target.getISAChain().join("/") + "/";
+
+    if (targIsaChain.match("/64P/")) {
+        xdc.useModule('ti.sdo.ipc.family.vayu.InterruptDsp');
+    }
+    else if (targIsaChain.match("/v7M/")) {
+        xdc.useModule('ti.sdo.ipc.family.vayu.InterruptIpu');
+    }
+}
index c3a9a5ffd757023dae770bebb438f8164a0a1bea..cdd0a247698ac1b2305e92f0184e86929635afd7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 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');
+var IpcBuild = xdc.loadCapsule("ti/sdo/ipc/Build.xs");
 
-/*
- * This package distributes its sources in the default release.  This is to
- * enable better understanding by the customer/field, as well as enable
- * modification and profiling techniques in the field.
- */
-Pkg.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld", "InterruptProxy.h", "VirtQueue.h"];
-
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
-
-/* list of libraries to build */
-var libArray = new Array();
-
-/* IPU SMP library */
-libArray.push(
-    {
-        name: "ti.ipc.family.vayu_smp",
-        sources: [
-            "VirtQueue",
-        ],
-        libAttrs: {
-            defs: " -DSMP"
-        },
-        isas: [ "v7M", "v7M4" ],
-    }
-);
+var objList = [ "VirtQueue.c" ];
 
-/* DSP library */
-libArray.push(
-    {
-        name: "ti.ipc.family.vayu",
-        sources: [
-            "VirtQueue",
-        ],
-        libAttrs: {
-            defs: " -DDSP"
-        },
-        isas: [ "66" ],
-    }
-);
+var trgFilter = {
+    field: "isa",
+    list: [ "66", "v7M", "v7M4" ]
+};
 
+/* if not building a product release, build package libraries */
+if (Bld_goal != "release") {
+    IpcBuild.buildLibs(objList, undefined, trgFilter, arguments);
+    IpcBuild.buildLibs(objList, undefined, trgFilter, ["profile=smp"]);
+}
 
-/* ==== loop over array of libraries ==== */
-for (var i = 0; i < libArray.length; i++) {
-    var lib = libArray[i];
-
-    /* ==== loop over all targets in build array ==== */
-    for (var j = 0; j < Build.targets.length; j++) {
-        var targ = Build.targets[j];
-
-        /* skip target if it does not generate code for the given isa */
-        if ("isas" in lib) {
-            var skipTarget = true;
-            var list = "/" + lib.isas.join("/") + "/";
-            if (list.match("/" + targ.isa + "/")) {
-                skipTarget = false;
-            }
-            if (skipTarget) continue;
-        }
-
-        /* ==== loop over all profiles ==== */
-        for (var profile in targ.profiles) {
-
-            /* name = lib/profile/name.a+suffix */
-            var name = "lib/" + profile + "/" + lib.name;
-
-            /* pass along library attributes specified in library array */
-            var libAttrs = "libAttrs" in lib ? lib.libAttrs : {};
-
-            /* must set profile explicitly */
-            libAttrs.profile = profile;
+Pkg.otherFiles = [
+    "package.bld",
+    "InterruptProxy.h",
+    "VirtQueue.h"
+].concat(objList);
 
-            /* build the library */
-            var library = Pkg.addLibrary(name, targ, libAttrs);
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+Pkg.attrs.exportCfg = true;
 
-            /* add the source files */
-            library.addObjects(lib.sources);
-        }
-    }
-}
+Pkg.generatedFiles.$add("lib/");
index e36105f77ce028149b6f7ccebfd0cdd93570e97c..375d82bb33ed5f4f9085925a3510b4d4bf152cab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /*
  *  ======== package.xdc ========
- *
  */
 
 /*!
  *  ======== ti.ipc.family.vayu ========
  */
-
 package ti.ipc.family.vayu[1,0,0] {
+    module VirtQueue;
 }
index d8c3faee24ac29a1df75b3e3e36bd11080b7221e..caf2ee2979faae42ae31f58af3d31b4119fc4f7e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
 /*
  *  ======== package.xs ========
- *
  */
+var Build = null;
 
 /*
  *  ======== close ========
  */
 function close()
 {
-    if (xdc.om.$name != "cfg") {
+    if (xdc.om.$name != 'cfg') {
         return;
     }
 
-    /* bring in modules we use in this package */
-    xdc.useModule('ti.ipc.remoteproc.Resource');
-    xdc.loadPackage('ti.pm');
-    xdc.useModule('ti.sysbios.gates.GateAll');
-    xdc.useModule('ti.sysbios.hal.Cache');
-    xdc.useModule('ti.sysbios.knl.Semaphore');
-    xdc.useModule('ti.sysbios.knl.Swi');
-
-    /* bring in target specific modules */
-    var targIsaChain = "/" + prog.build.target.getISAChain().join("/") + "/";
-    if (targIsaChain.match("/64P/")) {
-        xdc.useModule('ti.sdo.ipc.family.vayu.InterruptDsp');
-    }
-    else if (targIsaChain.match("/v7M/")) {
-        xdc.useModule('ti.sdo.ipc.family.vayu.InterruptIpu');
-    }
+    Build = xdc.useModule('ti.sdo.ipc.Build');
 }
 
 /*
- *  ======== getLibs ========
+ *  ======== Package.getLibs ========
+ *  This function is called when a program's configuration files are
+ *  being generated and it returns the name of a library appropriate
+ *  for the program's configuration.
  */
 function getLibs(prog)
 {
-    var file;
-    var libAry = [];
-    var profile = this.profile;
-    var smp = "";
-
-    var suffix = prog.build.target.findSuffix(this);
-    if (suffix == null) {
-        /* no matching lib found in this package, return "" */
-        $trace("Unable to locate a compatible library, returning none.",
-                1, ['getLibs']);
-        return ("");
-    }
-
     var BIOS = xdc.module('ti.sysbios.BIOS');
-    if (BIOS.smpEnabled) {
-        smp = "_smp";
-    }
+    var libPath;
+    var suffix;
 
-    /* make sure the library exists, else fallback to a built library */
-    file = "lib/" + profile + "/ti.ipc.family.vayu" + smp + ".a" + suffix;
-    if (java.io.File(this.packageBase + file).exists()) {
-        libAry.push(file);
-    }
-    else {
-        file = "lib/release/ti.ipc.family.vayu" + smp + ".a" + suffix;
-        if (java.io.File(this.packageBase + file).exists()) {
-            libAry.push(file);
+    if (Build.libType == Build.LibType_PkgLib) {
+        /* lib path defined in Build.buildLibs() */
+        libPath = (BIOS.smpEnabled ? "lib/smpipc/debug" : "lib/ipc/debug");
+
+        /* find a compatible suffix */
+        if ("findSuffix" in prog.build.target) {
+            suffix = prog.build.target.findSuffix(this);
         }
         else {
-            /* fallback to a compatible library built by this package */
-            for (var p in this.build.libDesc) {
-                if (suffix == this.build.libDesc[p].suffix) {
-                    libAry.push(p);
-                    break;
-                }
-            }
+            suffix = prog.build.target.suffix;
         }
+        return (libPath + "/" + this.$name + ".a" + suffix);
+    }
+    else {
+        return (Build.getLibs(this));
     }
-
-    return libAry.join(";");
 }
 
 /*
index bfa9253de0cc3e731912030d77a0320a70fffd80..14d45a090420d2aeb3fd2390f11f921c62b15f18 100644 (file)
@@ -29,6 +29,7 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /*
  *  ======== IpcMgr.c ========
  *  Various IPC stack backplane startup fxns.
@@ -45,9 +46,9 @@
 
 #ifdef IpcMgr_USEDEH
 #include <ti/deh/Watchdog.h>
-#ifdef DSP
+#ifdef IpcMgr_DSP
 #include <ti/sysbios/family/c64p/Exception.h>
-#elif IPU
+#elif IpcMgr_IPU
 #include <ti/sysbios/family/arm/m3/Hwi.h>
 #endif
 #endif
@@ -71,9 +72,9 @@ Void IpcMgr_rpmsgStartup(Void)
      * When using DEH, initialize the Watchdog timers if not already done
      * (i.e. late-attach)
      */
-#ifdef DSP
+#ifdef IpcMgr_DSP
     Watchdog_init((Void (*)(Void))ti_sysbios_family_c64p_Exception_handler);
-#elif IPU
+#elif IpcMgr_IPU
     Watchdog_init(ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I);
 #endif
 #endif
@@ -104,9 +105,9 @@ Void IpcMgr_ipcStartup(Void)
      * When using DEH, initialize the Watchdog timers if not already done
      * (i.e. late-attach)
      */
-#ifdef DSP
+#ifdef IpcMgr_DSP
     Watchdog_init((Void (*)(Void))ti_sysbios_family_c64p_Exception_handler);
-#elif IPU
+#elif IpcMgr_IPU
     Watchdog_init(ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I);
 #endif
 #endif
index 14c1b0a5d2c6545380453821c22ce64646f5c531..26cef6b9aef9fe9caa0c98dadbd8446700a4dd84 100644 (file)
@@ -59,4 +59,10 @@ metaonly module IpcMgr
      *  It has no default value.
      */
     config TransCombo transportCombo;
+
+    /*!
+     *  ======== getDefs ========
+     *  Get the compiler -D options necessary to build
+     */
+    String getDefs();
 }
index 649308c5dc77e179c723541cb5a8946cadda8caf..02773a4ed7c2437dae75f8d5c8131148ef22235b 100644 (file)
@@ -34,7 +34,6 @@
  *  ======== IpcMgr.xs ========
  */
 
-
 /*
  *  ======== module$use ========
  *  Use other modules required by this module
@@ -43,20 +42,48 @@ function module$use()
 {
     var IpcMgr = this;
 
-    switch (IpcMgr.transportCombo) {
+/*  still under development
+ *
+ *  switch (IpcMgr.transportCombo) {
+ *
+ *      case IpcMgr.TransCombo_RPMSG:
+ *          xdc.loadPackage('ti.ipc.rpmsg');
+ *          break;
+ *
+ *      case IpcMgr.TransCombo_RMSG_MESSAGEQ:
+ *          xdc.useModule('ti.ipc.namesrv.NameServerRemoteRpmsg');
+ *          xdc.loadPackage('ti.ipc.rpmsg');
+ *          xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
+ *          xdc.loadPackage('xdc.runtime');
+ *          break;
+ *
+ *      case IpcMgr.TransCombo_IPC:
+ *          break;
+ *  }
+ */
+}
 
-        case IpcMgr.TransCombo_RPMSG:
-            xdc.loadPackage('ti.ipc.rpmsg');
-            break;
+/*
+ *  ======== getDefs ========
+ */
+function getDefs()
+{
+    var defs = "";
 
-        case IpcMgr.TransCombo_RMSG_MESSAGEQ:
-            xdc.useModule('ti.ipc.namesrv.NameServerRemoteRpmsg');
-            xdc.loadPackage('ti.ipc.rpmsg');
-            xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
-            xdc.loadPackage('xdc.runtime');
-            break;
+    if (xdc.module('ti.deh.Deh').$used) {
+        defs += " -DIpcMgr_USEDEH";
 
-        case IpcMgr.TransCombo_IPC:
-            break;
+        var isa = xdc.module('xdc.cfg.Program').build.target.isa;
+        if (isa.match(/66|64T/)) {
+            defs += " -DIpcMgr_DSP";
+        }
+        else if (isa.match(/^v7M(|4)$/)) {
+            defs += " -DIpcMgr_IPU";
+        }
+        else {
+            throw new Error("ti.deh.Deh not supported on given target");
+        }
     }
+
+    return (defs);
 }
index ecd0c8ccbdd0bd1f626adbfb5c8fde2a82cf388c..26a7df26943c4ad85a1be91ec06db2af33f246e4 100644 (file)
  * 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');
 
-/*
- * This package distributes its sources in the default release.  This is to
- * enable better understanding by the customer/field, as well as enable
- * modification and profiling techniques in the field.
- */
-Pkg.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld", "IpcMgr.h"];
-
-var SRCS = ["IpcMgr.c"];
-
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
+var objList = [ "IpcMgr.c" ];
 
+/*  Always build package libraries during the product build. This is
+ *  needed because there is a compile time binding to Device Exception
+ *  Handling (deh) support. If this package were to be included in the
+ *  IPC product library, it would require multiple product libraries
+ *  (e.g. with and without deh support).
+ *
+ *  However, this package does participate in the custom build flow.
+ */
 for (var i = 0; i < Build.targets.length; i++) {
     var targ = Build.targets[i];
-    var lib;
-
-//    print("targ.name = " + targ.name);
 
-    /* Build for all profiles */
     for (var profile in targ.profiles) {
-        /* Build a platform-specific library */
-        if ((targ.isa == "66") || (targ.isa == "64T")) {
+        Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
+            profile: profile
+        }).addObjects(objList);
+
+        /* build deh enabled libraries for supported targets */
+        if (targ.isa.match(/^(64T|66)$/)) {
             Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_deh", targ, {
                 profile: profile,
-                defs: "-DIpcMgr_USEDEH -DDSP"
-            }).addObjects(SRCS);
+                defs: "-DIpcMgr_USEDEH -DIpcMgr_DSP"
+            }).addObjects(objList);
         }
-        else if (targ.isa.match(/^v7M(|4)$/)) {
+        else if (targ.isa.match(/^v7M4?$/)) {
             Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_deh", targ, {
                 profile: profile,
-                defs: "-DIpcMgr_USEDEH -DIPU"
-            }).addObjects(SRCS);
+                defs: "-DIpcMgr_USEDEH -DIpcMgr_IPU"
+            }).addObjects(objList);
         }
-
-        Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
-            profile: profile
-        }).addObjects(SRCS);
     }
 }
+
+Pkg.otherFiles = [
+    "package.bld",
+    "IpcMgr.h"
+];
+
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+
+Pkg.generatedFiles.$add("lib/");
index 468481c69c7512c3d82d036ae5e062d0bdbcf157..a5b8a65db3ac50162182b7bb05f16fb084787ca6 100644 (file)
@@ -58,15 +58,45 @@ function close()
      *  Then the IpcMgr would bring in RPMessage if needed.
      */
      xdc.useModule('ti.ipc.rpmsg.RPMessage');
+
+    /*  To maintain compatibility, "use" the IpcMgr module whenever this
+     *  package has been loaded. Issue a warning to inform the user that
+     *  the application config script should be loading the module, not
+     *  the package.
+     */
+    if (!xdc.module('ti.ipc.ipcmgr.IpcMgr').$used) {
+        var IpcMgr = xdc.useModule('ti.ipc.ipcmgr.IpcMgr');
+
+        IpcMgr.$logWarning("Package ti.ipc.ipcmgr loaded but module IpcMgr "
+            + "was not used. To eliminate this warning, replace \""
+            + "xdc.loadPackage('ti.ipc.ipcmgr')\" with \"xdc.useModule("
+            + "'ti.ipc.ipcmgr.IpcMgr')\" in your application config script",
+            IpcMgr);
+    }
 }
 
 /*
- *  ======== getLibs ========
+ *  ======== Package.getLibs ========
+ *  This function is called when a program's configuration files are
+ *  being generated and it returns the name of a library appropriate
+ *  for the program's configuration.
  */
 function getLibs(prog)
 {
+
+    /* if custom build flow, do not contribute package library */
+    if ("ti.sdo.ipc.Build" in xdc.om) {
+        var Build = xdc.om["ti.sdo.ipc.Build"];
+
+        if ((Build.libType == Build.LibType_Custom)
+                || (Build.libType == Build.LibType_Debug)) {
+            return ("");
+        }
+    }
+
     var lib;
     var suffix = prog.build.target.findSuffix(this);
+
     if (suffix == null) {
         /* no matching lib found in this package, return "" */
         $trace("Unable to locate a compatible library, returning none.",
@@ -74,10 +104,8 @@ function getLibs(prog)
         return ("");
     }
 
-    var deh = xdc.module("ti.deh.Deh");
-
     /* the location of the libraries are in lib/<profile>/* */
-    if (deh.$used) {
+    if (xdc.module("ti.deh.Deh").$used) {
         /* Deh is used */
         lib = "lib/" + this.profile + "/ti.ipc.ipcmgr_deh.a" + suffix;
     }
index bfb14b1821a612bc54186f931371c3a04356dd9d..079c9de4052baa1d760c3134c56bb372b5b773d9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -43,7 +43,7 @@ function module$use()
     xdc.useModule('ti.grcm.RcmServer');
     xdc.useModule('ti.sdo.utils.MultiProc');
     xdc.loadPackage('ti.srvmgr');
-    xdc.loadPackage('ti.srvmgr.omaprpc');
+    xdc.useModule('ti.srvmgr.omaprpc.OmapRpc');
     xdc.useModule('xdc.runtime.Memory');
     xdc.useModule('xdc.runtime.System');
 }
index 5d6b567f754b89a169e81358e48a00bac5b0f867..4916afdb5410aaafb7d8132a0380391211f6154f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 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');
+var IpcBuild = xdc.loadCapsule("ti/sdo/ipc/Build.xs");
 
-/*
- * This package distributes its sources in the default release.  This is to
- * enable better understanding by the customer/field, as well as enable
- * modification and profiling techniques in the field.
- */
-Pkg.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld", "_NameServerRemoteRpmsg.h"];
+var objList = [ "NameServerRemoteRpmsg.c" ];
 
-var SRCS = ["NameServerRemoteRpmsg.c"];
+var trgFilter = {
+    field: "isa",
+    list: [ "64T", "66", "66e", "674", "v7M", "v7M4" ]
+};
 
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
-
-for (var i = 0; i < Build.targets.length; i++) {
-    var targ = Build.targets[i];
+/* if not building a product release, build package libraries */
+if (Bld_goal != "release") {
+    IpcBuild.buildLibs(objList, undefined, trgFilter, arguments);
+    IpcBuild.buildLibs(objList, undefined, trgFilter, ["profile=smp"]);
+}
 
-    /*
-     *  Only devices with an rpmsg-enabled HLOS and a slave would need this
-     *  library.  Skip targets that will never need this.
-     */
-    if (!((targ.isa.match(/^64T$/)) || (targ.isa.match(/^66(|e)$/)) ||
-            (targ.isa.match(/^674$/)) || (targ.isa.match(/^v7M(|4)$/)))) {
-        continue;
-    }
+Pkg.otherFiles = [
+    "package.bld",
+    "_NameServerRemoteRpmsg.h"
+].concat(objList);
 
-    /* Build for all profiles */
-    for (var profile in targ.profiles) {
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+Pkg.attrs.exportCfg = true;
 
-        Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
-            profile: profile
-        }).addObjects(SRCS);
-    }
-}
+Pkg.generatedFiles.$add("lib/");
index dadaae855f5228a17d1d7904e756872fe665579d..8c68b117de297b60b77b19c9a13bad128b9151b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /*
  *  ======== package.xs ========
  */
+var Build = null;
 
 /*
  *  ======== close ========
  */
 function close()
 {
+    if (xdc.om.$name != 'cfg') {
+        return;
+    }
+
+    Build = xdc.useModule('ti.sdo.ipc.Build');
+
     /* bring in modules we use in this package */
     xdc.useModule('ti.sysbios.gates.GateMutex');
     xdc.useModule('ti.sysbios.knl.Semaphore');
 }
 
-
 /*
- *  ======== getLibs ========
+ *  ======== Package.getLibs ========
+ *  This function is called when a program's configuration files are
+ *  being generated and it returns the name of a library appropriate
+ *  for the program's configuration.
  */
 function getLibs(prog)
 {
-    var suffix = prog.build.target.findSuffix(this);
-    if (suffix == null) {
-        /* no matching lib found in this package, return "" */
-        $trace("Unable to locate a compatible library, returning none.",
-                1, ['getLibs']);
-        return ("");
-    }
-
-    /* the location of the libraries are in lib/<profile>/* */
-    var name = this.$name + ".a" + suffix;
-    var lib = "lib/" + this.profile + "/" + name;
+    var BIOS = xdc.module('ti.sysbios.BIOS');
+    var libPath;
+    var suffix;
 
+    if (Build.libType == Build.LibType_PkgLib) {
+        /* lib path defined in Build.buildLibs() */
+        libPath = (BIOS.smpEnabled ? "lib/smpipc/debug" : "lib/ipc/debug");
 
-    /*
-     * If the requested profile doesn't exist, we return the 'release' library.
-     */
-    if (!java.io.File(this.packageBase + lib).exists()) {
-        $trace("Unable to locate lib for requested '" + this.profile +
-                "' profile.  Using 'release' profile.", 1, ['getLibs']);
-        lib = "lib/release/" + name;
+        /* find a compatible suffix */
+        if ("findSuffix" in prog.build.target) {
+            suffix = prog.build.target.findSuffix(this);
+        }
+        else {
+            suffix = prog.build.target.suffix;
+        }
+        return (libPath + "/" + this.$name + ".a" + suffix);
+    }
+    else {
+        return (Build.getLibs(this));
     }
-
-    return (lib);
 }
index 22f4dbfbd38f33da896a5c1865cfbf744ca16831..4a61bd647e71ee09afc99af258f280cb3266f419 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2014, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 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');
+var IpcBuild = xdc.loadCapsule("ti/sdo/ipc/Build.xs");
 
-/*
- * This package distributes its sources in the default release.  This is to
- * enable better understanding by the customer/field, as well as enable
- * modification and profiling techniques in the field.
- */
-Pkg.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld", "rsc_types.h",
-        "linkcmd.xdt",
-        "rsc_table_omapl138.h",
-        "rsc_table_tci6614.h",
-        "rsc_table_tci6614_v3.3.h",
-        "rsc_table_tci6638.h",
-        "rsc_table_omap5_dsp.h",
-        "rsc_table_omap5_ipu.h",
-        "rsc_table_vayu_dsp.h",
-        "rsc_table_vayu_ipu.h"
-];
+var objList = [ "Resource.c" ];
 
-var SRCS = ["Resource.c"];
+var trgFilter = {
+    field: "isa",
+    list: [ "64T", "66", "66e", "674", "v7M", "v7M4" ]
+};
 
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
-
-for (var i = 0; i < Build.targets.length; i++) {
-    var targ = Build.targets[i];
+/* if not building a product release, build package libraries */
+if (Bld_goal != "release") {
+    IpcBuild.buildLibs(objList, undefined, trgFilter, arguments);
+    IpcBuild.buildLibs(objList, undefined, trgFilter, ["profile=smp"]);
+}
 
-    /*
-     *  Only devices with an rpmsg-enabled HLOS and a slave would need this
-     *  library.  Skip targets that will never need this.
-     */
-    if (!((targ.isa.match(/^64T$/)) || (targ.isa.match(/^66(|e)$/)) ||
-            (targ.isa.match(/^674$/)) || (targ.isa.match(/^v7M(|4)$/)))) {
-        continue;
-    }
+Pkg.otherFiles = [
+    "package.bld",
+    "rsc_types.h",
+    "linkcmd.xdt",
+    "rsc_table_omapl138.h",
+    "rsc_table_tci6614.h",
+    "rsc_table_tci6614_v3.3.h",
+    "rsc_table_tci6638.h",
+    "rsc_table_omap5_dsp.h",
+    "rsc_table_omap5_ipu.h",
+    "rsc_table_vayu_dsp.h",
+    "rsc_table_vayu_ipu.h"
+].concat(objList);
 
-    /* Build for all profiles */
-    for (var profile in targ.profiles) {
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+Pkg.attrs.exportCfg = true;
 
-        Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
-            profile: profile
-        }).addObjects(SRCS);
-    }
-}
+Pkg.generatedFiles.$add("lib/");
index 63343199353ef9f9339eaf6430bd811e16dbf09a..45b4e81d36ff8347a320e2d94b0b669b86fd4a70 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
 /*
  *  ======== package.xs ========
- *
  */
+var Build = null;
 
 /*
- *  ======== getLibs ========
+ *  ======== close ========
  */
-function getLibs(prog)
+function close()
 {
-    var suffix = prog.build.target.findSuffix(this);
-    if (suffix == null) {
-        /* no matching lib found in this package, return "" */
-        $trace("Unable to locate a compatible library, returning none.",
-                1, ['getLibs']);
-        return ("");
+    if (xdc.om.$name != 'cfg') {
+        return;
     }
 
-    /* the location of the libraries are in lib/<profile>/* */
-    var name = this.$name + ".a" + suffix;
-    var lib = "lib/" + this.profile + "/" + name;
+    Build = xdc.useModule('ti.sdo.ipc.Build');
+}
+
+/*
+ *  ======== Package.getLibs ========
+ *  This function is called when a program's configuration files are
+ *  being generated and it returns the name of a library appropriate
+ *  for the program's configuration.
+ */
+function getLibs(prog)
+{
+    var BIOS = xdc.module('ti.sysbios.BIOS');
+    var libPath;
+    var suffix;
 
+    if (Build.libType == Build.LibType_PkgLib) {
+        /* lib path defined in Build.buildLibs() */
+        libPath = (BIOS.smpEnabled ? "lib/smpipc/debug" : "lib/ipc/debug");
 
-    /*
-     * If the requested profile doesn't exist, we return the 'release' library.
-     */
-    if (!java.io.File(this.packageBase + lib).exists()) {
-        $trace("Unable to locate lib for requested '" + this.profile +
-                "' profile.  Using 'release' profile.", 1, ['getLibs']);
-        lib = "lib/release/" + name;
+        /* find a compatible suffix */
+        if ("findSuffix" in prog.build.target) {
+            suffix = prog.build.target.findSuffix(this);
+        }
+        else {
+            suffix = prog.build.target.suffix;
+        }
+        return (libPath + "/" + this.$name + ".a" + suffix);
+    }
+    else {
+        return (Build.getLibs(this));
     }
-
-    return (lib);
 }
 
 /*
diff --git a/packages/ti/ipc/rpmsg/Build.xdc b/packages/ti/ipc/rpmsg/Build.xdc
new file mode 100644 (file)
index 0000000..6dc132b
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ *  ======== Build.xdc ========
+ */
+package ti.ipc.rpmsg;
+
+/*!
+ *  ======== Build ========
+ *  Build helper module
+ */
+metaonly module Build
+{
+    /*!
+     *  ======== getDefs ========
+     *  Get the compiler -D options necessary to build
+     */
+    String getDefs();
+}
diff --git a/packages/ti/ipc/rpmsg/Build.xs b/packages/ti/ipc/rpmsg/Build.xs
new file mode 100644 (file)
index 0000000..9916834
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ *  ======== Build.xs ========
+ */
+
+/*
+ *  ======== getDefs ========
+ */
+function getDefs()
+{
+    var defs = "";
+    var Program = xdc.module('xdc.cfg.Program');
+    var device = Program.cpu.deviceName;
+    var target = Program.build.target
+
+    if (xdc.module('ti.sysbios.BIOS').smpEnabled) {
+        defs += " -DSMP"; /* TODO where is this used? */
+    }
+
+    if (target.isa == "674") {
+        switch (device) {
+            case "OMAPL138":
+                defs += " -DOMAPL138";
+                break;
+            default:
+                throw new Error("Unsupported device: " + device);
+                break;
+        }
+    }
+    else if (target.isa == "66") {
+        switch (device) {
+            case "Kepler":
+            case "TMS320C66AK2E05":
+            case "TMS320TCI6630K2L":
+            case "TMS320TCI6636":
+            case "TMS320TCI6638":
+                defs += " -DTCI6638";
+                break;
+            case "Vayu":
+            case "DRA7XX":
+                defs += " -DVAYU -DDSP -DRPMSG_NS_2_0";
+                break;
+            default:
+                throw new Error("Unsupported device: " + device);
+                break;
+        }
+    }
+    else if (target.isa.match(/^v7M(|4)$/)) {
+        switch (device) {
+            case "OMAP4430":
+            case "OMAP5430":
+                defs += " -DOMAP5 -DRPMSG_NS_2_0";
+                break;
+            case "Vayu":
+            case "DRA7XX":
+                defs += " -DVAYU -DRPMSG_NS_2_0";
+                break;
+            default:
+                throw new Error("Unsupported device: " + device);
+                break;
+        }
+    }
+    else if (target.isa == "64T") {
+        switch (device) {
+            case "OMAP5430":
+                defs += " -DOMAP5 -DDSP -DRPMSG_NS_2_0";
+                break;
+            default:
+                throw new Error("Unsupported device: " + device);
+                break;
+        }
+    }
+
+    return (defs);
+}
diff --git a/packages/ti/ipc/rpmsg/NameMap.xdc b/packages/ti/ipc/rpmsg/NameMap.xdc
new file mode 100644 (file)
index 0000000..498e173
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ *  ======== NameMap.xdc ========
+ */
+package ti.ipc.rpmsg;
+
+/*!
+ *  ======== NameMap ========
+ */
+metaonly module NameMap
+{
+}
diff --git a/packages/ti/ipc/rpmsg/NameMap.xs b/packages/ti/ipc/rpmsg/NameMap.xs
new file mode 100644 (file)
index 0000000..741e463
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ *  ======== NameMap.xs ========
+ */
+
+/*
+ *  ======== module$use ========
+ *  Use other modules required by this module
+ */
+function module$use()
+{
+    xdc.useModule('ti.ipc.rpmsg.RPMessage');
+    xdc.useModule('ti.sdo.utils.MultiProc');
+    xdc.useModule('xdc.runtime.Diags');
+    xdc.useModule('xdc.runtime.Log');
+    xdc.useModule('xdc.runtime.System');
+}
index 45ef4a3201d0d87cff52cd72593a70283906c303..2285f859f5c98c2f51dcb302211ed146769787db 100644 (file)
@@ -33,8 +33,6 @@
 /*
  *  ======== RPMessage.xs ========
  */
-var HeapBuf;
-var Program;
 
 /*
  *  ======== module$use ========
@@ -57,10 +55,43 @@ function module$use()
     xdc.useModule('ti.sdo.utils.List');
     xdc.useModule('ti.sdo.utils.MultiProc');
 
-    Program = xdc.useModule('xdc.cfg.Program');
-    HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
+    var Program = xdc.useModule('xdc.cfg.Program');
+    var device = Program.cpu.deviceName;
+
+    switch (device) {
+        case "OMAP5430": /* OMAP5 */
+            xdc.loadPackage('ti.ipc.family.omap54xx');
+            break;
+
+        case "OMAPL138":
+            xdc.useModule('ti.ipc.family.omapl138.VirtQueue');
+            break;
+
+        case "TMS320TCI6614":
+            xdc.useModule('ti.ipc.family.tci6614.VirtQueue');
+            break;
+
+        case "Kepler":
+        case "TMS320C66AK2E05":
+        case "TMS320C66AK2H12":
+        case "TMS320TCI6630K2L":
+        case "TMS320TCI6636":
+        case "TMS320TCI6638":
+            xdc.useModule('ti.ipc.family.tci6638.VirtQueue');
+            break;
+
+        case "Vayu": /* Vayu */
+        case "DRA7XX": /* Vayu */
+            xdc.useModule('ti.ipc.family.vayu.VirtQueue');
+            break;
+
+        default:
+            throw new Error("Unspported device: " + device);
+            break;
+    }
 
     /* create message pool */
+    var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
     var params = new HeapBuf.Params();
 
     params.blockSize = this.messageBufferSize;
index 60b51289791df904c75c44dbdfee5a7e9e22a570..4baf4e0db164319263b9e684eb68941038f197ee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 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.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld", "Rpmsg.h", "virtio_ring.h", "_RPMessage.h",
-        "_VirtQueue.h", "RPMessage.h", "NameMap.h"];
-
-var SRCS = ["RPMessage.c", "NameMap.c"];
-
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
+var objList = [ "RPMessage.c", "NameMap.c" ];
 
 var myCopts = "";
 
+/*  Always build package libraries during the product build. This is
+ *  needed because there is a compile time binding to VirtQueue, which
+ *  has different implementations depending on the device. If this
+ *  package were to be included in the IPC product library, it would
+ *  require multiple product libraries (e.g. with a different VirtQueue
+ *  implementation for each device).
+ *
+ *  However, this package does participate in the custom build flow.
+ */
 for (var i = 0; i < Build.targets.length; i++) {
     var targ = Build.targets[i];
     var name = Pkg.name;
 
-    if (targ.$name.match(/^ti\.targets\.*/)) {
+    if (targ.$name.match(/^ti\.targets\./)) {
         myCopts = "--gcc";  /* Rpmsg.h requires gcc-isms */
     } else {
         myCopts = "";
     }
 
-    /* Build for all profiles */
     for (var profile in targ.profiles) {
 
-        /* Build a platform-specific library */
+        /* build a platform-specific library */
         if (targ.isa == "674") {
             Pkg.addLibrary("lib/" + profile + "/" + name + "_omapl138", targ, {
                 profile: profile,
                 copts: myCopts,
                 defs: "-DOMAPL138"
-            }).addObjects(SRCS);
-        } else if (targ.isa == "66") {
+            }).addObjects(objList);
+        }
+        else if (targ.isa == "66") {
             Pkg.addLibrary("lib/" + profile + "/" + name + "_tci6638", targ, {
                 profile: profile,
                 copts: myCopts,
                 defs: "-DTCI6638"
-            }).addObjects(SRCS);
-
-            Pkg.addLibrary("lib/" + profile + "/" + name + "_tci6614", targ, {
-                profile: profile,
-                copts: myCopts,
-                defs: "-DTCI6614"
-            }).addObjects(SRCS);
+            }).addObjects(objList);
 
             Pkg.addLibrary("lib/" + profile + "/" + name + "_vayu", targ, {
                 profile: profile,
                 copts: myCopts,
                 defs: "-DVAYU -DDSP -DRPMSG_NS_2_0"
-            }).addObjects(SRCS);
-        } else if (targ.isa.match(/^v7M(|4)$/)) {
+            }).addObjects(objList);
+        }
+        else if (targ.isa.match(/^v7M4?$/)) {
             Pkg.addLibrary("lib/" + profile + "/" + name + "_omap5_smp", targ, {
                 profile: profile,
                 copts: myCopts,
                 defs: "-DOMAP5 -DSMP -DRPMSG_NS_2_0"
-            }).addObjects(SRCS);
+            }).addObjects(objList);
 
             Pkg.addLibrary("lib/" + profile + "/" + name + "_vayu_smp", targ, {
                 profile: profile,
                 copts: myCopts,
                 defs: "-DVAYU -DSMP -DRPMSG_NS_2_0"
-            }).addObjects(SRCS);
-        } else if (targ.isa == "64T") {
+            }).addObjects(objList);
+        }
+        else if (targ.isa == "64T") {
             Pkg.addLibrary("lib/" + profile + "/" + name + "_omap5", targ, {
                 profile: profile,
                 copts: myCopts,
                 defs: "-DOMAP5 -DDSP -DRPMSG_NS_2_0"
-            }).addObjects(SRCS);
-        } else {
+            }).addObjects(objList);
+        }
+        else {
+            /* target not suppoted */
             continue;
         }
     }
 }
+
+Pkg.otherFiles = [
+    "package.bld",
+    "Rpmsg.h",
+    "virtio_ring.h",
+    "_RPMessage.h",
+    "_VirtQueue.h",
+    "RPMessage.h",
+    "NameMap.h"
+];
+
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+
+Pkg.generatedFiles.$add("lib/");
index 41f714ebe58dc057bb8fef13c692c15ad532d553..93dcdbd74c9cae5c7918d43ca77e00bdc4bfca44 100644 (file)
@@ -29,6 +29,7 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /*
  *  ======== package.xdc ========
  */
@@ -37,7 +38,8 @@
  *  ======== ti.ipc.rpmsg ========
  *  IPC over Virtio vrings (RPMSG).
  */
-
 package ti.ipc.rpmsg [1,0,1] {
+    module Build;
+    module NameMap;
     module RPMessage;
 }
index 0bf85140fa9e239300be133477812dac20b93f46..01adaa65cc595bcec952c98e5e1f6b19ba23d603 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2014, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,67 +42,29 @@ function close()
 {
     Program.exportModule('ti.sysbios.hal.Cache');
     Program.exportModule('ti.sysbios.knl.Idle');
-
-    var device = Program.cpu.deviceName;
-
-    switch (device) {
-        case "OMAP5430": /* OMAP5 */
-            xdc.loadPackage('ti.ipc.family.omap54xx');
-            break;
-
-        case "OMAPL138":
-            xdc.useModule('ti.ipc.family.omapl138.VirtQueue');
-            break;
-
-        case "TMS320TCI6614":
-            xdc.useModule('ti.ipc.family.tci6614.VirtQueue');
-            break;
-
-        case "Kepler":
-        case "TMS320C66AK2E05":
-        case "TMS320C66AK2H12":
-        case "TMS320TCI6630K2L":
-        case "TMS320TCI6636":
-        case "TMS320TCI6638":
-            xdc.useModule('ti.ipc.family.tci6638.VirtQueue');
-            break;
-
-        case "Vayu": /* Vayu */
-        case "DRA7XX": /* Vayu */
-            xdc.loadPackage('ti.ipc.family.vayu');
-            break;
-
-        default:
-            throw new Error("Unspported device: " + device);
-            break;
-    }
-
-    xdc.useModule('xdc.runtime.Assert');
-    xdc.useModule('xdc.runtime.Diags');
-    xdc.useModule('xdc.runtime.Log');
-    xdc.useModule('xdc.runtime.Memory');
-    xdc.useModule('xdc.runtime.Registry');
-    xdc.useModule('xdc.runtime.System');
-
-    xdc.useModule('ti.sysbios.BIOS');
-    xdc.useModule('ti.sysbios.gates.GateSwi');
-    xdc.useModule('ti.sysbios.heaps.HeapBuf');
-    xdc.useModule('ti.sysbios.knl.Semaphore');
-    xdc.useModule('ti.sysbios.knl.Swi');
-
-    xdc.useModule('ti.sdo.utils.List');
 }
 
 /*
- *  ======== getLibs ========
+ *  ======== Package.getLibs ========
+ *  This function is called when a program's configuration files are
+ *  being generated and it returns the name of a library appropriate
+ *  for the program's configuration.
  */
 function getLibs(prog)
 {
-    var device = prog.cpu.deviceName;
-    var platform = "";
-    var smp = "";
+
+    /* if custom build flow, do not contribute package library */
+    if ("ti.sdo.ipc.Build" in xdc.om) {
+        var Build = xdc.om["ti.sdo.ipc.Build"];
+
+        if ((Build.libType == Build.LibType_Custom)
+                || (Build.libType == Build.LibType_Debug)) {
+            return ("");
+        }
+    }
 
     var suffix = prog.build.target.findSuffix(this);
+
     if (suffix == null) {
         /* no matching lib found in this package, return "" */
         $trace("Unable to locate a compatible library, returning none.",
@@ -110,12 +72,14 @@ function getLibs(prog)
         return ("");
     }
 
-    var BIOS = xdc.module('ti.sysbios.BIOS');
-    if (BIOS.smpEnabled == true) {
+    var device = prog.cpu.deviceName;
+    var platform = "";
+    var smp = "";
+
+    if (xdc.module('ti.sysbios.BIOS').smpEnabled) {
         smp = "_smp";
     }
 
-
     switch (device) {
         case "OMAP4430":
         case "OMAP5430":
@@ -150,7 +114,6 @@ function getLibs(prog)
     var name = this.$name + "_" + platform + smp + ".a" + suffix;
     var lib = "lib/" + this.profile + "/" + name;
 
-
     /*
      * If the requested profile doesn't exist, we return the 'release' library.
      */
index b68ae2aea0d167a665959d3f6716a37bdbfe060f..206da0134cf6242af99a611f1c43aa80ba29e2a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 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');
 
-/*
- * This package distributes its sources in the default release.  This is to
- * enable better understanding by the customer/field, as well as enable
- * modification and profiling techniques in the field.
- */
-Pkg.attrs.exportSrc = true;
-
-Pkg.otherFiles = ["package.bld", "_TransportRpmsg.h"];
-
-var SRCS = ["TransportRpmsgSetup.c", "TransportRpmsg.c"];
-
-/* remove this output directory during a clean */
-Pkg.generatedFiles.$add("lib/");
+var objList = [ "TransportRpmsgSetup.c", "TransportRpmsg.c" ];
 
 var myCopts = "";
 
+/*  Always build package libraries during the product build. This is
+ *  needed because Rpmsg.h requires the --gcc option and because we
+ *  need some libraries built with custom defines.
+ *
+ *  However, this package does participate in the custom build flow.
+ */
 for (var i = 0; i < Build.targets.length; i++) {
     var targ = Build.targets[i];
+    var name = Pkg.name;
 
     /*
      *  Only devices with an rpmsg-enabled HLOS and a slave would need this
      *  library.  Skip targets that will never need this.
      */
-    if (!((targ.isa.match(/^64T$/)) || (targ.isa.match(/^66(|e)$/)) ||
-            (targ.isa.match(/^674$/)) || (targ.isa.match(/^v7M(|4)$/)))) {
+    if (!targ.isa.match(/^(64T|66|674|v7M4?)$/)) {
         continue;
     }
 
-    if (targ.$name.match(/^ti\.targets\.*/)) {
+    if (targ.$name.match(/^ti\.targets\./)) {
         myCopts = "--gcc";  /* Rpmsg.h requires gcc-isms */
     } else {
         myCopts = "";
     }
 
-    /* Build for all profiles */
     for (var profile in targ.profiles) {
 
         /* For all targets, build a rpmsg-upstream-compatible lib */
-        Pkg.addLibrary("lib/" + profile + "/" + Pkg.name, targ, {
+        Pkg.addLibrary("lib/" + profile + "/" + name, targ, {
             profile: profile,
             copts: myCopts
-        }).addObjects(SRCS);
+        }).addObjects(objList);
 
-        if (targ.isa.match(/^v7M(|4)$/) || targ.isa.match(/^64T$/) ||
-                targ.isa.match(/^66$/)) {
+        if (targ.isa.match(/^(64T|66|v7M4?)$/)) {
             /* And for select targets, build a rpmsg2-compatible lib */
-            Pkg.addLibrary("lib/" + profile + "/" + Pkg.name + "_rpmsg2",
-                    targ, {
+            Pkg.addLibrary("lib/" + profile + "/" + name + "_rpmsg2", targ, {
                 profile: profile,
                 copts: myCopts + " -DRPMSG_NS_2_0"
-            }).addObjects(SRCS);
+            }).addObjects(objList);
         }
     }
 }
+
+Pkg.otherFiles = [
+    "package.bld",
+    "_TransportRpmsg.h"
+];
+
+/* include source files in the release package */
+Pkg.attrs.exportSrc = true;
+
+Pkg.generatedFiles.$add("lib/");
index 0c35418d6651d7951108ddf074d891bd9f67a6f5..c71b9e2c9e6212929daab69f0171190a52f71e8f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /*
  *  ======== package.xs ========
  */
 
 /*
- *  ======== getLibs ========
+ *  ======== Package.getLibs ========
+ *  This function is called when a program's configuration files are
+ *  being generated and it returns the name of a library appropriate
+ *  for the program's configuration.
  */
 function getLibs(prog)
 {
-    var device = prog.cpu.deviceName;
-    var special = "";   /* used if there is a 'special' lib for a platform */
+
+    /* if custom build flow, do not contribute package library */
+    if ("ti.sdo.ipc.Build" in xdc.om) {
+        var Build = xdc.om["ti.sdo.ipc.Build"];
+
+        if ((Build.libType == Build.LibType_Custom)
+                || (Build.libType == Build.LibType_Debug)) {
+            return ("");
+        }
+    }
+
     var suffix = prog.build.target.findSuffix(this);
+
     if (suffix == null) {
         /* no matching lib found in this package, return "" */
         $trace("Unable to locate a compatible library, returning none.",
@@ -48,6 +62,9 @@ function getLibs(prog)
         return ("");
     }
 
+    var device = prog.cpu.deviceName;
+    var special = "";   /* used if there is a 'special' lib for a platform */
+
     switch (device) {
         case "OMAP4430":
         case "OMAP5430":
index b9551b61fb847ce5970404beb9eee692626e9c21..a8190edca8c49aa29f743245923bb2f21f074462 100644 (file)
@@ -194,7 +194,7 @@ metaonly module Build
      *  ======== getCCOpts ========
      *  Get the compiler options necessary to build
      */
-    metaonly String getCCOpts(String target);
+    metaonly String getCCOpts(xdc.bld.ITarget.Module target);
 
     /*!
      *  ======== getDefaultCustomCCOpts ========
index bfec6022fafdd92ebe349d5551366bd570988e1a..180b384c702c2982c15234be318fd5aa04eefc13 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2014 Texas Instruments Incorporated - http://www.ti.com
+ * 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
@@ -308,7 +308,15 @@ function module$validate()
  */
 function getCCOpts(target)
 {
-    return(Build.customCCOpts);
+    var ccOpts = "";
+
+    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);
 }
 
 /*
@@ -334,43 +342,45 @@ function getEnumString(enumProperty)
 /*
  * Add pre-built Instrumented and Non-Intrumented release libs
  */
-var ipcSources  =  "ipc/GateMP.c " +
-                   "ipc/ListMP.c " +
-                   "ipc/SharedRegion.c " +
-                   "ipc/MessageQ.c " +
-                   "ipc/Ipc.c " +
-                   "ipc/Notify.c ";
-
-var gatesSources = "ipc/gates/GatePeterson.c " +
-                   "ipc/gates/GatePetersonN.c " +
-                   "ipc/gates/GateMPSupportNull.c ";
-
-var heapsSources = "ipc/heaps/HeapBufMP.c " +
-                   "ipc/heaps/HeapMemMP.c " +
-                   "ipc/heaps/HeapMultiBufMP.c ";
+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 +
@@ -378,156 +388,164 @@ var commonSources = ipcSources +
                     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/NotifyDriverMbx.c " +
-                   "ipc/family/vayu/NotifySetup.c " +
-                   "ipc/family/tda3xx/InterruptDsp.c " +
-                   "ipc/family/tda3xx/NotifyDriverMbx.c " +
-                   "ipc/family/tda3xx/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 " +
-                   "ipc/family/f2837x/NotifyDriverCirc.c " +
-                   "ipc/family/f2837x/IpcMgr.c " +
-                   "ipc/family/f2837x/TransportCirc.c " +
-                   "ipc/family/f2837x/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/NotifyDriverMbx.c " +
-                   "ipc/family/vayu/NotifySetup.c " +
-                   "ipc/family/tda3xx/InterruptIpu.c " +
-                   "ipc/family/tda3xx/NotifyDriverMbx.c " +
-                   "ipc/family/tda3xx/NotifySetup.c ";
-
-var M4Sources    = "ipc/gates/GateHWSpinlock.c " +
-                   "ipc/family/vayu/InterruptIpu.c " +
-                   "ipc/family/vayu/NotifyDriverMbx.c " +
-                   "ipc/family/vayu/NotifySetup.c " +
-                   "ipc/family/tda3xx/InterruptIpu.c " +
-                   "ipc/family/tda3xx/NotifyDriverMbx.c " +
-                   "ipc/family/tda3xx/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/NotifyDriverMbx.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/NotifyDriverMbx.c " +
-                   "ipc/family/vayu/NotifySetup.c " +
-                   "ipc/family/tda3xx/InterruptArp32.c " +
-                   "ipc/family/tda3xx/NotifyDriverMbx.c " +
-                   "ipc/family/tda3xx/NotifySetup.c ";
+
+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 C28Sources   = "ti/sdo/ipc/family/f28m35x/NotifyDriverCirc.c " +
+                   "ti/sdo/ipc/family/f28m35x/IpcMgr.c " +
+                   "ti/sdo/ipc/family/f28m35x/TransportCirc.c " +
+                   "ti/sdo/ipc/family/f28m35x/NameServerBlock.c " +
+                   "ti/sdo/ipc/family/f2837x/NotifyDriverCirc.c " +
+                   "ti/sdo/ipc/family/f2837x/IpcMgr.c " +
+                   "ti/sdo/ipc/family/f2837x/TransportCirc.c " +
+                   "ti/sdo/ipc/family/f2837x/NameServerBlock.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,
@@ -567,7 +585,17 @@ var cList = {
     "gnu.targets.arm.M4F"               : commonSources + M4Sources,
 };
 
-var cFiles = { };
+var cFiles = {
+    "ti.ipc.ipcmgr" : {
+        cSources: [ "IpcMgr.c" ]
+    },
+    "ti.ipc.family.vayu" : {
+        cSources: [ "VirtQueue.c" ]
+    },
+    "ti.ipc.rpmsg" : {
+        cSources: [ "NameMap.c", "RPMessage.c" ]
+    }
+};
 
 var ipcPackages = [
     "ti.sdo.ipc",
@@ -590,13 +618,19 @@ var ipcPackages = [
     "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 asmListNone = [
 ];
 
 var asmList64P = [
-    "ipc/gates/GateAAMonitor_asm.s64P",
+    "ti/sdo/ipc/gates/GateAAMonitor_asm.s64P",
 ];
 
 var asmList = {
@@ -703,6 +737,14 @@ function getDefs()
     defs += " -Dti_sdo_ipc_MessageQ_traceFlag__D=" +
             (MessageQ.traceFlag ? "TRUE" : "FALSE");
 
+    if ("ti.ipc.ipcmgr.IpcMgr" in xdc.om) {
+        defs += xdc.module("ti.ipc.ipcmgr.IpcMgr").getDefs();
+    }
+
+    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");
 
@@ -738,12 +780,13 @@ function getCFiles(target)
 
     if (BIOS.buildingAppLib == true) {
         var targetModules = Program.targetModules();
+
         for (var m = 0; m < targetModules.length; m++) {
             var mod = targetModules[m];
             var mn = mod.$name;
-            var pn = mn.substring(0, mn.lastIndexOf("."));
+            var pn = mod.$package.$name;
 
-            /* sanity check package path */
+            /* determine if this is an ipc package */
             var packageMatch = false;
 
             for (var i = 0; i < ipcPackages.length; i++) {
@@ -754,20 +797,16 @@ function getCFiles(target)
             }
 
             if (packageMatch && !mn.match(/Proxy/)) {
-                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] + " ";
-                    }
+                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] + " ";
                 }
             }
         }
index 430172f65107b362fe4d6f8f7862e75009cde3ca..affa03dd3542cdb18f1aee06768ddb810fa58a9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,11 @@ Build.libType = Build.LibType_Custom;
 Build.assertsEnabled = true;
 Build.logsEnabled = true;
 
+/* enable internal asserts */
+var Diags = xdc.useModule('xdc.runtime.Diags');
+var Defaults = xdc.useModule('xdc.runtime.Defaults');
+Defaults.common$.diags_INTERNAL = Diags.ALWAYS_ON;
+
 var SourceDir = xdc.module('xdc.cfg.SourceDir');
 SourceDir.verbose = 1;
 
index 40646fbcc1ed261c2f6d8b4f11279926004ed621..894484fd706359694acb2a32de2cfb079b4ae189 100644 (file)
@@ -1,6 +1,6 @@
 %%{
 /*
- * Copyright (c) 2013-2014 Texas Instruments Incorporated - http://www.ti.com
+ * 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 OBJS = [];
     var CFILES = Build.getCFiles(TARGET.$name);
 %%}
-vpath % `File.getDOSPath(this.$package.packageRepository) + "ti/sdo/"`
+vpath % `File.getDOSPath(this.$package.packageRepository)`
 vpath %.c `XDCROOT`
 
 XOPTS = `'-I"' + XDCROOT + '"' + " -Dxdc_target_types__=" + File.getDOSPath(TARGET.$package.packageRepository) + TARGET.stdInclude + " -Dxdc_target_name__=" + TARGET.name`
 
-CCOPTS = `Build.getCCOpts(TARGET.name)`
+CCOPTS = `Build.getCCOpts(TARGET)`
 
-IPC_ROOT = `File.getDOSPath(this.$package.packageRepository) + "ti/sdo/"`
+IPC_ROOT = `File.getDOSPath(this.$package.packageRepository)`
 
 BUILD_DEFS = `Build.getDefs()`
 
index a482c8cb77aec6d74b1279154c250cffb626556a..4ea8ee52af17b23bca139a79b18251c151907fce 100644 (file)
@@ -1,6 +1,6 @@
 %%{
 /*
- * Copyright (c) 2012-2014 Texas Instruments Incorporated - http://www.ti.com
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
     var CGEN = TARGET.rootDir.replace(/\\/g, "/");
 
-    function baseName(path) {
-       return path.substr(path.lastIndexOf('/') + 1).replace(/\.[^\.]+$/, "");
+    function baseName(file) {
+       return file.substr(file.lastIndexOf('/') + 1).replace(/\.[^\.]+$/, "");
     }
 
-    function packageName(path) {
-       var dirpath = path.substring(0, path.lastIndexOf('/'));
-       return dirpath.substr(dirpath.lastIndexOf('/') + 1);
+    function packageName(file) {
+       return file.substring(0, file.lastIndexOf('/')).replace(/\//g, "_");
     }
     var OBJS = [];
 %%}
-vpath % `File.getDOSPath(this.$package.packageRepository) + "ti/sdo/"`
+vpath % `File.getDOSPath(this.$package.packageRepository)`
 vpath %.c `XDCROOT`
 
-CCOPTS = `Build.getCCOpts(TARGET.$name)`
+CCOPTS = `Build.getCCOpts(TARGET)`
 
 BUILD_DEFS = `Build.getDefs()`
 
diff --git a/packages/ti/srvmgr/omaprpc/OmapRpc.xdc b/packages/ti/srvmgr/omaprpc/OmapRpc.xdc
new file mode 100644 (file)
index 0000000..43f9ae5
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ *  ======== OmapRpc.xdc ========
+ */
+package ti.srvmgr.omaprpc;
+
+/*!
+ *  ======== OmapRpc ========
+ */
+metaonly module OmapRpc
+{
+}
diff --git a/packages/ti/srvmgr/omaprpc/OmapRpc.xs b/packages/ti/srvmgr/omaprpc/OmapRpc.xs
new file mode 100644 (file)
index 0000000..5271039
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ *  ======== OmapRpc.xs ========
+ */
+
+/*
+ *  ======== module$use ========
+ *  Use other modules required by this module
+ */
+function module$use()
+{
+    xdc.useModule('ti.grcm.RcmServer');
+    xdc.useModule('ti.ipc.rpmsg.NameMap');
+    xdc.useModule('ti.ipc.rpmsg.RPMessage');
+    xdc.loadPackage('ti.srvmgr');
+    xdc.useModule('ti.sysbios.BIOS');
+    xdc.useModule('ti.sysbios.knl.Semaphore');
+    xdc.useModule('ti.sysbios.knl.Task');
+    xdc.useModule('xdc.runtime.Memory');
+    xdc.useModule('xdc.runtime.System');
+}
index ca2c1e9670991aba4b1f434fddedcf95b174d72d..068c705a96125347f6088d9c711ce45a2d99681d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
 /*
  *  ======== package.xdc ========
- *
  */
 
 /*!
  *  ======== ti.srvmgr.omaprpc ========
  *  Generic RPC communication.
- *
  */
-
 package ti.srvmgr.omaprpc [1,0,0] {
+    module OmapRpc;
 }