DSPRelated.com
Forums

How to allocate a buffer in SDRAM with compound linker command file or DSP/BIOS Configuration Tool

Started by fa_t...@yahoo.it September 19, 2007
Hi to all.
I am a student and I am trying to learn using DSP with th eDSKBoard 6713.
I have a problem when I declare an array ( buffer1 ) in SDRAM, i.e. in the section ‘ .my_section ‘.
What I have done is:

#pragma DATA_SECTION(buffer1,".my_section")
Int16 buffer1[500000];

Using DSP/BIOS, it creates a linker command file by default
( prova_6cfg.cmd ).
To add ‘ my_section ‘ in SDRAM, I should add a “compound linker command file”, that has to include at the first line (-l) and the original linker command file created by DSP/BIOS:

-l prova_6cfg.cmd

SECTIONS
{
.my_section > SDRAM
}

But, when I “Rebuild All” the project, I receive a lot of warnings and errors like as:
>> C:\Programmi\CCStudio_v3.1\MyProjects\Fab\prova_6_bis\prova_6cfg.cmd, line 81: warning:
multiple definitions of SECTION named '.vers'
>> C:\Programmi\CCStudio_v3.1\MyProjects\Fab\prova_6_bis\prova_6cfg.cmd, line 104: warning:
multiple definitions of SECTION named '.clk'
... ...
>> error: memory types IRAM and IRAM on page 0 overlap
>> error: memory types CACHE_L2 and CACHE_L2 on page 0 overlap
>> error: memory types SDRAM and SDRAM on page 0 overlap
... ...
Why there are multiple definitions and memory overlaps?
Another thing that I do not understand is the fact that when I delete the first line (-l prova_6cfg.cmd) of the compound linker command file, the program compiles and goes well, but only when it uses few memory resources. But, it should not be a conflict with 2 linker command files?
Then, when the program uses a lot of memory resources, it gives errors:
>> error: can't allocate .buffer1, size 001f3c00 (page 0) in SDRAM (avail:
00024c00)
>> error: errors in input - ./Debug/prova_6.out not built

Can someone help me to allocate a buffer in SDRAM (off-chip RAM) using the “compound linker command file” or better with the Configuration Tool of DSP/BIOS?

Thanks a lot in advance.

Best regards

Fab
fa_tn,

add YOUR linker command file to the project.
remove their linker command file from the project.
put ALL the necessary commands into YOUR linker command file.
(you might copy those commands from the IDE produced linker command file.)

(or maybe just put an empty MEMORY section in your linker command file.)

R. Williams

---------- Original Message -----------
From: f...@yahoo.it
To: c...
Sent: Wed, 19 Sep 2007 13:03:06 -0400
Subject: [c6x] How to allocate a buffer in SDRAM with compound linker command file or DSP/BIOS
Configuration Tool

> Hi to all.
> I am a student and I am trying to learn using DSP with th eDSKBoard 6713.
> I have a problem when I declare an array ( buffer1 ) in SDRAM, i.e. in the section ‘
> .my_section ‘. What I have done is:
>
> #pragma DATA_SECTION(buffer1,".my_section")
> Int16 buffer1[500000];
>
> Using DSP/BIOS, it creates a linker command file by default
> ( prova_6cfg.cmd ).
>
> To add ‘ my_section ‘ in SDRAM, I should add a “compound linker command file”,
> that has to include at the first line (-l) and the original linker command file created by
> DSP/BIOS:
>
> -l prova_6cfg.cmd
>
> SECTIONS
> {
> .my_section > SDRAM
> }
>
> But, when I “Rebuild All” the project, I receive a lot of warnings and errors like as:
>
> >> C:\Programmi\CCStudio_v3.1\MyProjects\Fab\prova_6_bis\prova_6cfg.cmd, line 81: warning:
> multiple definitions of SECTION named '.vers'
> >> C:\Programmi\CCStudio_v3.1\MyProjects\Fab\prova_6_bis\prova_6cfg.cmd, line 104: warning:
> multiple definitions of SECTION named '.clk'
> ... ...
> >> error: memory types IRAM and IRAM on page 0 overlap
> >> error: memory types CACHE_L2 and CACHE_L2 on page 0 overlap
> >> error: memory types SDRAM and SDRAM on page 0 overlap
> ... ...
>
> Why there are multiple definitions and memory overlaps?
> Another thing that I do not understand is the fact that when I delete the first line (-l
> prova_6cfg.cmd) of the compound linker command file, the program compiles and goes well,
> but only when it uses few memory resources. But, it should not be a conflict with 2 linker
> command files? Then, when the program uses a lot of memory resources, it gives errors:
>
> >> error: can't allocate .buffer1, size 001f3c00 (page 0) in SDRAM (avail:
> 00024c00)
> >> error: errors in input - ./Debug/prova_6.out not built
>
> Can someone help me to allocate a buffer in SDRAM (off-chip RAM) using the “compound
> linker command file” or better with the Configuration Tool of DSP/BIOS?
>
> Thanks a lot in advance.
>
> Best regards
>
> Fab
>