Other Parts Discussed in Thread: SYSBIOS, BEAGLEBOARD-X15
Tool/software: TI-RTOS
Hi Champs
My customer is using the AM5728 and running ti rtos on the DSP's. What they are trying to do is memory_alloc when they try to get 1GB it returns null. But if they request 1GB-128B then it works. Why would it fail for the 1GB? Below is more details as to how they partition their memory. Any info or why this does not work would be great.
Yes, we are using Linux on the ARM side, but we are NOT using MMU on the DSP side.
Our DSP approach is straight-forward and very similar to our traditional and discretely targeted DSP’s on previous products such as DM647_8 and C665x devices in regards to HEAP and memory allocation.
The board being targeted has a AM572x device being configured with 2 GiB of DDR with base address of 0x8000 0000 extending through 0xFFFF FFFF.
The DSP HEAP being defined and in question here starts at address 0xC000 0000 with size/length of 0x4000 0000.
Basically, this memory region is defined within RTSC Target Platform for AM57xx/DRA7xx of size 1 GiB (0x4000 0000) with starting address 0xC000 0000 and length 0x4000 0000. Additionally, the build configuration (.cfg) statically defines a HEAP of size 0x4000 0000 at memory region starting at 0xC000 0000
var heapMem3Params = new HeapMem.Params();
heapMem3Params.instance.name = "CAPTURE_HEAP";
heapMem3Params.size = 0x40000000;
heapMem3Params.align = 128;
heapMem3Params.minBlockAlign = 128;
heapMem3Params.sectionName = "DDR3_CAPTURE";
heapMem3Params.buf = 0xC0000000;
Program.global.CAPTURE_HEAP = HeapMem.create(heapMem3Params);
Here’s call to Memory_alloc() failing with NULL being returned…
Ptr pCaptureBuffer = NULL;
Error_Block eb;
pCaptureBuffer = Memory_alloc(CAPTURE_HEAP,0x40000000, 128,&eb);
/* This return NULL Ptr */
Here’s call to Memory_alloc() succeeding with non-NULL pointer being returned…
Ptr pCaptureBuffer = NULL;
Error_Block eb;
pCaptureBuffer = Memory_alloc(CAPTURE_HEAP,0x3FFFFF80, 128,&eb);
/* This returns non-NULL Ptr, i.e. 0xC0000000 */
Thanks
Regards
Mohsen