DSPRelated.com
Forums

how to use MEM_alloc without opening a DSP/BISO Config !

Started by shia_son October 24, 2003
MEM_alloc(SEG0, BUFSIZE, 0);
i dont want to open DSP/BISO Config to specify the SEG0
is there any other way !!



Hi ..

You could use MEM_define to allocate your address. I use 0x80030000
which is SDRAM address. You could L2 addres if you want just change
this address. #include <c6x.h>
#include <mem.h>

void main()
{
void *new_addr;
Int seg_id;

seg_id=MEM_define((Ptr)0x80030000,0x4B000,NULL);
new_addr=MEM_alloc(seg_id,mem_length,0);
} --- In , "shia_son" <shia_son@y...> wrote:
> MEM_alloc(SEG0, BUFSIZE, 0);
> i dont want to open DSP/BISO Config to specify the SEG0
> is there any other way !!



hi again
i did what you suggest and i got this error :

undefined first referenced
symbol in file
--------- ----------------
_MEM_define C:\ti\myprojects\Loop_store\Loop_store.obj

>> error: symbol referencing errors - Loop_store.out not built

how can this be solved ? :( regards,,
--- In , "Henrry Andrian" <henrry@r...> wrote:
> Hi ..
>
> You could use MEM_define to allocate your address. I use 0x80030000
> which is SDRAM address. You could L2 addres if you want just change
> this address. > #include <c6x.h>
> #include <mem.h>
>
> void main()
> {
> void *new_addr;
> Int seg_id;
>
> seg_id=MEM_define((Ptr)0x80030000,0x4B000,NULL);
> new_addr=MEM_alloc(seg_id,mem_length,0);
> } > --- In , "shia_son" <shia_son@y...> wrote:
> > MEM_alloc(SEG0, BUFSIZE, 0);
> > i dont want to open DSP/BISO Config to specify the SEG0
> > is there any other way !!



--- In , "shia_son" <shia_son@y...> wrote:
> hi again
> i did what you suggest and i got this error :
>
> undefined first referenced
> symbol in file
> --------- ----------------
> _MEM_define C:\ti\myprojects\Loop_store\Loop_store.obj
>
> >> error: symbol referencing errors - Loop_store.out not built
>
> how can this be solved ? :( > regards,,

Its look like that your project didnt include *.cmd file. Currently
I am using DSP/BIOS cmd configuration so I didnt have problem with
cmd configuration. Myabe you could create one cmd configuration
fisrt, and try to implement below code and I think it will be no
problem cause I have try it. #include "config1cfg.h" --> It should be your DSP/BIOS header file
#include <csl.h>
#include <c6x.h>
#include <mem.h>

void main()
{
void *new_addr;
Int seg_id;
Uns mem_length;

mem_length 0;
seg_id=MEM_define((Ptr)0x80030000,0x4B000,NULL);
new_addr=MEM_alloc(seg_id,mem_length,0);
while(1);

}

Good Luck

Best Regards,

Henrry