OMAP5 MessageQ: Got MessageQ stack over RPMSG to build for OMAP5 SMP only.
authorG Anthony <a0783926@ti.com>
Fri, 1 Mar 2013 00:27:20 +0000 (16:27 -0800)
committerG Anthony <a0783926@ti.com>
Fri, 1 Mar 2013 00:27:20 +0000 (16:27 -0800)
Re-enabled messageq_single and messageq_multi tests in ti/ipc/tests, and
update the config to switch off OMAP5 IPU platform and others.

Signed-off-by: G Anthony <a0783926@ti.com>
packages/ti/configs/omap54xx/IpcCommon.cfg.xs
packages/ti/ipc/tests/package.bld
packages/ti/ipc/tests/ping_rpmsg.cfg
packages/ti/ipc/tests/rpmsg_transport.cfg

index ee860bbc9676cd12391ccf959f7e9d8c4a01436e..84861660ed80f256240fc90f962c6dc7478af8ba 100644 (file)
@@ -50,10 +50,6 @@ var BIOS        = xdc.useModule('ti.sysbios.BIOS');
 /* Reduces code size, by only pulling in modules explicitly referenced: */
 BIOS.libType    = BIOS.LibType_Custom;
 
-/* This calls MessageQCopy_init() once before BIOS_start(): */
-xdc.loadPackage('ti.ipc.ipcmgr');
-BIOS.addUserStartupFunction('&IpcMgr_rpmsgStartup');
-
 xdc.loadPackage('ti.ipc.rpmsg');
 xdc.loadPackage('ti.ipc.family.omap54xx');
 
index 10347ac18697f6e85ce4a0c6d15bfb74e6519877..8e237698285fcd5a52dfd207b931ae5d09f402d6 100644 (file)
@@ -113,7 +113,6 @@ for (var i = 0; i < Build.targets.length; i++) {
                 }).addObjects(["dual_transports.c"]);
         }
 
-/* RE-ENABLE after ping_rpmsg works on OMAP5 SMP:
         Pkg.addExecutable(name + "/messageq_multi", targ, platform, {
             cfgScript: "rpmsg_transport",
             defs: "-D BENCHMARK "
@@ -123,7 +122,7 @@ for (var i = 0; i < Build.targets.length; i++) {
             cfgScript: "rpmsg_transport",
             defs: "-D BENCHMARK "
         }).addObjects(["messageq_single.c"]);
-*/
+
         if (platform.match(/^ti\.platforms\.evmOMAPL138\:DSP/)) {
                 Pkg.addExecutable(name + "/nano_test", targ, platform, {
                     cfgScript: "rpmsg_transport"
index fdf1bb7754dc87cc08f104913396b455324ab976..d184a52fb9d6dfede348670d27ab24a664f940b1 100644 (file)
@@ -30,8 +30,8 @@
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-print ("Program.cpu.deviceName = " + Program.cpu.deviceName);
-print ("Program.platformName = " + Program.platformName);
+//print ("Program.cpu.deviceName = " + Program.cpu.deviceName);
+//print ("Program.platformName = " + Program.platformName);
 
 /* This will match for omap5 SMP only: */
 if (Program.platformName.match(/ipu/)) {
@@ -42,6 +42,11 @@ if (Program.platformName.match(/ipu/)) {
     Program.global.tsk1 = Task.create('&pingTaskFxn', params);
     Task.deleteTerminatedTasks = true;
 
+    /* This calls MessageQCopy_init() once before BIOS_start(): */
+    xdc.loadPackage('ti.ipc.ipcmgr');
+    var BIOS        = xdc.useModule('ti.sysbios.BIOS');
+    BIOS.addUserStartupFunction('&IpcMgr_rpmsgStartup');
+
     xdc.loadCapsule("ti/configs/omap54xx/IpcCommon.cfg.xs");
     xdc.includeFile("ti/configs/omap54xx/IpuSmp.cfg");
     xdc.includeFile("ti/configs/omap54xx/IpuAmmu.cfg");
index f0004bf3a0726eb36e2d312592398ac48200a493..970f3b336bf00a89b08a22151e84186c76dfd0dc 100644 (file)
  */
 
 
-xdc.loadCapsule("messageq_common.cfg.xs");
+//print ("Program.cpu.deviceName = " + Program.cpu.deviceName);
+//print ("Program.platformName = " + Program.platformName);
+
+/* This will match for omap5 SMP only: */
+if (Program.platformName.match(/ipu/)) {
+    /* This initializes the MessageQ Transport RPMSG stack:  */
+    xdc.loadPackage('ti.ipc.ipcmgr');
+    var BIOS        = xdc.useModule('ti.sysbios.BIOS');
+    BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
+
+    var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
+    var params = new HeapBuf.Params;
+    params.align = 8;
+    params.blockSize = 512;
+    params.numBlocks = 256;
+    var msgHeap = HeapBuf.create(params);
+
+    var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
+    MessageQ.registerHeapMeta(msgHeap, 0);
+
+    var Diags = xdc.useModule('xdc.runtime.Diags');
+    var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportVirtioSetup');
+    VirtioSetup.common$.diags_INFO = Diags.RUNTIME_OFF;
+
+    xdc.loadCapsule("ti/configs/omap54xx/IpcCommon.cfg.xs");
+    xdc.includeFile("ti/configs/omap54xx/IpuSmp.cfg");
+    xdc.includeFile("ti/configs/omap54xx/IpuAmmu.cfg");
+}
+else {
+    xdc.loadCapsule("messageq_common.cfg.xs");
+}
 
 var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
+
 var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportVirtioSetup');
 MessageQ.SetupTransportProxy = VirtioSetup;