Added missing package dependencies.
authorRamsey Harris <ramsey@ti.com>
Tue, 9 Apr 2013 21:31:49 +0000 (14:31 -0700)
committerRamsey Harris <ramsey@ti.com>
Tue, 9 Apr 2013 21:31:49 +0000 (14:31 -0700)
packages/ti/ipc/family/omap54xx/VirtQueue.c
packages/ti/ipc/family/omap54xx/VirtQueue.h
packages/ti/ipc/family/omap54xx/package.xs
packages/ti/ipc/ipcmgr/package.xdc
packages/ti/ipc/rpmsg/RPMessage.c
packages/ti/ipc/rpmsg/package.xs
packages/ti/ipc/transports/TransportRpmsgSetup.xs
packages/ti/pm/package.xs
packages/ti/sdo/ipc/Build.xs
packages/ti/srvmgr/omaprpc/package.xs

index dce2e68fe025a107c0e15a6f27c6ef0b26f48da5..2ed8ffd46b6f17b5dc66ae321c814177015ea1f7 100644 (file)
@@ -61,7 +61,6 @@
 #include <xdc/runtime/Diags.h>
 
 #include <ti/sysbios/hal/Hwi.h>
-#include <ti/sysbios/knl/Semaphore.h>
 #include <ti/sysbios/knl/Clock.h>
 #include <ti/sysbios/gates/GateAll.h>
 #include <ti/sysbios/BIOS.h>
index 5ee14394dc247bbe245abecbc15718921ae28924..1d74a041ecc5fbbc5fe46f19c8f0f29de35db0a6 100644 (file)
@@ -88,6 +88,8 @@
 #ifndef ti_ipc_family_omap54xx_VirtQueue__include
 #define ti_ipc_family_omap54xx_VirtQueue__include
 
+#include <xdc/runtime/Error.h>
+
 #if defined (__cplusplus)
 extern "C" {
 #endif
index ab25cba82112e285f0a1fb9cae297d1a1ede68ef..5ab1c202b0b2b4c3b4bb8a780c4726a10cc213a6 100644 (file)
  */
 function close()
 {
+    if (xdc.om.$name != "cfg") {
+        return;
+    }
+
     /* bring in modules we use in this package */
-    xdc.useModule('ti.sysbios.knl.Swi');
-    xdc.useModule('ti.sysbios.hal.Cache');
+    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');
 }
 
 /*
@@ -92,3 +98,15 @@ function getLibs(prog)
 
     return libAry.join(";");
 }
+
+/*
+ *  ======== validate ========
+ */
+function validate()
+{
+    var BIOS = xdc.module('ti.sysbios.BIOS');
+
+    if (!BIOS.smpEnabled) {
+        throw new Error(Pkg.$name+" must have BIOS.smpEnabled set to true.");
+    }
+}
index 6ac2c56782e0e0e9aded00a09d873f9de38fe68f..fc9657efc424f22f6e2d1ea93299d262f1124b8f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012, Texas Instruments Incorporated
+ * Copyright (c) 2013, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -28,7 +28,9 @@
  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * */
+ *
+ */
+
 /*
  *  ======== package.xdc ========
  */
@@ -37,5 +39,6 @@
  *  ======== ti.ipc.ipcmgr ========
  *  Home for ipc startup (and later config/other fxns) for rpmsg based IPC.
  */
-package ti.ipc.ipcmgr [1,0,0,0] {
+package ti.ipc.ipcmgr [1,0,0] {
+    module IpcMgr;
 }
index bc6b91f63b270805fcba2055831a047d39f1b765..978c858377e8ea773f1cf22fd70580ea3898ef6f 100644 (file)
 #include <string.h>
 
 #include <xdc/runtime/System.h>
-#include <xdc/runtime/Error.h>
 #include <xdc/runtime/Assert.h>
 #include <xdc/runtime/Memory.h>
-#include <xdc/runtime/Main.h>
 #include <xdc/runtime/Registry.h>
 #include <xdc/runtime/Log.h>
 #include <xdc/runtime/Diags.h>
index 726594d29c3ffbbb00294aba2b2ef36e4958d86a..b28b4bacafb3c3f57dfbf63e6627a4f88d5db78f 100644 (file)
@@ -42,6 +42,44 @@ 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 "TMS320TCI6638":
+            xdc.useModule('ti.ipc.family.tci6638.VirtQueue');
+            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');
 }
 
 /*
@@ -61,7 +99,8 @@ function getLibs(prog)
         return ("");
     }
 
-    if (prog.platformName.match(/ipu/)) {
+    var BIOS = xdc.module('ti.sysbios.BIOS');
+    if (BIOS.smpEnabled == true) {
         smp = "_smp";
     }
 
index 5902084ececcd93aeec7a5cc5a07ed94315d7c09..7adac0de6bb1b2a72ed3dac915612ae9c77905d7 100644 (file)
@@ -43,8 +43,7 @@ var MultiProc            = null;
 function module$use()
 {
     TransportRpmsgSetup = this;
-    TransportRpmsg =
-            xdc.useModule("ti.ipc.transports.TransportRpmsg");
+    TransportRpmsg = xdc.useModule("ti.ipc.transports.TransportRpmsg");
     MultiProc = xdc.useModule("ti.sdo.utils.MultiProc");
 }
 
index 1f4a5694de979f6dbb571b1b27997fbed30c9d45..5dd079054d478950fdbfd67d48812e9bd8831fa4 100644 (file)
@@ -69,7 +69,13 @@ function init()
  */
 function close()
 {
+    if (xdc.om.$name != "cfg") {
+        return;
+    }
+
     Program.exportModule('ti.sysbios.knl.Idle');
+
+    xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
 }
 
 /*
index a1a3c83078832ed630170f7ddaa052bde0ac1a78..0d6a19c7a5b8816a161fb376a5a6ba721a809d0e 100644 (file)
@@ -567,8 +567,10 @@ function getProfiles(xdcArgs)
  */
 function buildLibs(objList, relList, filter, xdcArgs)
 {
-    for (var i = 0; i < xdc.module('xdc.bld.BuildEnvironment').targets.length; i++) {
-        var targ = xdc.module('xdc.bld.BuildEnvironment').targets[i];
+    var Build = xdc.useModule('xdc.bld.BuildEnvironment');
+
+    for (var i = 0; i < Build.targets.length; i++) {
+        var targ = Build.targets[i];
 
         /* skip target if not supported */
         if (!supportsTarget(targ, filter)) {
index afba5377b3935f69dc41b94fb3532b06ee3dbca1..e3e29eec7df090e5014e5028c9fdf9392615c0bb 100644 (file)
  *
  */
 
+/*
+ *  ======== close ========
+ */
+function close()
+{
+    xdc.loadPackage('ti.ipc.rpmsg');
+    xdc.loadPackage('ti.srvmgr');
+}
+
 /*
  *  ======== getLibs ========
  */