I want to use the Shared_region of IPC module, and dynamical allocate Memory in the shared_region,as mentioned in the "IPC_Users_Guide.pdf 3.8.3 Using Memory in a Shared Region, PP3-45",but when I used the function memory_alloc() such as the previous email, I found the address and value of return pointer is not in the shared_region_0, that is the pointer is not point to certain address belong to the shared_region_0. When I assign another sharedregion as Shared_region_1 located in the DDR2 by .cfg file, the probem is similar.
The address can be found in the *.map files.
in the cfg file setup as below:
var sharedMem = 0x00200000;
var sharedMemSize = 0x00040000;
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: sharedMem,
len: sharedMemSize,
ownerProcId: 0,
isValid: true,
cacheLineSize: cacheLineSize,
createHeap: true,
name: "SHARED_RAM",
});
in the C file:
Ptr volatile buf;
#pragma DATA_SECTION(buf, "SHARED_RAM:SL2RAM");
buf = Memory_alloc((IHeap_Handle)SharedRegion_getHeap(0),10, 64, NULL);
So I think the buf address should locate in SHARED_RAM( 0x00200000-0x0023FFFF). and it should point to a address in SHARED_RAM.
but in the .Map file, I found the buf address(0x00240000) is out of SHARED_RAM,and when the code is running, it's value is not in the SHARED_RAM. ( the volatile is not Affect the results) .
In the .map file, SHARED_RAM address is different with the .CFG file.
ti.sdo.ipc.SharedRegion_0
* 0 00200000 00040000 NOLOAD SECTION
00200000 00040000 --HOLE--
SHARED_RAM
* 0 00240000 00000004 UNINITIALIZED
00240000 00000004 notify_multicore.obj (SHARED_RAM:SL2RAM)
Looking for your reply.
[ed for viewable format.]