Enable Examples Compilation with C++ Compiler Attempting to compile the examples and tests in Linux with the c++ compiler resulted in the following errors: In file included from MessageQApp.c:46:0: ../../../packages/ti/ipc/Ipc.h:148:22: error: ‘<anonymous>’ has incomplete type ../../../packages/ti/ipc/Ipc.h:148:26: error: invalid use of ‘Void {aka void}’ In file included from ../../../linux/include/_lad.h:50:0, from ../../../linux/include/ladclient.h:58, from LAD_client.c:48: ../../../linux/include/_GateMP.h:78:3: error: conflicting declaration 'typedef struct GateMP_Object GateMP_Object' In file included from ../../../linux/include/_lad.h:49:0, from ../../../linux/include/ladclient.h:58, from LAD_client.c:48: ../../../packages/ti/ipc/GateMP.h:222:16: error: 'struct GateMP_Object' has a previous declaration as 'struct GateMP_Object This patch fixes these compilation issues so that the Linux examples can be compiled with c++. Note that this patch does not have complete changes to allow IPC to be compiled using the c++ compiler, but only the examples. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix Linux GateMP bug by introducing new GateMP_attach(procId) API Previous to the introduction of Linux Ipc_attach() and NameServer_attach(), LAD would effectively "attach" to GateMP via NameServer_setup() and GateMP_setup(), all before opening the command FIFO and accepting commands from clients. This worked because NameServer_setup() had internal code that would perform the "attach" functionality, allowing GateMP_setup() to proceed. Now that NameServer_attach() has been introduced, NameServer_setup() no longer performs the "attach" functionality. But Ipc_start() now needs to call Ipc_attach() which, in turn, calls NameServer_attach(), but before doing so Ipc_start must connect and communicate with LAD. However, LAD gets stuck in the pre-FIFO GateMP_setup() since NameServer has not yet attached, which caused Ipc_start() to hang waiting to connect to LAD (since there was no command FIFO yet). In a nutshell, a deadlock. This is fixed by introducing GateMP_attach(procId), which is called by Ipc_attach(). GateMP_attach() performs the functionality that was getting stuck in GateMP_setup() (and GateMP_setup() is pared down to not need to "attach"). GateMP_detach(procId) is also introduced and called by Ipc_detach(). While these APIs can be called by the advanced user, they are considered to be "internal" APIs.
Linux: Tracing ease of use Allow end users to enable userspace tracing via an environment variable (IPC_DEBUG). Setting IPC_DEBUG=1 enables 'some' trace, setting IPC_DEBUG to 2 (or 3) enables more. This imitates a popular feature from Codec Engine, details here: http://processors.wiki.ti.com/index.php/CE_DEBUG
Linux: Added GateMP support for DRA7XX devices GateMP support has been added using the device's spinlocks. To enable GateMP on the host, throw -g option when launching the LAD daemon as follows: ./lad_dra7xx log.txt -g To enable GateMP on the slave core, the core must be configured as the owner of SR0 and GateMP.hostSupport config param must be set to 'true' as follows: var GateMP = xdc.useModule('ti.sdo.ipc.GateMP'); GateMP.hostSupport = true; The slave core with GateMP enabled must the loaded (remoteproc) prior to the execution of LAD on the host. This adds a restriction on LAD that wasn't previously there. Note: Initial validation has only been performed on DRA7XX DSP1.