Sign in

Not a member? | Forgot your Password?

Search motoroladsp

Search tips

Find us on Facebook!





Subscribe to motoroladsp

Search tips

Free PDF Downloads

A Quadrature Signals Tutorial: Complex, But Not Complicated

Understanding the 'Phasing Method' of Single Sideband Demodulation

Complex Digital Signal Processing in Telecommunications

Introduction to Sound Processing

C++ Tutorial

Introduction of C Programming for DSP Applications

Fixed-Point Arithmetic: An Introduction

Cascaded Integrator-Comb (CIC) Filter Introduction

Discussion Groups

FFT Spectral Analysis Software

See Also

Embedded SystemsFPGA

Discussion Groups | Freescale DSPs | AW: 56F826 - placing large constant data array in Program Flash


Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread



Is this thread worth a thumbs up?

0

AW: 56F826 - placing large constant data array in Program Flash - Bende Georg - Jun 10 6:42:00 2003

First, you need to edit the linker_flash.cmd file, in order to create a section
in the pflash memory.
I do it like this: (56f803)
.pflash (RX) : ORIGIN = 0x0000, LENGTH = 0x6D00 # program flash memory
.pConst (RWX) : ORIGIN = 0x6D00, LENGTH = 0x1100 # constant fields

(the original was
.pflash (RX) : ORIGIN = 0x0000, LENGTH = 0x7E00 # program flash memory
)

If you select "Write constant data to .rodata section" in the CW5/FLASH settings
- Code Generation - M56800 Processor, then your constants will be placed
automatically in a section called ".rodata". Your fields need to be defined as
constants!
You have to place your .rodata section in the above created pConst section:

.pconst_data:
{
* (.rodata)
} > .pConst

Now you only need to gain access to your data, which cannot be done directly
from C. U need a snippet of assembly code:

UWord16 asm read_p_memory (int * addr)
{
move p:(r2)+,y0
rts
}

And then you will be able to access the data like
read_p_memory((int*)&int_field[index]); Best wishes,

Georg Bende
Softwareentwickler
Abteilung Elektronik
Dr. Fritz Faulhaber GmbH & Co KG
Daimlerstr. 23
71101 Schönaich
Tel: +49 7031 638294

> -----Ursprüngliche Nachricht-----
> Von: bmbmz123 [mailto:]
> Gesendet: Montag, 9. Juni 2003 16:37
> An:
> Betreff: [motoroladsp] 56F826 - placing large constant data array in
> Program Flash
>
> Hello all,
>
> I am using large constant data array tables.
> The const data extends beyond the 2k flash available in the data
> section.
> It may even extend beyond the 4k RAM available.
>
> I want to place the arrays in Program Flash, and read the data during
> runtime.
> An access using array-index is prferrable.
>
> Any suggestion?
>
> 10x
>
> bz >
>
> _____________________________________
> /groups.php3