大家好:
我在跑DSPLINK的READWRITE的例程是,PROC_write报错0x80008013,然后我根据这篇文章(processors.wiki.ti.com/…/Writing_DSPLink_Application_using_PROC_read_and_write_APIs)修改了CFG_OMAP3530_SHMEM.c和dsplink-omap3530-base.tci加入了两段内存。但是运行仍然报之前的错误。我的配置如下:
——内存分配————-
# Start Addr Size Description
# ——————————————-
# 0x80000000 99 MB Linux
# 0x86300000 15 MB CMEM
# 0x87200000 13 MB CODEC SERVER
我没有用CODEC SERVER,所以想从第三部分分出两块内存用。
—–修改的CFG_OMAP3530_SHMEM.c部分——–
STATIC LINKCFG_MemEntry LINKCFG_memTable_00 [] =
{
{
RSTENTRYID, /* ENTRY : Entry number */
"RESETCTRL", /* NAME : Name of the memory region */
RESETCTRLADDR, /* ADDRPHYS : Physical address */
RESETCTRLADDR, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1u, /* ADDRGPPVIRT : GPP virtual address (if known) */
RESETCTRLSIZE, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE, /* SYNCD : Synchornized? */
},
{
CODEENTRYID, /* ENTRY : Entry number */
"DDR2", /* NAME : Name of the memory region */
CODEMEMORYADDR, /* ADDRPHYS : Physical address */
CODEMEMORYADDR, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1u, /* ADDRGPPVIRT : GPP virtual address (if known) */
CODEMEMORYSIZE, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE, /* SYNCD : Synchornized? */
},
{
SHAREDENTRYID0, /* ENTRY : Entry number */
"DSPLINKMEM", /* NAME : Name of the memory region */
SHAREDMEMORYADDR0, /* ADDRPHYS : Physical address */
SHAREDMEMORYADDR0, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1u, /* ADDRGPPVIRT : GPP virtual address (if known) */
SHAREDMEMORYSIZE0, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE, /* SYNCD : Synchornized? */
},
{
SHAREDENTRYID1, /* ENTRY : Entry number */
"DSPLINKMEM1", /* NAME : Name of the memory region */
SHAREDMEMORYADDR1, /* ADDRPHYS : Physical address */
SHAREDMEMORYADDR1, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1u, /* ADDRGPPVIRT : GPP virtual address (if known) */
SHAREDMEMORYSIZE1, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE, /* SYNCD : Synchornized? */
},
{
POOLENTRYID, /* ENTRY : Entry number */
"POOLMEM", /* NAME : Name of the memory region */
POOLMEMORYADDR, /* ADDRPHYS : Physical address */
POOLMEMORYADDR, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1u, /* ADDRGPPVIRT : GPP virtual address (if known) */
POOLMEMORYSIZE, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? Logically */
FALSE, /* SYNCD : Synchornized? */
},
{
5, /* ENTRY : Entry number */
"DSPIRAM", /* NAME : Name of the memory region */
0x5c7f8000, /* ADDRPHYS : Physical address */
0x107f8000, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address (if known) */
0x00018000, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE /* SYNCD : Synchornized? */
},
{
6, /* ENTRY : Entry number */
"DSPL1PRAM", /* NAME : Name of the memory region */
0x5cE00000, /* ADDRPHYS : Physical address */
0x10E00000, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address (if known) */
0x00008000, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE /* SYNCD : Synchornized? */
},
{
7, /* ENTRY : Entry number */
"DSPL1DRAM", /* NAME : Name of the memory region */
0x5cF04000, /* ADDRPHYS : Physical address */
0x10F04000, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address (if known) */
0x00014000, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE /* SYNCD : Synchornized? */
},
{
8, /* ENTRY : Entry number */
"L4_CORE", /* NAME : Name of the memory region */
0x48000000, /* ADDRPHYS : Physical address */
0x48000000, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address (if known) */
0x01000000, /* SIZE : Size of the memory region */
FALSE, /* SHARED : Shared access memory? */
FALSE /* SYNCD : Synchornized? */
},
{
9, /* ENTRY : Entry number */
"L4_PER", /* NAME : Name of the memory region */
0x49000000, /* ADDRPHYS : Physical address */
0x49000000, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address (if known) */
0x00100000, /* SIZE : Size of the memory region */
FALSE, /* SHARED : Shared access memory? */
FALSE /* SYNCD : Synchornized? */
},
{
10, /* ENTRY : Entry number */
"PROC_WRITE", /* NAME : Name of the memory region */
0x87200000, /* ADDRPHYS : Physical address */
0x87200000, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address (if known) */
0x00020000, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE /* SYNCD : Synchornized? */
}
{
10, /* ENTRY : Entry number */
"PROC_READ", /* NAME : Name of the memory region */
0x87220000, /* ADDRPHYS : Physical address */
0x87220000, /* ADDRDSPVIRT : DSP virtual address */
(Uint32) -1, /* ADDRGPPVIRT : GPP virtual address (if known) */
0x00020000, /* SIZE : Size of the memory region */
TRUE, /* SHARED : Shared access memory? */
FALSE /* SYNCD : Synchornized? */
}
} ;
—–修改的dsplink_omap3530_base.tci———-
/* ============================================================================
* PROC_WRITE MEMORY
* ============================================================================
*/
var WRITEMEM = prog.module("MEM").create("WRITEMEM");
WRITEMEM.base = 0x87200000;
WRITEMEM.len = 0x20000;
WRITEMEM.createHeap = false;
WRITEMEM.comment = "WRITEMEM"
/* ============================================================================
* PROC_READ MEMORY
* ============================================================================
*/
var READMEM = prog.module("MEM").create("READMEM");
READMEM.base = 0x87220000;
READMEM.len = 0x10000;
READMEM.createHeap = false;
READMEM.comment = "READMEM";
求大神指点
先谢过!
赵俊
Jun Zhao:
另外,我运行的参数如下:
./readwritegpp ./readwrite.out 2267021313 131072 10000 0
其中第二个2267021313 和 131072分别是0x87200000和0x20000转换成10进制