From 23c1a5b95c9a272cc7ad3d90f7dc53f804799da8 Mon Sep 17 00:00:00 2001 From: Ramsey Harris Date: Tue, 9 Apr 2013 14:31:49 -0700 Subject: [PATCH] Added missing package dependencies. --- packages/ti/ipc/family/omap54xx/VirtQueue.c | 1 - packages/ti/ipc/family/omap54xx/VirtQueue.h | 2 + packages/ti/ipc/family/omap54xx/package.xs | 22 +++++++++- packages/ti/ipc/ipcmgr/package.xdc | 9 ++-- packages/ti/ipc/rpmsg/RPMessage.c | 2 - packages/ti/ipc/rpmsg/package.xs | 41 ++++++++++++++++++- .../ti/ipc/transports/TransportRpmsgSetup.xs | 3 +- packages/ti/pm/package.xs | 6 +++ packages/ti/sdo/ipc/Build.xs | 6 ++- packages/ti/srvmgr/omaprpc/package.xs | 9 ++++ 10 files changed, 88 insertions(+), 13 deletions(-) diff --git a/packages/ti/ipc/family/omap54xx/VirtQueue.c b/packages/ti/ipc/family/omap54xx/VirtQueue.c index dce2e68..2ed8ffd 100644 --- a/packages/ti/ipc/family/omap54xx/VirtQueue.c +++ b/packages/ti/ipc/family/omap54xx/VirtQueue.c @@ -61,7 +61,6 @@ #include #include -#include #include #include #include diff --git a/packages/ti/ipc/family/omap54xx/VirtQueue.h b/packages/ti/ipc/family/omap54xx/VirtQueue.h index 5ee1439..1d74a04 100644 --- a/packages/ti/ipc/family/omap54xx/VirtQueue.h +++ b/packages/ti/ipc/family/omap54xx/VirtQueue.h @@ -88,6 +88,8 @@ #ifndef ti_ipc_family_omap54xx_VirtQueue__include #define ti_ipc_family_omap54xx_VirtQueue__include +#include + #if defined (__cplusplus) extern "C" { #endif diff --git a/packages/ti/ipc/family/omap54xx/package.xs b/packages/ti/ipc/family/omap54xx/package.xs index ab25cba..5ab1c20 100644 --- a/packages/ti/ipc/family/omap54xx/package.xs +++ b/packages/ti/ipc/family/omap54xx/package.xs @@ -40,11 +40,17 @@ */ 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."); + } +} diff --git a/packages/ti/ipc/ipcmgr/package.xdc b/packages/ti/ipc/ipcmgr/package.xdc index 6ac2c56..fc9657e 100644 --- a/packages/ti/ipc/ipcmgr/package.xdc +++ b/packages/ti/ipc/ipcmgr/package.xdc @@ -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; } diff --git a/packages/ti/ipc/rpmsg/RPMessage.c b/packages/ti/ipc/rpmsg/RPMessage.c index bc6b91f..978c858 100644 --- a/packages/ti/ipc/rpmsg/RPMessage.c +++ b/packages/ti/ipc/rpmsg/RPMessage.c @@ -78,10 +78,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/packages/ti/ipc/rpmsg/package.xs b/packages/ti/ipc/rpmsg/package.xs index 726594d..b28b4ba 100644 --- a/packages/ti/ipc/rpmsg/package.xs +++ b/packages/ti/ipc/rpmsg/package.xs @@ -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"; } diff --git a/packages/ti/ipc/transports/TransportRpmsgSetup.xs b/packages/ti/ipc/transports/TransportRpmsgSetup.xs index 5902084..7adac0d 100644 --- a/packages/ti/ipc/transports/TransportRpmsgSetup.xs +++ b/packages/ti/ipc/transports/TransportRpmsgSetup.xs @@ -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"); } diff --git a/packages/ti/pm/package.xs b/packages/ti/pm/package.xs index 1f4a569..5dd0790 100644 --- a/packages/ti/pm/package.xs +++ b/packages/ti/pm/package.xs @@ -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'); } /* diff --git a/packages/ti/sdo/ipc/Build.xs b/packages/ti/sdo/ipc/Build.xs index a1a3c83..0d6a19c 100644 --- a/packages/ti/sdo/ipc/Build.xs +++ b/packages/ti/sdo/ipc/Build.xs @@ -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)) { diff --git a/packages/ti/srvmgr/omaprpc/package.xs b/packages/ti/srvmgr/omaprpc/package.xs index afba537..e3e29ee 100644 --- a/packages/ti/srvmgr/omaprpc/package.xs +++ b/packages/ti/srvmgr/omaprpc/package.xs @@ -35,6 +35,15 @@ * */ +/* + * ======== close ======== + */ +function close() +{ + xdc.loadPackage('ti.ipc.rpmsg'); + xdc.loadPackage('ti.srvmgr'); +} + /* * ======== getLibs ======== */ -- 2.39.2