DSPRelated.com
Forums

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

Started by Jeff Brower September 24, 2007
Fab-

Thanks for documenting your solution, that's helpful for the group. Yep, Richard is
pretty good.

-Jeff
f...@yahoo.it wrote:
>
> 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
> >
> > Hi to all.
>
> The problem is resolved and I explain how for all beginners (like me)...
>
> First, I have added the C code:
>
> #pragma DATA_SECTION(buffer1,".my_section")
> Int16 buffer1[500000];
>
> Then, I have added to my project my linker command file with 'my_section':
>
> SECTIONS
> {
> .text > IRAM
> .far > IRAM
> ...
> .cio > IRAM
> .my_section > SDRAM
> }
>
> Then:
>
> 1. open the *.cdb file
> 2. MEM - Memory Section manager
> 3. Properties
> 4. Compiler Sections
> 5. Select User .cmd File...
> 6. Save *.cdb file e Rebuild
>
> I must thank Richard Williams for his aid!
>
> Bye
>
> Fab