Hi all,
I changed the DSPLink memory map configuration to leverage all 512 MB on the Beagleboard-xM. Thanks to TI's guides I didn't have problem to do this. My application is split in two parts: ARM side and DSP side.
After an init phase, ARM loads an image (using opencv function) from the filesystem, then it sends a message (using MSGQ component), containing the Mat structure and loaded into CMEM region, to the DSP. Latter receives this message and process the image. Finally ARM saves the processed image.
To do this I used DSPLink (PROC, MSGQ and NOTIFY component), OpenCV (with a patch for alloc image into CMEM region) and CMEM module.
First time I executed the application I got an MMU Fault:
[ 919.511230] DSP MMU Error Fault! MMU_IRQSTATUS = [0x1]. Virtual DSP addr reference that generated the interrupt = [0x40829288].
The error takes place when DSP try to access to the CMEM shared region. To "solve" the problem I tried to disable the MMU and translate the virtual addresses in physical addresses before to send the message. If I disable the MMU all works fine and the image stored is perfectly and quickly processed.
Well, now I would correct this MMU error. I think the error is due to my lack during configuration of memory map. I read that using Codec Engine, it configures automatically the DSP Link tables, but I'm not using CE so I tried to modify again the CFG_OMAP3530_SHMEM.c adding an entry into LINKCFG_memTable_00.
{
CMEMID, /* ENTRY : Entry number */
"CMEM", /* NAME : Name of the memory region */
CMEMADDR, /* ADDRPHYS : Physical address */
CMEMADDR, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1u, /* ADDRGPPVIRT : GPP virtual address (if known) */
CMEMSIZE, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE, /* SYNCD : Synchornized? */
},
The corresponding addition into dsplink-omap3530-base.tci.
/* ============================================================================
* MEM : CMEM region
* ============================================================================
*/
var CMEM = prog.module("MEM").instance("CMEM");
CMEM.base = 0x90000000 ;
CMEM.len = 0x04000000;
CMEM.space = "cmem";
CMEM.createHeap = false;
CMEM.comment = "CMEM";
Now the problem is that during the DSP-side compilation I get an error form tconf (CCSv5 console):
**** Build of configuration Debug for project messagedsp ****
/home/giacomo/ccsv5/ccsv5/utils/bin/gmake -k all
Building file: ../DspBios/5.XX/OMAP3530/message.tcf
Invoking: TConf
"/home/giacomo/ccsv5/xdctools_3_23_03_53/tconf" -b -Dconfig.importPath="/home/giacomo/workspace_ccsv5/messagedsp/DspBios/5.XX/OMAP3530;/home/giacomo/workspace_ccsv5/messagedsp;/home/giacomo/ccsv5/bios_5_41_13_42/packages;/home/giacomo/ccsv5/bios_5_41_13_42/packages/ti/bios;/home/giacomo/TI/dsplink_linux_1_65_00_03/dsplink/dsp/inc/DspBios;/home/giacomo/TI/dsplink_linux_1_65_00_03/dsplink/dsp/inc/DspBios/5.XX/OMAP3530;/home/giacomo/TI/dsplink_linux_1_65_00_03/dsplink/dsp/inc/DspBios/5.XX;" "../DspBios/5.XX/OMAP3530/message.tcf"
js: TypeError: Cannot set property "base" of undefined to "2415919104"
gmake: *** [messagecfg.cmd] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
(P.S. I started all my work from DSPLink Message example.)
I hope someone can help me. Thanks