I have a set of programs for the C6678 that use IPC to pass data between a few cores. It runs on the single DSP evaluation board using a Windows host. Now I'm trying to get it to run on one of the DSPs on the Advantech quad board with a Linux host. This will be expanded to more cores and more DSPs once I get the basic code working.
I'm having trouble on the quad board and I'm not sure of the right approach to isolate the problem. Can someone give me some hints of what to try or where to look?
Here's the problem. The HeapBufMP_Create()/HeapBufMP_Open() and MessageQ_Create()/MessageQ_Open() functions seem to work correctly when MultiProc.numProcessors = 1. When there is more than one processor involved, however, then the following things break:
- The XXX_Open() function hangs (it never returns) instead of returning a negative value if the XXX_Create() function hasn't yet been called. I can work around this by hacking in Task_sleep() calls in the right places. That makes sure that the create functions are executed before the open functions.
- The XXX_Open() function always hangs if it is executed on a processor other than the processor that executed the XXX_Create() function. I don't have a work around for this. It's difficult to inspect the internal state of the IPC code to figure out why it is hanging. I have looked briefly at the ROV reports, but there wasn't anything obvious that stood out. I probably need to examine these more closely, or build IPC in Debug mode, or do something else that I haven't figured out yet.
Everything is internal to a single DSP because there is no external I/O other than System_printf(). So it's unlikely to be a problem with the Advantech board itself.
The Linux CCS install pulled in newest versions of all the packages. These are newer than the ones I used on the Windows host. This might be a problem, but I haven't had time to test that yet. I'm in the process of rebuilding the Windows environment on a new laptop so I'll try that when the laptop is ready.
Advantech supplied an old version (1.0.0.15) of the C6678 PDK patched to use with their board. It's possible that the old version is not compatible with the newer version of the IPC package, but I haven't had a chance to test that or ask Advantech about it. It doesn't generate any compile or link errors so I don't know if it's worth trying to figure out a patch for a newer PDK.
This seems like there's some kind of signalling problem between the processors. IPCworks on the evaluation board with a newer PDK, and it works with the demo programs supplied by Adventech. Maybe I should build the Adventech demo programs using the new versions of the packages and see if it still works.
There's a lot of different things I could try. Which would be more likely to work first?
Thanks,
Fred