|
I resolved a "Bus error" recently in one
of the Codec Engine examples (examples/apps/speech/linuxonly). I can
tell you what I was doing wrong and my solution - perhaps it's similar
to your situation and can be solved similarly.
The example had declared data buffers as static global
arrays of UInt8's, like this:
static XDAS_Int8 inBuf[IFRAMESIZE];
When constructing a pointer to those buffers, it was
mis-aligned, and when these pointers were dereferenced, I got the "Bus Error"
crash.
I changed my code to malloc() the buffers rather than
create them statically; malloc() returns buffers appropriately
aligned.
[ For extra credit, I actually used Codec Engine's
Memory_contigAlloc() rather than malloc(). This provided buffers which
were not only aligned, but also non-cached and physically contiguous. In
this way, I could pass these buffers to "remote", DSP-side codecs.
]
I think you'll have to provide more details for us to
assist you further. I don't know what your particular use case
is.
Chris
|
_______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
