This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am trying to allocate memory on dsp through Memory_alloc() function. This work is based on codec engine in DM3730, which is modified from the videnc_copy example. I made some changes in the (.tcf) file as follows:
bios.setMemDataHeapSections (prog, bios.DDRALGHEAP);
bios.MEM.MALLOCSEG = bios.DDRALGHEAP;
(the default setup is
bios.setMemDataHeapSections (prog, bios.DDR2);
bios.MEM.MALLOCSEG = bios.DDR2;
)
and also in the .cfg file, change is made as follows:
DSKT2.ALLOW_EXTERNAL_SCRATCH = true;
(the default setup is false)
And then in the videnc_copy.c file, i coded :
Memory_AllocParams allocParams;
allocParams.type = Memory_CONTIGPOOL;
allocParams.flags = Memory_NONCACHED;
allocParams.align = 128;
allocParams.seg = 0;
tempBuf2 = (XDAS_UInt8 *)Memory_alloc( minSamples, &allocParams);
I can build the files well. But the run result is wrong. FT_trace print the result
shows that the memory request failed.
How can i copy with this problem?
thks in advance!
F.H. Sun
Hi Feihu,
Could you try to allocate a smaller piece of memory for test purpose only. If not succeed look the following links:
http://omappedia.org/images/4/4e/SysLink_Programming_Guide_2_0.pdf
Should be helpful to post the whole log with the error message for further investigation.
Also you can duplicate your post to the RTOS E2E forum at the link:
http://e2e.ti.com/support/embedded/tirtos/f/355.aspx
because the subject of the issue is related to the OS but less to the processor.
BR
Tsvetolin Shulev
Hi Tsvetolin,
thks for your reply.
I am just trying to solve this problem following your advice and other materials.
I tried to use malloc function after i changed the setup as described above. i found the
function malloc can work well, though the malloc function is not allowed in XDAS. but i still
do not know how to use Memory_alloc function.
thks again and best regards.
F.H. Sun