Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Ads

Discussion Groups

Discussion Groups | TMS320C54x | Problem with memory alignment for DSPLIB

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

Problem with memory alignment for DSPLIB - Markus Bühren - Jun 17 15:56:00 2003



Hi!

I want to use the fir function of the dsplib on a DSK5416 and have a
question about circular buffers and memory alignment. As far as I
know it is possible to do it this way:

1. Use some "#pragma DATA_SECTION" command in the C++ code.

2. Use some "align (N)" stuff in the linker command file.

I am using DSP/BIOS in my project and the DSP/BIOS configuration tool
maintains the linker command file called <projectname>cfg.cmd itself.
So I do not have to care about the very low level details of memory.

If I want to use the fir function now following the steps mentioned
above, I have to use a different linker command file that is no
longer automatically changed by the DSP/BIOS configuration tool. But
this means I have to care about memory things now!

Isn't there an easier way to go without leaving C++?

I would appreciate any advise or comments of those who also work with
the dsplib! Thanks in advance!

Markus






(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: Problem with memory alignment for DSPLIB - chunyan_lcy - Jun 18 0:12:00 2003

Just add a customized .cmd file into your project besides the
automatically generated one. For example, your project name is p1,
after using BIOS configuration tools, p1cfg.cmd is automatically
generated, and in which a block of memory called ALIGN_DATA is
configured. If you want to put the aligned buffer into section
ALIGN_DATA, you should add a customized cmd file as following(i.e.
named link.cmd) to your project:

//////////////////////////////////////
-lp1cfg.cmd

SECTIONS {
align_buffer:{
*(align_buffer)
} > ALIGN_DATA , align(128)
}
/////////////////////////////////////

Of course, you have to define section "align_buffer" in your C using
#pragma

-Chunyan

--- In , Markus Bühren <markus.buehren@l...>
wrote:
> Hi!
>
> I want to use the fir function of the dsplib on a DSK5416 and have
a
> question about circular buffers and memory alignment. As far as I
> know it is possible to do it this way:
>
> 1. Use some "#pragma DATA_SECTION" command in the C++ code.
>
> 2. Use some "align (N)" stuff in the linker command file.
>
> I am using DSP/BIOS in my project and the DSP/BIOS configuration
tool
> maintains the linker command file called <projectname>cfg.cmd
itself.
> So I do not have to care about the very low level details of
memory.
>
> If I want to use the fir function now following the steps
mentioned
> above, I have to use a different linker command file that is no
> longer automatically changed by the DSP/BIOS configuration tool.
But
> this means I have to care about memory things now!
>
> Isn't there an easier way to go without leaving C++?
>
> I would appreciate any advise or comments of those who also work
with
> the dsplib! Thanks in advance!
>
> Markus




(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )