DSPRelated.com
Forums

Can't allocate .far vars in standalone mode

Started by gtg4...@mail.gatech.edu April 15, 2006
Hi,
I'm currently using the c6713 to do real time audio processing and I need to declare several long buffers. Each of the two buffers is about 100,000 samples long and I need to allocate them to SRAM instead of IRAM. I have been doing this with code composer by editing the .cdb file and changing the
Hi,
Sorry, my post to the forum got cut off for some reason. Here is my
full post:

I'm currently using the c6713 to do real time audio processing and I
need to declare several long buffers. Each of the two buffers is about
100,000 samples long and I need to allocate them to SRAM instead of
IRAM. I have been doing this with code composer by editing the .cdb file
and changing the "C variables section(.far)" from IRAM to SRAM.

This works fine when I download the code to the board using code
composter, but when I convert the .out file to hex and burn it to flash,
I get no output or functionality on the board. I'm making use of the
bootloader provided in the post.c example from the bsl tutorials. I'm
pretty sure the SRAM allocation is the problem because when I just
change the allocation back to IRAM, decrease the buffer size, and reburn
the file, it works perfectly. One of the requirements of our application
is that it runs in standalone mode, independant of a PC.

Does anyone know how to allocate SRAM properly when using a bootloading
program? Is this even possible on the c6713? Any help would be greatly
appreciated.

Thanks,
Jason Orlosky
Hi:
I don't know what all things have you tried, but have
you tried modifying it in the dsk6713.cmd file.
By changing the .far field from TRAM to SDRAM, i
guess, you could allocate them to SDRAM instead of
IRAM.
Do let me know whether you succeed in it.

Regards,
Gaurav

--- g...@mail.gatech.edu wrote:

> Hi,
> I'm currently using the c6713 to do real time
> audio processing and I need to declare several long
> buffers. Each of the two buffers is about 100,000
> samples long and I need to allocate them to SRAM
> instead of IRAM. I have been doing this with code
> composer by editing the .cdb file and changing the
>
> c...
>
>
>
__________________________________________________
Create a new sections in a command file, i.e. cmd file. This will have to
be your own command file, not the one that CCS creates. In the cmd file, do
something like this in the SECTIONS portion:

sdram_buffer0 :> SDRAM
sdram_buffer1 :> SDRAM
etc

Then in the code somewhere where you declare the buffers, use a pragma to
route them to the names you've created in the cmd file:

#pragma DATA_SECTION( huge_buffer0, "sdram_buffer0" );
#pragma DATA_SECTION( huge_buffer1, "sdram_buffer1" );
etc

Robert

> -----Original Message-----
> From: c... [mailto:c...] On
> Behalf Of g...@mail.gatech.edu
> Sent: Saturday, April 15, 2006 4:09 PM
> To: c...
> Subject: [c6x] Can't allocate .far vars in standalone mode
>
> Hi,
> I'm currently using the c6713 to do real time audio
> processing and I need to declare several long buffers. Each
> of the two buffers is about 100,000 samples long and I need
> to allocate them to SRAM instead of IRAM. I have been doing
> this with code composer by editing the .cdb file and changing the
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.4.2/314 - Release
> Date: 4/16/2006
>
>

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.2/314 - Release Date: 4/16/2006
Hi ,
I had the same problem.Did you try using pragma DATA_SECTION for allocation.
Let name of the buffer be Jason and its length be BUFFER_LENGTH :
#pragma DATA_SECTION(Jason,"SDRAM")
float Jason[BUFFER_LENGTH];

On 4/16/06, Jason O. wrote:
>
> Hi,
> Sorry, my post to the forum got cut off for some reason. Here is my
> full post:
>
> I'm currently using the c6713 to do real time audio processing and I
> need to declare several long buffers. Each of the two buffers is about
> 100,000 samples long and I need to allocate them to SRAM instead of
> IRAM. I have been doing this with code composer by editing the .cdb file
> and changing the "C variables section(.far)" from IRAM to SRAM.
>
> This works fine when I download the code to the board using code
> composter, but when I convert the .out file to hex and burn it to flash,
> I get no output or functionality on the board. I'm making use of the
> bootloader provided in the post.c example from the bsl tutorials. I'm
> pretty sure the SRAM allocation is the problem because when I just
> change the allocation back to IRAM, decrease the buffer size, and reburn
> the file, it works perfectly. One of the requirements of our application
> is that it runs in standalone mode, independant of a PC.
>
> Does anyone know how to allocate SRAM properly when using a bootloading
> program? Is this even possible on the c6713? Any help would be greatly
> appreciated.
>
> Thanks,
> Jason Orlosky
Hi,

Someone might have already solved your question, I had not checked
yahoo.

If your app works in CCS debug mode, and does not in standalone,
the most probable reason (except broken h/w) is EMIF settings.

You might want to check out contents of the EMIF registers and
appropriately set them in standalone mode after the processor was
out of the reset.

HTH,

Andrew

> From: "Jason O." g...@mail.gatech.edu
> Date: Sun Apr 16, 2006 9:10pm(PDT)
> Subject: Re: Can't allocate .far vars in standalone mode
>
> Hi,
> Sorry, my post to the forum got cut off for some reason. Here is my
> full post:
>
> I'm currently using the c6713 to do real time audio processing and I
> need to declare several long buffers. Each of the two buffers is about
> 100,000 samples long and I need to allocate them to SRAM instead of
> IRAM. I have been doing this with code composer by editing the .cdb file
> and changing the "C variables section(.far)" from IRAM to SRAM.
>
> This works fine when I download the code to the board using code
> composter, but when I convert the .out file to hex and burn it to flash,
> I get no output or functionality on the board. I'm making use of the
> bootloader provided in the post.c example from the bsl tutorials. I'm
> pretty sure the SRAM allocation is the problem because when I just
> change the allocation back to IRAM, decrease the buffer size, and reburn
> the file, it works perfectly. One of the requirements of our application
> is that it runs in standalone mode, independant of a PC.
>
> Does anyone know how to allocate SRAM properly when using a bootloading
> program? Is this even possible on the c6713? Any help would be greatly
> appreciated.
>
> Thanks,
> Jason Orlosky