
Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).
Hey Everyone
I need help regarding proper memory allocation of internal and external memory. The problem is
my code is too big. Its not fitting into the memory.
My MP/MC is 0, DROM is 1, OVLY is 1
Following is memory map in my GEL file:
GEL_MapAdd(0x80u,0,0x7F80u,1,1); /* DARAM */
GEL_MapAdd(0x08000u,0,0x8000u,1,1); /* External */ GEL_MapAdd(0x18000u,0,0x8000u,1,1); /*
DARAM */
GEL_MapAdd(0x28000u,0,0x8000u,1,1); /* SARAM */
GEL_MapAdd(0x38000u,0,0x8000u,1,1); /* SARAM */
GEL_MapAdd(0x0u,1,0x60u,1,1); /* MMRs */
GEL_MapAdd(0x60u,1,0x7FA0u,1,1); /* DARAM */
GEL_MapAdd(0x08000u,1,0x8000u,1,1); /* DARAM */
GEL_MapAdd(0x00000u,2,0x10000u,1,1);/* IO Space */
memory map in my cmd file is as follows:
/* MODULE MEM */
-stack 0x100
MEMORY {
PAGE 1: USERREGS: origin = 0x60, len = 0x1a
PAGE 1: BIOSREGS: origin = 0x7c, len = 0x4
PAGE 1: CSLREGS: origin = 0x7a, len = 0x2
PAGE 0: VECT: origin = 0x7f80, len = 0x80
PAGE 1: IDATA: origin = 0x80, len = 0x2f80
PAGE 0: IPROG: origin = 0x3000, len = 0x4f80
PAGE 0: SARAM03: origin = 0x28000, len = 0x8000
PAGE 1: DARAM47: origin = 0x18000, len = 0x8000
}
and its allocated as follows:
.bios:.norptb: {} > IPROG PAGE 0
frt: {} > IPROG PAGE 0
.text: {} > IPROG PAGE 0
.rtdx_text: {} > SARAM03 PAGE 0
.switch: {} > SARAM03 PAGE 0
.pinit: {} > SARAM03 PAGE 0
.cinit: {} > SARAM03 PAGE 0
.sysinit: {} > SARAM03 PAGE 0
.gblinit: {} > SARAM03 PAGE 0
.trcdata: {} > SARAM03 PAGE 0
.bios: {} > SARAM03 PAGE 0
I have set the heap size of IDATA as 0x0800. In my code I am using malloc() to assign
memory. after certain point it starts returning value 0 for malloc. That signifies there is no
memory left to allocate and I need to increase the heap size. But if i increase the heap size,
the memory allocation above gets disturbed and I start getting error. Can anyone suggest me a
better memory map, What all can I trasfer to external memory (SARAM or DARAM).
Kindly provide suggestions.
thanks
megha
______________________________
New Year Gift for Members of DSPRelated.com. Details here.Thanks Vandana
I figure out some way of allocating the memory. I allocated most of my code into external
memory. And its working that way with memory. But I will like to know about the visual linker.
i will definately learn about it.
Right now my problem is my code is working fine on the simulator. Its running without any
error, but I am not getting anything on the device. I am working on this acoustic model. I am
taking the audio signal input, processing it and getting that at output. My problem is I am not
getting anything on the output.
Do you have any idea abt this? If you do kindly reply.
Thanks again
Megha
vandana sao <v...@yahoo.co.in> wrote: hi
i suggest u to go try and use visual linker.it will give you more flexibility in allocating a
memory like using that u can put the some portion of .text section in SARAM03 and some in
SARAM47 which u cant do in cdb file or user .cmd file.its very easy to use as simple as drag
and drop.
so try this out.
vandana
megha daga <m...@yahoo.com> wrote:
Hey Everyone
I need help regarding proper memory allocation of internal and external memory. The problem is
my code is too big. Its not fitting into the memory.
My MP/MC is 0, DROM is 1, OVLY is 1
Following is memory map in my GEL file:
GEL_MapAdd(0x80u,0,0x7F80u,1,1); /* DARAM */ GEL_MapAdd(0x08000u,0,0x8000u,1,1); /* External */
GEL_MapAdd(0x18000u,0,0x8000u,1,1); /* DARAM */
GEL_MapAdd(0x28000u,0,0x8000u,1,1); /* SARAM */
GEL_MapAdd(0x38000u,0,0x8000u,1,1); /* SARAM */
GEL_MapAdd(0x0u,1,0x60u,1,1); /* MMRs */
GEL_MapAdd(0x60u,1,0x7FA0u,1,1); /* DARAM */
GEL_MapAdd(0x08000u,1,0x8000u,1,1); /* DARAM */
GEL_MapAdd(0x00000u,2,0x10000u,1,1);/* IO Space */
memory map in my cmd file is as follows:
/* MODULE MEM */
-stack 0x100
MEMORY {
PAGE 1: USERREGS: origin = 0x60, len = 0x1a
PAGE 1: BIOSREGS: origin = 0x7c, len = 0x4
PAGE 1: CSLREGS: origin = 0x7a, len = 0x2
PAGE 0: VECT: origin = 0x7f80, len = 0x80
PAGE 1: IDATA: origin = 0x80, len = 0x2f80
PAGE 0: IPROG: origin = 0x3000, len = 0x4f80
PAGE 0: SARAM03: origin = 0x28000, len = 0x8000
PAGE 1: DARAM47: origin = 0x18000, len = 0x8000
}
and its allocated as follows:
.bios:.norptb: {} > IPROG PAGE 0
frt: {} > IPROG PAGE 0
.text: {} > IPROG PAGE 0
.rtdx_text: {} > SARAM03 PAGE 0
.switch: {} > SARAM03 PAGE 0
.pinit: {} > SARAM03 PAGE 0
.cinit: {} > SARAM03 PAGE 0
.sysinit: {} > SARAM03 PAGE 0
.gblinit: {} > SARAM03 PAGE 0
.trcdata: {} > SARAM03 PAGE 0
.bios: {} > SARAM03 PAGE 0
I have set the heap size of IDATA as 0x0800. In my code I am using malloc() to assign memory.
after certain point it starts returning value 0 for malloc. That signifies there is no memory
left to allocate and I need to increase the heap size. But if i increase the heap size, the
memory allocation above gets disturbed and I start getting error. Can anyone suggest me a
better memory map, What all can I trasfer to external memory (SARAM or DARAM).
Kindly provide suggestions.
thanks
megha
______________________________
New Year Gift for Members of DSPRelated.com. Details here.