summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d9c56e)
raw | patch | inline | side by side (parent: 8d9c56e)
author | Sam Nelson <sam.nelson@ti.com> | |
Fri, 26 May 2017 19:25:06 +0000 (15:25 -0400) | ||
committer | Sam Nelson <sam.nelson@ti.com> | |
Fri, 2 Jun 2017 02:04:56 +0000 (22:04 -0400) |
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
diff --git a/host_bios/simple_buffer_example/dsp/MainDsp.c b/host_bios/simple_buffer_example/dsp/MainDsp.c
index 19c75d5855718004032e676998b0f4f4c3a8944e..83202111c0b8e99e54ed4c4c7d56d91a162c26a9 100644 (file)
goto leave;
}
+ Log_print0(Diags_INFO, "DSP: Test Passed");
+
+#ifdef CONSOLE_PRINT
+ printf("\n DSP: Test Passed\n");
+#endif
/* finalize the server */
status = Server_delete();
Server_exit();
leave:
- Log_print1(Diags_INFO, "Server_taskFxn: <-- status=%d", (IArg)status);
if (status < 0)
- Log_print0(Diags_INFO, "\n DSP: Test Failed \n");
- else
- Log_print0(Diags_INFO, "\n DSP: Test Passed \n");
-
+ Log_print1(Diags_INFO, " DSP: Test Failed: %d", status);
#ifdef CONSOLE_PRINT
if (status < 0)
- printf("\n DSP: Test Failed \n");
- else
- printf("\n DSP: Test Passed \n");
+ printf("\n DSP: Test Failed: %d\n", status);
#endif
+ Log_print1(Diags_INFO, "Server_taskFxn: <-- status=%d", (IArg)status);
+
return;
}
diff --git a/host_bios/simple_buffer_example/dsp/Server.c b/host_bios/simple_buffer_example/dsp/Server.c
index 9705ad4f35ede6af30bca68e9da6f1d4945b037d..7f8ff85cd845360c00fec099b7d479ac37dcb7f6 100644 (file)
if (status < 0) {
goto leave;
}
+ Log_print1(Diags_ENTRY | Diags_INFO, "Message received...%d", msg->id);
switch (msg->cmd) {
case App_CMD_SHARED_REGION_INIT:
regionId = msg->regionId;
case App_CMD_BIGDATA:
#ifdef DEBUG
Log_print1(Diags_ENTRY | Diags_INFO, "msg->cmd=App_CMD_BIGDATA,msg->ptr=0x%x",
- (IArg)msg->u.bigDataBuffer.sharedPtr);
+ (IArg)msg->u.bigDataSharedDesc.sharedPtr);
#endif
/* Translate to local descriptor */
#ifdef DEBUG
/* print message from buffer */
Log_print1(Diags_INFO, " Received message %d", msg->id);
+ Log_print1(Diags_INFO, " Local Pointer 0x%x", (UInt32)bigDataLocalPtr);
Log_print0(Diags_INFO, " First 8 bytes: ");
for ( j = 0; j < 8 && j < bigDataLocalDesc.size/sizeof(uint32_t); j+=4)
Log_print4(Diags_INFO, "0x%x, 0x%x, 0x%x, 0x%x",
}
/* process the message */
- Log_print1(Diags_INFO, "Server_exec: processed cmd=0x%x", msg->cmd);
+ Log_print2(Diags_INFO, "Server_exec: processed id %d, cmd=0x%x", msg->id, msg->cmd);
/* send message back */
- queId = MessageQ_getReplyQueue(msg); /* type-cast not needed */
+ queId = MessageQ_getReplyQueue(msg);
MessageQ_put(queId, (MessageQ_Msg)msg);
} /* while (running) */
diff --git a/host_bios/simple_buffer_example/dsp/makefile b/host_bios/simple_buffer_example/dsp/makefile
index f927edecd613d963a4243a1acdff387296d35332..9388872e585ac75f7854cecf77599d85e63be9ac 100644 (file)
@$(ECHO) "# Making $@ ..."
$(CC) $(CPPFLAGS) $(CFLAGS) --output_file=$@ -fc $<
-%/compiler.opt: %/linker.cmd ;
-%/linker.cmd: Dsp.cfg ../shared/$(PLATFORM)/config.bld
+%/compiler.opt %/linker.cmd: Dsp.cfg ../shared/$(PLATFORM)/config.bld
@$(ECHO) "#"
@$(ECHO) "# Making $@ ..."
$(XDC_INSTALL_DIR)/xs --xdcpath="$(subst +,;,$(PKGPATH))" \
diff --git a/host_bios/simple_buffer_example/host/App.c b/host_bios/simple_buffer_example/host/App.c
index b6c302de23bd08c88ee07a1e4b25eb091a8526e1..f7afca5530a4bb1ca0c769bf5912ba157c98e3b6 100644 (file)
bigDataLocalPtr = (UInt32 *)bigDataLocalDesc.localPtr;
#ifdef DEBUG
/* print data from big data buffer */
- Log_print1(Diags_INFO, " Received back buffer %d", msg->id);
- Log_print0(Diags_INFO, " First 8 bytes: ");
+ Log_print1(Diags_INFO, " Received back buffer %d\n", msg->id);
+ Log_print0(Diags_INFO, " First 8 bytes: \n");
for ( j = 0; j < 8 && j < bigDataLocalDesc.size/sizeof(uint32_t); j+=4)
- Log_print4(Diags_INFO, "0x%x, 0x%x, 0x%x, 0x%x",
+ Log_print4(Diags_INFO, "0x%x, 0x%x, 0x%x, 0x%x\n",
bigDataLocalPtr[j], bigDataLocalPtr[j+1], bigDataLocalPtr[j+2], bigDataLocalPtr[j+3]);
- Log_print0(Diags_INFO, " Last 8 bytes: ");
+ Log_print0(Diags_INFO, " Last 8 bytes: \n");
for ( j = (bigDataLocalDesc.size/sizeof(uint32_t))-8 ;
j < bigDataLocalDesc.size/sizeof(uint32_t); j+=4)
- Log_print4(Diags_INFO, "0x%x, 0x%x, 0x%x, 0x%x",
+ Log_print4(Diags_INFO, "0x%x, 0x%x, 0x%x, 0x%x\n",
bigDataLocalPtr[j], bigDataLocalPtr[j+1], bigDataLocalPtr[j+2], bigDataLocalPtr[j+3]);
#endif
/* Check values to see expected results */
HeapMemMP_free(srHeap, bigDataLocalPtr, bigDataLocalDesc.size);
}
+ Log_print1(Diags_INFO, "App_exec: message received %d",
+ (IArg)msg->id);
+
/* free the message */
MessageQ_free((MessageQ_Msg)msg);
- Log_print1(Diags_INFO, "App_exec: message received, sending message %d",
+ Log_print1(Diags_INFO, "App_exec: Preparing message %d",
(IArg)i);
/* Receive messages: End =======================================> */
msg->id = i;
/* Allocate buffer from HeapMemMP */
- bigDataLocalPtr = (UInt32 *)(HeapMemMP_alloc(srHeap, BIGDATA_BUF_SIZE, BIGDATA_ALIGN));
+ bigDataLocalPtr = (UInt32 *)(HeapMemMP_alloc(srHeap, BIGDATA_BUF_SIZE, BIGDATA_BUF_ALIGN));
if (!bigDataLocalPtr) {
status = -1;
}
}
+ Log_print1(Diags_INFO, "App_exec: Sending message %d\n", i);
+
/* send message */
MessageQ_put(Module.slaveQue, (MessageQ_Msg)msg);
/* drain process pipeline */
for (i = 1; i <= 3; i++) {
- Log_print0(Diags_INFO, "App_exec: message received");
/* wait for return message */
status = MessageQ_get(Module.hostQue, (MessageQ_Msg *)&msg,
if (status < 0) {
goto leave;
}
+ Log_print1(Diags_INFO, "App_exec: message received: %d\n", msg->id);
/* extract message payload */
}
leave:
+ if (srHeap) {
+ HeapMemMP_delete(&srHeap);
+ }
/* Print error count if non-zero */
if (errorCount) {
Log_print1(Diags_INFO, "App_exec: Error Count %d", errorCount);