diff --git a/packages/ti/ipc/tests/ping_rpmsg_common.cfg.xs b/packages/ti/ipc/tests/ping_rpmsg_common.cfg.xs
index bb3ee654500cd037458025171e731b5819151fa3..e338de0c4339bedf999ebc188bd279f61d705219 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2018 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
var Memory = xdc.useModule('xdc.runtime.Memory');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
-BIOS.heapSize = 0x20000;
-//BIOS.libType = BIOS.LibType_Custom;
+BIOS.heapSize = 0x10000;
+/* Reduces code size, by only pulling in modules explicitly referenced: */
+BIOS.libType = BIOS.LibType_Custom;
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
Idle.addFunc('&VirtQueue_cacheWb');
var System = xdc.useModule('xdc.runtime.System');
-var SysMin = xdc.useModule('xdc.runtime.SysMin');
+/* Use ti.trace.SysMin for remoteproc to handle trace as circular buffer */
+var SysMin = xdc.useModule('ti.trace.SysMin');
System.SupportProxy = SysMin;
var Diags = xdc.useModule('xdc.runtime.Diags');
Timer.defaultHalf = Timer.Half_LOWER;
Clock.timerId = 1;
+ /* COMMENT OUT TO SHUT OFF LOG FOR BENCHMARKS: */
+ /*
Diags.setMaskMeta("ti.ipc.family.omapl138.Interrupt", Diags.USER1,
Diags.ALWAYS_ON);
Diags.setMaskMeta("ti.ipc.family.omapl138.VirtQueue", Diags.USER1,
Diags.ALWAYS_ON);
+ */
}
else if (Program.platformName.match(/6614/)) {
var VirtQueue = xdc.useModule('ti.ipc.family.tci6614.VirtQueue');
Diags.ALWAYS_ON);
Diags.setMaskMeta("ti.ipc.family.tci6614.VirtQueue", Diags.USER1,
Diags.ALWAYS_ON);
- Diags.setMaskMeta("ti.ipc.transports.TransportVirtio",
+ Diags.setMaskMeta("ti.ipc.transports.TransportRpmsg",
Diags.INFO|Diags.USER1|Diags.STATUS,
Diags.ALWAYS_ON);
Diags.setMaskMeta("ti.ipc.namesrv.NameServerRemoteRpmsg", Diags.INFO,
Diags.ALWAYS_ON);
*/
}
-else if (Program.platformName.match(/simKepler/)) {
+else if (Program.platformName.match(/simKepler/) ||
+ Program.cpu.deviceName.match(/^TMS320C66AK2E05$/) ||
+ Program.cpu.deviceName.match(/^TCI66AK2G02$/) ||
+ Program.cpu.deviceName.match(/^TMS320C66AK2H12$/) ||
+ Program.cpu.deviceName.match(/^TMS320TCI663(0K2L|6|8)$/)) {
var VirtQueue = xdc.useModule('ti.ipc.family.tci6638.VirtQueue');
- var Interrupt = xdc.useModule('ti.ipc.family.tci6638.Interrupt');
/* Note: MultiProc_self is set during VirtQueue_init based on DNUM. */
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
- MultiProc.setConfig(null, ["HOST", "CORE0", "CORE1", "CORE2", "CORE3",
- "CORE4", "CORE5", "CORE6", "CORE7"]);
+
+ switch (Program.cpu.deviceName) {
+ case "TMS320C66AK2E05":
+ case "TCI66AK2G02":
+ MultiProc.setConfig(null, ["HOST", "CORE0"]);
+ break;
+
+ case "TMS320TCI6630K2L":
+ MultiProc.setConfig(null,
+ ["HOST", "CORE0", "CORE1", "CORE2", "CORE3"]);
+ break;
+
+ case "TMS320TCI6636":
+ case "TMS320TCI6638":
+ case "TMS320C66AK2H12":
+ MultiProc.setConfig(null,
+ ["HOST", "CORE0", "CORE1", "CORE2", "CORE3",
+ "CORE4", "CORE5", "CORE6", "CORE7"]);
+ break;
+ }
+
Program.sectMap[".text:_c_int00"] = new Program.SectionSpec();
Program.sectMap[".text:_c_int00"].loadSegment = "L2SRAM";
Program.sectMap[".text:_c_int00"].loadAlign = 0x400;
/* COMMENT OUT TO SHUT OFF LOG FOR BENCHMARKS: */
/*
- Diags.setMaskMeta("ti.ipc.family.tci6638.Interrupt", Diags.USER1,
- Diags.ALWAYS_ON);
Diags.setMaskMeta("ti.ipc.family.tci6638.VirtQueue", Diags.USER1,
Diags.ALWAYS_ON);
- Diags.setMaskMeta("ti.ipc.transports.TransportVirtio",
+ Diags.setMaskMeta("ti.ipc.transports.TransportRpmsg",
Diags.INFO|Diags.USER1|Diags.STATUS,
Diags.ALWAYS_ON);
Diags.setMaskMeta("ti.ipc.namesrv.NameServerRemoteRpmsg", Diags.INFO,
Diags.ALWAYS_ON);
*/
}
-else {
- throw("messageq_common.cfg: Did not match any platform!");
-}
+else if (Program.platformName.match(/^ti\.platforms\.cortexR:AM65X/) &&
+ Program.cpu.attrs.cpuCore.match(/^R5$/)) {
+
+/* TODO: Need check on bufSize & defaultHeapSize */
+// SysMin.bufSize = 0x8000;
+// Memory.defaultHeapSize = 0x20000;
+ var VirtQueue = xdc.useModule('ti.ipc.family.am65xx.VirtQueue');
+
+ /* Enable Memory Translation module that operates on the Resource Table */
+ var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
-Hwi.enableException = true;
+ Resource.loadSymbol = "__RESOURCE_TABLE";
-xdc.loadPackage('ti.ipc.ipcmgr');
+ var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
+ MultiProc.setConfig("R5F-0", ["HOST", "R5F-0", "R5F-1"]);
+
+ xdc.loadCapsule("R5fmpu_am65xx.cfg");
+
+ var Hwi = xdc.useModule('ti.sysbios.family.arm.v7r.keystone3.Hwi');
+/* TODO: Need to check on equivalent for K3 */
+/* Hwi.enableException = true; */
+
+ SysMin.bufSize = 0x8000;
+
+ Program.sectMap[".tracebuf"] = "TRACE_BUF";
+
+ var dmTimer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
+ /* Skip the Timer frequency verification check. Need to remove this later */
+ dmTimer.checkFrequency = false;
+
+ /* Match this to the SYS_CLK frequency sourcing the dmTimers.
+ * Not needed once the appropriate build target is used (Make sure
+ * SYS/BIOS family settings are updated */
+ dmTimer.intFreq.hi = 0;
+ dmTimer.intFreq.lo = 25000000;
+}else {
+ throw("ping_rpmsg_common.cfg: Did not match any platform!"
+ + " platform:" + Program.platformName + "cpuCore:"
+ + Program.cpu.attrs.cpuCore );
+}
+
+xdc.useModule('ti.ipc.ipcmgr.IpcMgr');
BIOS.addUserStartupFunction('&IpcMgr_rpmsgStartup');
xdc.loadPackage('ti.ipc.rpmsg');
xdc.useModule('ti.sysbios.xdcruntime.GateThreadSupport');
var GateSwi = xdc.useModule('ti.sysbios.gates.GateSwi');
-var Task = xdc.useModule('ti.sysbios.knl.Task');
-var params = new Task.Params;
-params.instance.name = "ping";
-params.arg0= 51;
-//params.arg0= 61;
-Program.global.tsk1 = Task.create('&pingTaskFxn', params);
-Task.deleteTerminatedTasks = true;
-
var Assert = xdc.useModule('xdc.runtime.Assert');
var Defaults = xdc.useModule('xdc.runtime.Defaults');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Text = xdc.useModule('xdc.runtime.Text');
Text.isLoaded = true;
var Registry = xdc.useModule('xdc.runtime.Registry');
+/*
Registry.common$.diags_INFO = Diags.ALWAYS_ON;
Registry.common$.diags_STATUS = Diags.ALWAYS_ON;
Registry.common$.diags_LIFECYCLE = Diags.ALWAYS_ON;
+*/
Diags.setMaskEnabled = true;
var Main = xdc.useModule('xdc.runtime.Main');