summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3f730ce)
raw | patch | inline | side by side (parent: 3f730ce)
author | Ramsey Harris <ramsey@ti.com> | |
Thu, 21 Mar 2013 21:59:02 +0000 (14:59 -0700) | ||
committer | Ramsey Harris <ramsey@ti.com> | |
Thu, 21 Mar 2013 22:48:53 +0000 (15:48 -0700) |
Using the shared memory allocator on QNX, we added pointers to the
test program. Ran on QNX between HOST and IPU. Made ti/ipc/mm a package.
test program. Ran on QNX between HOST and IPU. Made ti/ipc/mm a package.
14 files changed:
packages/ti/ipc/mm/MmRpc.c | patch | blob | history | |
packages/ti/ipc/mm/MmRpc.h | patch | blob | history | |
packages/ti/ipc/mm/MmServiceMgr.c | [new file with mode: 0644] | patch | blob |
packages/ti/ipc/mm/MmServiceMgr.h | [new file with mode: 0644] | patch | blob |
packages/ti/ipc/mm/package.bld | [new file with mode: 0644] | patch | blob |
packages/ti/ipc/mm/package.xdc | [new file with mode: 0644] | patch | blob |
packages/ti/ipc/mm/package.xs | [new file with mode: 0644] | patch | blob |
packages/ti/ipc/package.bld | patch | blob | history | |
packages/ti/ipc/tests/mmrpc_test.c | patch | blob | history | |
packages/ti/ipc/tests/rpc_task.c | patch | blob | history | |
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/common.mk | patch | blob | history | |
qnx/src/tests/mmrpc_test/arm/o.g.le.v7/Makefile | patch | blob | history | |
qnx/src/tests/mmrpc_test/arm/o.le.v7/Makefile | patch | blob | history | |
qnx/src/tests/mmrpc_test/common.mk | patch | blob | history |
index a240d54deac7143e23e2272c7fb506e32fb13022..52ba15d6ab0541210c17ddb1b65b5399d4db95f5 100644 (file)
/*
* ======== MmRpc_create ========
*/
-int MmRpc_create(const char *proc, const char *service,
- const MmRpc_Params *params, MmRpc_Handle *handlePtr)
+int MmRpc_create(const char *service, const MmRpc_Params *params,
+ MmRpc_Handle *handlePtr)
{
int status = MmRpc_S_SUCCESS;
MmRpc_Object * obj;
-
- printf("MmRpc_create: -->\n");
+ char cbuf[RPPC_MAX_INST_NAMELEN+16];
/* allocate the instance object */
obj = (MmRpc_Object *)calloc(1, sizeof(MmRpc_Object));
}
/* open the driver */
- printf("MmRpc_create: open driver\n");
- obj->fd = open("/dev/rpc_example", O_RDWR);
+ sprintf(cbuf, "/dev/%s", service);
+ obj->fd = open(cbuf, O_RDWR);
if (obj->fd < 0) {
printf("MmRpc_create: Error: open failed\n");
goto leave;
}
- strncpy(obj->connect.name, "rpc_example", (RPPC_MAX_INST_NAMELEN - 1));
+ strncpy(obj->connect.name, service, (RPPC_MAX_INST_NAMELEN - 1));
obj->connect.name[RPPC_MAX_INST_NAMELEN - 1] = '\0';
/* create a server instance, rebind its address to this file descriptor */
- printf("MmRpc_create: create server instance\n");
status = ioctl(obj->fd, RPPC_IOC_CREATE, &obj->connect);
if (status < 0) {
*handlePtr = (MmRpc_Handle)obj;
}
- printf("MmRpc_create: <--\n");
return(status);
}
int status = MmRpc_S_SUCCESS;
MmRpc_Object *obj;
- printf("MmRpc_delete: -->\n");
obj = (MmRpc_Object *)(*handlePtr);
/* close the device */
free((void *)(*handlePtr));
*handlePtr = NULL;
- printf("MmRpc_delete: <--\n");
return(status);
}
MmRpc_Object *obj = (MmRpc_Object *)handle;
struct rppc_function *rpfxn;
struct rppc_function_return reply_msg;
- MmRpc_Param *arg;
+ MmRpc_Param *param;
void *msg;
int len;
int i;
- printf("MmRpc_call: -->\n");
-
/* Combine function parameters and translation array into one contiguous
* message. TODO, modify driver to accept two separate buffers in order
* to eliminate this step. */
len = sizeof(struct rppc_function) +
- (ctx->num_translations * sizeof(struct rppc_param_translation));
+ (ctx->num_xlts * sizeof(struct rppc_param_translation));
msg = (void *)calloc(len, sizeof(char));
if (msg == NULL) {
goto leave;
}
- /* copy function arguments into message */
+ /* copy function parameters into message */
rpfxn = (struct rppc_function *)msg;
rpfxn->fxn_id = ctx->fxn_id;
rpfxn->num_params = ctx->num_params;
for (i = 0; i < ctx->num_params; i++) {
- arg = &ctx->params[i];
+ param = &ctx->params[i];
- switch (arg->type) {
- case MmRpc_ParamType_Atomic:
+ switch (param->type) {
+ case MmRpc_ParamType_Scalar:
rpfxn->params[i].type = RPPC_PARAM_TYPE_ATOMIC;
- rpfxn->params[i].size = arg->param.atomic.size;
- rpfxn->params[i].data = arg->param.atomic.data;
+ rpfxn->params[i].size = param->param.scalar.size;
+ rpfxn->params[i].data = param->param.scalar.data;
rpfxn->params[i].base = 0;
rpfxn->params[i].reserved = 0;
break;
case MmRpc_ParamType_Ptr:
rpfxn->params[i].type = RPPC_PARAM_TYPE_PTR;
- rpfxn->params[i].size = arg->param.ptr.size;
- rpfxn->params[i].data = arg->param.ptr.addr;
- rpfxn->params[i].base = arg->param.ptr.addr;
- rpfxn->params[i].reserved = arg->param.ptr.handle;
+ rpfxn->params[i].size = param->param.ptr.size;
+ rpfxn->params[i].data = param->param.ptr.addr;
+ rpfxn->params[i].base = param->param.ptr.addr;
+ rpfxn->params[i].reserved = param->param.ptr.handle;
break;
- case MmRpc_ParamType_PtrOffset:
+#if 0 /* TBD */
+ case MmRpc_ParamType_Elem:
rpfxn->params[i].type = RPPC_PARAM_TYPE_PTR;
- rpfxn->params[i].size = arg->param.ptrOffset.size;
- rpfxn->params[i].data = arg->param.ptrOffset.offset;
- rpfxn->params[i].base = arg->param.ptrOffset.base;
- rpfxn->params[i].reserved = arg->param.ptrOffset.handle;
+ rpfxn->params[i].size = param->param.elem.size;
+ rpfxn->params[i].data = param->param.elem.offset;
+ rpfxn->params[i].base = param->param.elem.base;
+ rpfxn->params[i].reserved = param->param.elem.handle;
+ break;
+#endif
+ default:
+ printf("MmRpc_call: Error: invalid parameter type\n");
+ status = MmRpc_E_INVALIDPARAM;
+ goto leave;
break;
}
}
/* copy offset array into message */
- for (i = 0; i < ctx->num_translations; i++) {
- rpfxn->translations[i].index = ctx->translations[i].index;
- rpfxn->translations[i].offset = ctx->translations[i].offset;
- rpfxn->translations[i].base = ctx->translations[i].base;
- rpfxn->translations[i].reserved = 0;
+ rpfxn->num_translations = ctx->num_xlts;
+
+ for (i = 0; i < ctx->num_xlts; i++) {
+ rpfxn->translations[i].index = ctx->xltAry[i].index;
+ rpfxn->translations[i].offset = ctx->xltAry[i].offset;
+ rpfxn->translations[i].base = ctx->xltAry[i].base;
+ rpfxn->translations[i].reserved = ctx->xltAry[i].handle;
}
/* send message for remote execution */
free(msg);
}
- printf("MmRpc_call: <-- status=%d\n", status);
return(status);
}
index 844246328da8ae242d743212ae245474969da137..f02026b7ecc4708e233d5ae0da57a7c2b1cb1938 100644 (file)
*/
#define MmRpc_E_FAIL (-1)
+/*!
+ * @brief Invalid parameter type
+ */
+#define MmRpc_E_INVALIDPARAM (-2)
+
/*!
* @brief Size of parameter array in function context structure
*/
-#define MmRpc_MAX_PARAMETERS (10)
+#define MmRpc_MAX_PARAMS (10)
/*!
* @brief Maximum size of translation array in function context structure
*/
#define MmRpc_MAX_TRANSLATIONS (1024)
+/*!
+ * @brief Macro for computing offset to a field of a structure.
+ *
+ * struct foobar {
+ * int a;
+ * int *p;
+ * };
+ *
+ * struct foobar *sp = ...;
+ * offset = MmRpc_OFFSET(sp, &sp->p);
+ * struct foobar st = ...;
+ * offset = MmRpc_OFFSET(&st, &st.p);
+ */
+#define MmRpc_OFFSET(base, field) ((unsigned int)(field)-(unsigned int)(base))
+
/*!
* @brief MmRpc_Handle type
*/
* @brief MmRpc_ParamType enum
*/
typedef enum {
- MmRpc_ParamType_Atomic = 1, /*!< atomic data type */
+ MmRpc_ParamType_Scalar = 1, /*!< pass by value */
MmRpc_ParamType_Ptr, /*!< data pointer */
- MmRpc_ParamType_PtrOffset /*!< pointer offset */
+ MmRpc_ParamType_Elem /*!< array element */
} MmRpc_ParamType;
/*!
union {
struct {
size_t size; /*!< size of the data */
- size_t data; /*!< atomic data */
- } atomic;
+ size_t data; /*!< data (pass by value)*/
+ } scalar;
struct {
- size_t size; /*!< size of the data */
+ size_t size; /*!< size of the data referenced */
size_t addr; /*!< pointer value */
size_t handle; /*!< memory allocator handle */
} ptr;
+#if 0 /* TBD */
struct {
- size_t size; /*!< size of the data */
- size_t offset; /*!< offset value */
- size_t base; /*!< base pointer value */
+ size_t size; /*!< size of the array element */
+ size_t offset; /*!< offset to current array element */
+ size_t base; /*!< base address of array */
size_t handle; /*!< memory allocator handle */
- } ptrOffset;
+ } elem;
+#endif
} param;
} MmRpc_Param;
uint32_t index; /*!< parameter index to base pointer */
ptrdiff_t offset; /*!< offset from the base address to pointer */
size_t base; /*!< user virtual address */
-} MmRpc_Txlt;
+ size_t handle; /*!< memory allocator handle */
+} MmRpc_Xlt;
/*!
* @brief Function call context structure
*/
typedef struct {
- uint32_t fxn_id; /*!< The function to call. */
- uint32_t num_params; /*!< Number of elements in param array. */
- MmRpc_Param params[MmRpc_MAX_PARAMETERS];
- /*!< The array of parameters */
- uint32_t num_translations;
- /*!< The number of translations needed
- * in the offsets array */
- MmRpc_Txlt *translations; /*!< array of translations */
+ uint32_t fxn_id; /*!< function id to call */
+ uint32_t num_params; /*!< number of parameters in params array */
+ MmRpc_Param params[MmRpc_MAX_PARAMS];
+ /*!< the array of parameters */
+ uint32_t num_xlts; /*!< number of translations in xltAry */
+ MmRpc_Xlt * xltAry; /*!< array of translations */
} MmRpc_FxnCtx;
/*!
* @brief Create an MmRpc instance
*
*/
-int MmRpc_create(const char *proc, const char *service,
- const MmRpc_Params *params, MmRpc_Handle *handlPtr);
+int MmRpc_create(const char *service, const MmRpc_Params *params,
+ MmRpc_Handle *handlPtr);
/*!
* @brief Delete an MmRpc instance
diff --git a/packages/ti/ipc/mm/MmServiceMgr.c b/packages/ti/ipc/mm/MmServiceMgr.c
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * 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.
+ */
+
+/*
+ * ======== MmServiceMgr.c ========
+ */
+
+#include <xdc/std.h>
+
+#include "MmServiceMgr.h"
+
+
+/*
+ * ======== MmRpc_register ========
+ */
+Int MmRpc_register(Void)
+{
+ Int status = MmServiceMgr_S_SUCCESS;
+ return(status);
+}
diff --git a/packages/ti/ipc/mm/MmServiceMgr.h b/packages/ti/ipc/mm/MmServiceMgr.h
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * 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.
+ */
+
+/** ============================================================================
+ * @file MmServiceMgr.h
+ *
+ * @brief Multi-Media Service Manager
+ *
+ * ============================================================================
+ */
+
+#ifndef ti_ipc_mm_MmServiceMgr__include
+#define ti_ipc_mm_MmServiceMgr__include
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+/*!
+ * @brief Operation is successful
+ */
+#define MmServiceMgr_S_SUCCESS (0)
+
+/*!
+ * @brief Operation failed
+ */
+#define MmServiceMgr_E_FAIL (-1)
+
+/*!
+ * @brief Register a new service
+ *
+ */
+Int MmServiceMgr_register(Void);
+
+
+#if defined (__cplusplus)
+}
+#endif
+#endif /* ti_ipc_mm_MmServiceMgr__include */
diff --git a/packages/ti/ipc/mm/package.bld b/packages/ti/ipc/mm/package.bld
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * 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.
+ */
+
+/*
+ * ======== package.bld ========
+ */
+
+/* explicit references to global objects */
+var Build = xdc.useModule('xdc.bld.BuildEnvironment');
+var Pkg = xdc.useModule('xdc.bld.PackageContents');
+
+/* add custom files to all releases */
+Pkg.attrs.exportSrc = true;
+Pkg.otherFiles = [
+ "package.bld",
+ "MmRpc.h",
+ "MmRpc.c",
+ "MmServiceMgr.h"
+];
+
+var srcs = [ "MmServiceMgr.c" ];
+
+/* clean lib folder */
+Pkg.generatedFiles.$add("lib/");
+
+for (var j = 0; j < Build.targets.length; j++) {
+ var targ = Build.targets[j];
+
+ for (var profile in targ.profiles) {
+
+ /* name = lib/profile/name.a+suffix */
+ var name = "lib/" + profile + "/ti_ipc_mm";
+
+ /* build the library */
+ var library = Pkg.addLibrary(name, targ, {profile: profile });
+
+ /* add the source files */
+ library.addObjects(srcs);
+ }
+}
diff --git a/packages/ti/ipc/mm/package.xdc b/packages/ti/ipc/mm/package.xdc
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * 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.
+ *
+ */
+
+/*
+ * ======== package.xdc ========
+ *
+ */
+
+package ti.ipc.mm [1,0,0] {
+};
diff --git a/packages/ti/ipc/mm/package.xs b/packages/ti/ipc/mm/package.xs
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * 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.
+ */
+
+/*
+ * ======== package.xs ========
+ *
+ */
+
+/*
+ * ======== getLibs ========
+ */
+function getLibs(prog)
+{
+ var suffix;
+ var file;
+ var libAry = [];
+ var profile = this.profile;
+
+ suffix = prog.build.target.findSuffix(this);
+ if (suffix == null) {
+ return(""); /* nothing to contribute */
+ }
+
+ /* make sure the library exists, else fallback to a built library */
+ file = "lib/" + profile + "/ti_ipc_mm.a" + suffix;
+ if (java.io.File(this.packageBase + file).exists()) {
+ libAry.push(file);
+ }
+ else {
+ file = "lib/release/ti_ipc_mm.a" + suffix;
+ if (java.io.File(this.packageBase + file).exists()) {
+ libAry.push(file);
+ }
+ 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;
+ }
+ }
+ }
+ }
+
+ return libAry.join(";");
+}
index a242103bf0f97f89a0d9ae9f031c2b2e3def822c..b00268ef1ad874fc40fe5919f6656020e2bc88bb 100644 (file)
"NameServer.h",
"Notify.h",
"SharedRegion.h",
- "package.bld",
- "mm/MmRpc.c",
- "mm/MmRpc.h"
+ "package.bld"
];
/* include source files in the release package */
index d606e1712cb2e313dcc5a012467fe621ab0ce5c7..d308f1d5b68adddc7af82ba73afe4e79f7bd7ab7 100644 (file)
#include <ti/ipc/mm/MmRpc.h>
+#if defined(SYSLINK_BUILDOS_QNX)
+#include <ti/shmemallocator/SharedMemoryAllocatorUsr.h>
+#endif
/*
* module 'Mx' functions
/* compute structure */
typedef struct {
uint32_t coef;
+ int key;
int size;
uint32_t * inBuf;
uint32_t * outBuf;
int32_t Mx_add(int32_t a, int32_t b);
int32_t Mx_compute(Mx_Compute *compute);
-MmRpc_Handle Mx_rpcDsp = NULL;
+MmRpc_Handle Mx_rpcIpu = NULL;
/* static function indicies */
#define Mx_Fxn_triple (0x80000000 | 1)
#define Mx_Fxn_add (0x80000000 | 2)
-#define Mx_Fxn_compute (0x80000000 | 3)
+#define Mx_Fxn_compute (0x80000000 | 5)
+#define Mx_OFFSET(base, member) ((uint_t)(member) - (uint_t)(base))
/*
* ======== main ========
int main(int argc, char **argv)
{
int status;
+ int i;
int32_t ret;
-// int i;
-// Mx_Compute *compute;
+ uint32_t val;
+ Mx_Compute *compute;
+#if defined(SYSLINK_BUILDOS_QNX)
+ shm_buf shmCompute, shmInBuf, shmOutBuf;
+#endif
printf("mmrpc_test: --> main\n");
goto leave;
}
-#if 0
/* allocate a compute structure in shared memory */
-// compute = ...;
+#if defined(SYSLINK_BUILDOS_QNX)
+ SHM_alloc(sizeof(Mx_Compute), &shmCompute);
+ compute = (Mx_Compute *)(shmCompute.vir_addr);
+#else
+ compute = NULL;
+#endif
+
+ if (compute == NULL) {
+ /* temporary: memory alloc not implemented on Linux */
+ goto leave;
+ }
+
+ /* initialize compute structure */
compute->coef = 0x80400000;
+ compute->key = 0xABA0;
compute->size = 0x1000;
+ compute->inBuf = NULL;
+ compute->outBuf = NULL;
/* allocate an input buffer in shared memory */
+#if defined(SYSLINK_BUILDOS_QNX)
+ SHM_alloc(compute->size * sizeof(uint32_t), &shmInBuf);
+ compute->inBuf = (uint32_t *)(shmInBuf.vir_addr);
+#else
// compute->inBuf = ...;
+#endif
+ if (compute->inBuf == NULL) {
+ printf("mmrpc_test: Error: inBuf == NULL\n");
+ status = -1;
+ goto leave;
+ }
+
+ /* fill input buffer with seed value */
for (i = 0; i < compute->size; i++) {
compute->inBuf[i] = 0x2010;
}
/* allocate an output buffer in shared memory */
+#if defined(SYSLINK_BUILDOS_QNX)
+ SHM_alloc(compute->size * sizeof(uint32_t), &shmOutBuf);
+ compute->outBuf = (uint32_t *)(shmOutBuf.vir_addr);
+#else
// compute->outBuf = ...;
+#endif
+
+ if (compute->outBuf == NULL) {
+ printf("mmrpc_test: Error: outBuf == NULL\n");
+ status = -1;
+ goto leave;
+ }
+
+ /* clear output buffer */
+ for (i = 0; i < compute->size; i++) {
+ compute->outBuf[i] = 0;
+ }
+
+ /* print some debug info */
+ printf("mmrpc_test: calling Mx_compute(0x%x)\n", (unsigned int)compute);
+ printf("mmrpc_test: compute->coef=0x%x\n", compute->coef);
+ printf("mmrpc_test: compute->key=0x%x\n", compute->key);
+ printf("mmrpc_test: compute->size=0x%x\n", compute->size);
+ printf("mmrpc_test: compute->inBuf=0x%x\n", (unsigned int)compute->inBuf);
+ printf("mmrpc_test: compute->outBuf=0x%x\n", (unsigned int)compute->outBuf);
/* process the buffer */
ret = Mx_compute(compute);
if (ret < 0) {
status = -1;
+ printf("mmrpc_test: Error: Mx_Compute() failed\n");
goto leave;
}
+ printf("mmrpc_test: after Mx_compute(0x%x)\n", (unsigned int)compute);
+ printf("mmrpc_test: compute->coef=0x%x\n", compute->coef);
+ printf("mmrpc_test: compute->key=0x%x\n", compute->key);
+ printf("mmrpc_test: compute->size=0x%x\n", compute->size);
+ printf("mmrpc_test: compute->inBuf=0x%x\n", (unsigned int)compute->inBuf);
+ printf("mmrpc_test: compute->outBuf=0x%x\n", (unsigned int)compute->outBuf);
+ printf("mmrpc_test: compute->inBuf[0]=0x%x\n",
+ (unsigned int)compute->inBuf[0]);
+ printf("mmrpc_test: compute->outBuf[0]=0x%x\n",
+ (unsigned int)compute->outBuf[0]);
+
+ /* check the output buffer */
+ for (i = 0; i < compute->size; i++) {
+ val = compute->outBuf[i] | compute->coef;
+ if (compute->outBuf[i] != val) {
+ status = -1;
+ printf("mmrpc_test: Error: incorrect outBuf\n");
+ break;
+ }
+ }
+
/* free resources */
-// free(compute->outBuf);
-// free(compute->inBuf);
-// free(compute);
+#if defined(SYSLINK_BUILDOS_QNX)
+ SHM_release(&shmOutBuf);
+ SHM_release(&shmInBuf);
+ SHM_release(&shmCompute);
+#else
+// ...
#endif
leave:
int Mx_initialize(void)
{
int status;
- MmRpc_Params params;
+ MmRpc_Params args;
/* create remote server insance */
- MmRpc_Params_init(¶ms);
+ MmRpc_Params_init(&args);
- status = MmRpc_create("DSP", "FooServer", ¶ms, &Mx_rpcDsp);
+ status = MmRpc_create("rpc_example", &args, &Mx_rpcIpu);
if (status < 0) {
printf("mmrpc_test: Error: MmRpc_create failed\n");
void Mx_finalize(void)
{
/* delete remote server instance */
- if (Mx_rpcDsp != NULL) {
- MmRpc_delete(&Mx_rpcDsp);
+ if (Mx_rpcIpu != NULL) {
+ MmRpc_delete(&Mx_rpcIpu);
}
}
fxnCtx->fxn_id = Mx_Fxn_triple;
fxnCtx->num_params = 1;
- fxnCtx->params[0].type = MmRpc_ParamType_Atomic;
- fxnCtx->params[0].param.atomic.size = sizeof(int);
- fxnCtx->params[0].param.atomic.data = a;
- fxnCtx->num_translations = 0;
+ fxnCtx->params[0].type = MmRpc_ParamType_Scalar;
+ fxnCtx->params[0].param.scalar.size = sizeof(int);
+ fxnCtx->params[0].param.scalar.data = a;
+ fxnCtx->num_xlts = 0;
+ fxnCtx->xltAry = NULL;
/* invoke the remote function call */
- status = MmRpc_call(Mx_rpcDsp, fxnCtx, &fxnRet);
+ status = MmRpc_call(Mx_rpcIpu, fxnCtx, &fxnRet);
if (status < 0) {
printf("mmrpc_test: Error: MmRpc_call failed\n");
fxnCtx->fxn_id = Mx_Fxn_add;
fxnCtx->num_params = 2;
- fxnCtx->params[0].type = MmRpc_ParamType_Atomic;
- fxnCtx->params[0].param.atomic.size = sizeof(int);
- fxnCtx->params[0].param.atomic.data = a;
- fxnCtx->params[1].type = MmRpc_ParamType_Atomic;
- fxnCtx->params[1].param.atomic.size = sizeof(int);
- fxnCtx->params[1].param.atomic.data = b;
- fxnCtx->num_translations = 0;
+ fxnCtx->params[0].type = MmRpc_ParamType_Scalar;
+ fxnCtx->params[0].param.scalar.size = sizeof(int);
+ fxnCtx->params[0].param.scalar.data = a;
+ fxnCtx->params[1].type = MmRpc_ParamType_Scalar;
+ fxnCtx->params[1].param.scalar.size = sizeof(int);
+ fxnCtx->params[1].param.scalar.data = b;
+ fxnCtx->num_xlts = 0;
/* invoke the remote function call */
- status = MmRpc_call(Mx_rpcDsp, fxnCtx, &fxnRet);
+ status = MmRpc_call(Mx_rpcIpu, fxnCtx, &fxnRet);
if (status < 0) {
printf("mmrpc_test: Error: MmRpc_call failed\n");
int32_t Mx_compute(Mx_Compute *compute)
{
MmRpc_FxnCtx *fxnCtx;
- MmRpc_Txlt tlxtTable[2];
+ MmRpc_Xlt xltAry[2];
int32_t fxnRet;
char send_buf[512] = {0};
int status;
fxnCtx->fxn_id = Mx_Fxn_compute;
fxnCtx->num_params = 1;
fxnCtx->params[0].type = MmRpc_ParamType_Ptr;
- fxnCtx->params[0].param.ptr.size = sizeof(void *);
+ fxnCtx->params[0].param.ptr.size = sizeof(Mx_Compute);
fxnCtx->params[0].param.ptr.addr = (size_t)compute;
+#if defined(SYSLINK_BUILDOS_QNX)
+ fxnCtx->params[0].param.ptr.handle = NULL;
+#else
// fxnCtx->params[0].param.ptr.handle = ...;
+#endif
- fxnCtx->num_translations = 2;
- fxnCtx->translations = tlxtTable;
+ fxnCtx->num_xlts = 2;
+ fxnCtx->xltAry = xltAry;
- fxnCtx->translations[0].index = 0;
- fxnCtx->translations[0].offset = 8;
- fxnCtx->translations[1].index = 0;
- fxnCtx->translations[1].offset = 12;
+ fxnCtx->xltAry[0].index = 0;
+ fxnCtx->xltAry[0].offset = MmRpc_OFFSET(compute, &compute->inBuf);
+ fxnCtx->xltAry[0].base = (size_t)(compute->inBuf);
+#if defined(SYSLINK_BUILDOS_QNX)
+ fxnCtx->xltAry[0].handle = NULL;
+#else
+// fxnCtx->xltAry[0].handle = ...;
+#endif
+
+ fxnCtx->xltAry[1].index = 0;
+ fxnCtx->xltAry[1].offset = MmRpc_OFFSET(compute, &compute->outBuf);
+ fxnCtx->xltAry[1].base = (size_t)(compute->outBuf);
+#if defined(SYSLINK_BUILDOS_QNX)
+ fxnCtx->xltAry[1].handle = NULL;
+#else
+// fxnCtx->xltAry[1].handle = ...;
+#endif
/* invoke the remote function call */
- status = MmRpc_call(Mx_rpcDsp, fxnCtx, &fxnRet);
+ status = MmRpc_call(Mx_rpcIpu, fxnCtx, &fxnRet);
if (status < 0) {
printf("mmrpc_test: Error: MmRpc_call failed\n");
index a137a3852f3a68d1c1b3eb234a50729cb2c845d3..8f82905cf22f49ae2f57842dbc6f8dc52e93691a 100644 (file)
#define RPC_MGR_PORT 59
-/* Legacy function to allow Linux side rpmsg sample tests to work: */
-extern void start_rpc_task();
-
-/*
- * OMX packet expected to have its data payload start with a payload of
- * this value. Need to export this properly in a meaningful header file on
- * both HLOS and RTOS sides
- */
-typedef enum {
- RPC_OMX_MAP_INFO_NONE = 0,
- RPC_OMX_MAP_INFO_ONE_BUF = 1,
- RPC_OMX_MAP_INFO_TWO_BUF = 2,
- RPC_OMX_MAP_INFO_THREE_BUF = 3,
- RPC_OMX_MAP_INFO_MAX = 0x7FFFFFFF
-} map_info_type;
-
-/*
- * ======== fxnTriple used by omx_benchmark test app ========
- */
-typedef struct {
- Int a;
-} FxnTripleArgs;
-
-typedef struct {
- Int a;
- Int b;
-} FxnAddArgs;
+void start_rpc_task(); /* bootstrap function */
typedef struct {
Int a;
typedef UInt32 OMX_HANDLETYPE;
-static Int32 RPC_SKEL_Init(Void *, UInt32 size, UInt32 *data);
+//static Int32 RPC_SKEL_Init(Void *, UInt32 size, UInt32 *data);
static Int32 RPC_SKEL_Init2(UInt32 size, UInt32 *data);
-static Int32 RPC_SKEL_SetParameter(UInt32 size, UInt32 *data);
-static Int32 RPC_SKEL_GetParameter(UInt32 size, UInt32 *data);
+//static Int32 RPC_SKEL_SetParameter(UInt32 size, UInt32 *data);
+//static Int32 RPC_SKEL_GetParameter(UInt32 size, UInt32 *data);
static Int32 fxnTriple(UInt32 size, UInt32 *data);
static Int32 fxnAdd(UInt32 size, UInt32 *data);
static Int32 fxnAdd3(UInt32 size, UInt32 *data);
static Int32 fxnAddX(UInt32 size, UInt32 *data);
+static Int32 fxnCompute(UInt32 size, UInt32 *data);
#if 0
/* RcmServer static function table */
};
#endif
-#define RPC_SVR_NUM_FXNS 5
+#define RPC_SVR_NUM_FXNS 6
OmapRpc_FuncDeclaration RPCServerFxns[RPC_SVR_NUM_FXNS] =
{
{ RPC_SKEL_Init2,
{
{OmapRpc_Direction_Out, OmapRpc_Param_S32, 1}, // return
{OmapRpc_Direction_In, OmapRpc_Param_U32, 1}
- },
- },
+ }
+ }
},
{ fxnAdd,
{ "fxnAdd", 3,
{OmapRpc_Direction_In, OmapRpc_PtrType(OmapRpc_Param_U32), 1}
}
}
+ },
+ { fxnCompute,
+ { "fxnCompute", 1,
+ {
+ {OmapRpc_Direction_Out, OmapRpc_Param_S32, 1}, // return
+ {OmapRpc_Direction_In, OmapRpc_PtrType(OmapRpc_Param_VOID), 1}
+ }
+ }
}
};
+#if 0
static Int32 RPC_SKEL_SetParameter(UInt32 size, UInt32 *data)
{
#if CHATTER
return(0);
}
+#endif
+#if 0
static Int32 RPC_SKEL_GetParameter(UInt32 size, UInt32 *data)
{
#if CHATTER
return(0);
}
+#endif
Void RPC_SKEL_SrvDelNotification()
{
#define PAYLOAD_SIZE sizeof(CALLBACK_DATA)
#define CALLBACK_DATA_SIZE (HDRSIZE + OMXPACKETSIZE + PAYLOAD_SIZE)
+#if 0
static Int32 RPC_SKEL_Init(Void *srvc, UInt32 size, UInt32 *data)
{
char cComponentName[128] = {0};
return(0);
}
+#endif
static Int32 RPC_SKEL_Init2(UInt32 size, UInt32 *data)
{
{
struct OmapRpc_Parameter *payload = (struct OmapRpc_Parameter *)data;
Int a;
+ Int32 result;
a = (Int)payload[0].data;
+ result = a * 3;
#if CHATTER
- System_printf("fxnTriple: a=%d\n", a);
+ System_printf("fxnTriple: a=%d, result=%d\n", a, result);
#endif
- return(a * 3);
+ return(result);
}
/*
{
struct OmapRpc_Parameter *payload = (struct OmapRpc_Parameter *)data;
Int a, b;
+ Int32 result;
a = (Int)payload[0].data;
b = (Int)payload[1].data;
+ result = a + b;
+
+#if CHATTER
+ System_printf("fxnAdd: a=%d, b=%d, result=%d\n", a, b, result);
+#endif
+
+ return(result);
+}
+
+/*
+ * ======== fxnCompute ========
+ */
+Int32 fxnCompute(UInt32 size, UInt32 *data)
+{
+ typedef struct {
+ uint32_t coef;
+ int key;
+ int size;
+ uint32_t * inBuf;
+ uint32_t * outBuf;
+ } Mx_Compute;
+
+ struct OmapRpc_Parameter *payload;
+ Mx_Compute *compute;
+ Int32 result = 0;
+ Int i;
+
+ payload = (struct OmapRpc_Parameter *)data;
+ compute = (Mx_Compute *)payload[0].data;
+ Cache_inv(compute, sizeof(Mx_Compute), Cache_Type_ALL, TRUE);
+
#if CHATTER
- System_printf("fxnAdd: a=%d, b=%d\n", a, b);
+ System_printf("fxnCompute: compute=0x%x\n", compute);
+ System_printf("fxnCompute: compute size=%d\n", (Int)payload[0].size);
+ System_printf("fxnCompute: coef=0x%x\n", compute->coef);
+ System_printf("fxnCompute: key=0x%x\n", compute->key);
+ System_printf("fxnCompute: size=0x%x\n", compute->size);
+ System_printf("fxnCompute: inBuf=0x%x\n", compute->inBuf);
+ System_printf("fxnCompute: outBuf=0x%x\n", compute->outBuf);
#endif
- return(a + b);
+ Cache_inv(compute->inBuf, compute->size * sizeof(uint32_t),
+ Cache_Type_ALL, TRUE);
+ Cache_inv(compute->outBuf, compute->size * sizeof(uint32_t),
+ Cache_Type_ALL, TRUE);
+
+ for (i = 0; i < compute->size; i++) {
+ compute->outBuf[i] = compute->coef | compute->inBuf[i];
+ }
+
+ Cache_wbInv(compute->outBuf, compute->size * sizeof(uint32_t),
+ Cache_Type_ALL, TRUE);
+
+ return(result);
}
/*
return(sum);
}
-Void start_rpc_task()
+/*
+ * ======== start_rpc_task ========
+ */
+void start_rpc_task(void)
{
/* Init service manager */
System_printf("%s initializing OMAPRPC based service manager endpoint\n",
diff --git a/qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/common.mk b/qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/common.mk
index 58b8836a6123aebfdea5acf16d96c71ca1b9f58c..401797dc3f17b272a3a5503f6ed6674875da34bb 100644 (file)
SYSLINK_BUILDOS = Qnx
#Add extra include path
-EXTRA_INCVPATH+=$(SYSLINK_ROOT) \
- $(SYSLINK_ROOT)/ti/syslink/inc \
- $(SYSLINK_ROOT)/ti/syslink/inc/usr/$(SYSLINK_BUILDOS) \
- $(SYSLINK_ROOT)/ti/syslink/inc/usr \
- $(SYSLINK_ROOT)/ti/syslink/inc/$(SYSLINK_BUILDOS)
-
-EXTRA_SRCVPATH+=$(PROJECT_ROOT)/$(SYSLINK_BUILDOS) \
- $(PROJECT_ROOT)/..
-
-CCOPTS+=-g -O0 -DSYSLINK_BUILDOS_QNX
+EXTRA_INCVPATH += $(SYSLINK_ROOT) \
+ $(SYSLINK_ROOT)/ti/syslink/inc \
+ $(SYSLINK_ROOT)/ti/syslink/inc/usr/$(SYSLINK_BUILDOS) \
+ $(SYSLINK_ROOT)/ti/syslink/inc/usr \
+ $(SYSLINK_ROOT)/ti/syslink/inc/$(SYSLINK_BUILDOS) \
+ $(IPC_REPO)/qnx/src/ipc3x_dev/sharedmemallocator/usr/public \
+ $(IPC_REPO)/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/public
+
+EXTRA_SRCVPATH += \
+ $(PROJECT_ROOT)/$(SYSLINK_BUILDOS) \
+ $(PROJECT_ROOT)/..
+
+CCOPTS += -g -O0 -DSYSLINK_BUILDOS_QNX
include $(MKFILES_ROOT)/qtargets.mk
diff --git a/qnx/src/tests/mmrpc_test/arm/o.g.le.v7/Makefile b/qnx/src/tests/mmrpc_test/arm/o.g.le.v7/Makefile
index 542a111ebee587fce41d05eae5da48f1c20f17dc..f25c646a19479027c400c5a0eb4172fe53e874d4 100644 (file)
include ../../common.mk
$(PROJECT_ROOT)/arm/o.g.le.v7/mmrpc_test_g: $(IPC_REPO)/qnx/src/mm/arm/a.g.le.v7/libmmrpc_g.a
+$(PROJECT_ROOT)/arm/o.g.le.v7/mmrpc_test_g: $(IPC_REPO)/qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/so.le.v7/libsharedmemallocatorS.a
# link with syslink static library, dynamic for others
LIBPREF_mmrpc_g = -Bstatic
LIBPOST_mmrpc_g = -Bdynamic
+LIBPREF_sharedmemallocatorS = -Bstatic
+LIBPOST_sharedmemallocatorS = -Bdynamic
# add libpath and libs
-EXTRA_LIBVPATH += $(IPC_REPO)/qnx/src/mm/arm/a.g.le.v7
-LIBS += mmrpc_g
+EXTRA_LIBVPATH += \
+ $(IPC_REPO)/qnx/src/mm/arm/a.g.le.v7 \
+ $(IPC_REPO)/qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/so.le.v7
-# copy and rename executables to suit our preferences (TODO: where do we copy the executables)
-#POST_BUILD = \
-# $(CP_HOST) \
-# $(PROJECT_ROOT)/arm/o.g.le.v7/MessageQApp_g \
-# $(PROJECT_ROOT)/../bin/debug/MessageQApp
+LIBS += mmrpc_g
+LIBS += sharedmemallocatorS
diff --git a/qnx/src/tests/mmrpc_test/arm/o.le.v7/Makefile b/qnx/src/tests/mmrpc_test/arm/o.le.v7/Makefile
index 35797d880bec4ebd413f468cc3d8218ab5c93b6d..793a437c29d57d6e121fefa73734f00ad4243457 100644 (file)
CCFLAGS += -O3
$(PROJECT_ROOT)/arm/o.le.v7/mmrpc_test: $(IPC_REPO)/qnx/src/mm/arm/a.le.v7/libmmrpc.a
+$(PROJECT_ROOT)/arm/o.g.le.v7/mmrpc_test_g: $(IPC_REPO)/qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/so.le.v7/libsharedmemallocatorS.a
# link with syslink static library, dynamic for others
LIBPREF_mmrpc = -Bstatic
LIBPOST_mmrpc = -Bdynamic
+LIBPREF_sharedmemallocatorS = -Bstatic
+LIBPOST_sharedmemallocatorS = -Bdynamic
# add libpath and libs
-EXTRA_LIBVPATH += $(IPC_REPO)/qnx/src/mm/arm/a.le.v7
-LIBS += mmrpc
+EXTRA_LIBVPATH += \
+ $(IPC_REPO)/qnx/src/mm/arm/a.le.v7 \
+ $(IPC_REPO)/qnx/src/ipc3x_dev/sharedmemallocator/usr/arm/so.le.v7
-# copy and rename executables to suit our preferences (TODO: where do we copy the executables)
-#POST_BUILD = \
-# $(CP_HOST) \
-# $(PROJECT_ROOT)/arm/o.le.v7/MessageQApp \
-# $(PROJECT_ROOT)/../bin/debug/MessageQApp
+LIBS += mmrpc
+LIBS += sharedmemallocatorS
index 007b57e9736900acfa790fd1c74d03ecba485f51..ab9ed8c84fd4c0edfb439b35aeb1c5ad4f03428e 100644 (file)
PINFO DESCRIPTION=MmRpc test program
endef
-# don't install the binaries, they are copied in base makefile
-#INSTALLDIR = bin/tests
-INSTALLDIR = /dev/null
+INSTALLDIR = bin/tests
CCOPTS += -DSYSLINK_BUILDOS_QNX
# include path
EXTRA_INCVPATH += \
- $(IPC_REPO)/packages
+ $(IPC_REPO)/packages \
+ $(IPC_REPO)/qnx/src/ipc3x_dev/sharedmemallocator/usr/public \
+ $(IPC_REPO)/qnx/src/ipc3x_dev/sharedmemallocator/resmgr/public
include $(MKFILES_ROOT)/qtargets.mk