Hi all:
In DSP/BIOS,I can alloc memory in desired address like this :
1: I create a memory by dspbios
2 write code:(float*) pInt=(float *)MEM_calloc(IRAM_HEAP, 1024*sizeof(float), 8);
Then I konw that i create a bufer which address is between 0x10002400 and (0x10002400+0x0003dc00) and bufsize is 1024*sizeof(float)
So I can alloc buf to ethier RAM or DDR.
But by SYSBIOS all I konw to create buf dynamically like this:
new a heapbuf
the IRAM_heap will be created in DDR because my Data Memory is DDR like bellow
if I change the data memory to IRAM ,the IRAM_heap wii be created in IRAM.
The problam is that it is impossible to set IRAM which is very small as Data Memory.I wana alloc a little data frequently used to IRAM whose speed is fast,the other datas are alloced in DDR,The DDR is setted as Data Memory,but how can I alloc heap in IRAM in this situation.
Thanks for your reply
You have the option Memory section in your heap instance properties. Specify the section name to be .myHeap or something else, and then in your CFG script use:
Program.sectMap[".myHeap"] = {loadSegment: "IRAM"};
This will ensure that the heap buffer is in IRAM, while you can still use DDR for other data sections.
If my reply answers your question please mark the thread as answered.