Forums

TI C6726 MEM_alloc ??segid??

Started by gie78 January 17, 2006
I am working with a TI C6727 DSP, CCS v3.1 and BIOS v5.2. I try to
allocate Memory with the help of MEM_alloc during running time. In the
BIOS API manual TI wrote the function needs a Segment ID (segid). But
what is the correct SegID of a memory section?

My functioncall looks like this:

void* p_ret;

p_ret = MEM_alloc(IRAM,512,1);

IRAM is a memorysection which I a had configured in the grafical
DSP/BIOS tool.

I always get a compiler- error similar to that message "undefined
Symbol IRAM". Could anybody help me.

Thanks Markus

gie78 wrote:
> I am working with a TI C6727 DSP, CCS v3.1 and BIOS v5.2. I try to > allocate Memory with the help of MEM_alloc during running time. In the > BIOS API manual TI wrote the function needs a Segment ID (segid). But > what is the correct SegID of a memory section? > > My functioncall looks like this: > > void* p_ret; > > p_ret = MEM_alloc(IRAM,512,1); > > IRAM is a memorysection which I a had configured in the grafical > DSP/BIOS tool. > > I always get a compiler- error similar to that message "undefined > Symbol IRAM". Could anybody help me. > > Thanks Markus
For some reason, the DSP/BIOS tool doesn't output the segment IDs in the header file it generates for you, but you can add them where necessary (or in a header file) like this: extern const Int SDRAM_HEAP; extern const Int IRAM_HEAP; Since the memory locations do exist in the code it generates, everything should link just fine. I'd suggest reporting this bug to TI via their website. The more complaints they get, the more likely they are to fix it. Cheers! --M
Thanks for the immediate reply. It works fine.
I found another manual about DSP/BIOS "SPRU423" with an small example.
But I think I will report it to TI, anyway.

Markus


mlimber schrieb:

> gie78 wrote: > > I am working with a TI C6727 DSP, CCS v3.1 and BIOS v5.2. I try to > > allocate Memory with the help of MEM_alloc during running time. In the > > BIOS API manual TI wrote the function needs a Segment ID (segid). But > > what is the correct SegID of a memory section? > > > > My functioncall looks like this: > > > > void* p_ret; > > > > p_ret = MEM_alloc(IRAM,512,1); > > > > IRAM is a memorysection which I a had configured in the grafical > > DSP/BIOS tool. > > > > I always get a compiler- error similar to that message "undefined > > Symbol IRAM". Could anybody help me. > > > > Thanks Markus > > For some reason, the DSP/BIOS tool doesn't output the segment IDs in > the header file it generates for you, but you can add them where > necessary (or in a header file) like this: > > extern const Int SDRAM_HEAP; > extern const Int IRAM_HEAP; > > Since the memory locations do exist in the code it generates, > everything should link just fine. I'd suggest reporting this bug to TI > via their website. The more complaints they get, the more likely they > are to fix it. > > Cheers! --M