DSPRelated.com
Forums

variable initialization in SDRAM

Started by ps_zeung February 5, 2004
Hi,

I have a problem to initialize variables defined in SDRAM.
The SDRAM could be accessed by verifying that the values in SDRAM
can be altered by typing any value on the memory window.
However, it is not successful to initialize the data array via
following
description but I can write the values in the internal memory to
SDRAM and read it back.

static section ("seg_bank0")
fract16 coefs[NUM_TAPS]={
#include "coefs.dat"
};

where "seg_bank0" is defined in SDRAM.

Furthermore, I also tried to use ".byte" directive to declare and
initialize the
data objects. Unfortunately, it doesn't work for the external memory.

.section seg_bank0;

.align 1;
_coefs:
.global _coefs;
.type _coefs,STT_OBJECT;
.byte = 0x57,0xFF,0x12,0xFD,0x62,0x0C,0x35,0x37,0x35,0x37,0x62,0x0C;
.byte = 0x12,0xFD,0x57,0xFF;
._coefs.end:
.align 1;

I don't know why the initialization could be implemented by
using "#include" or ".byte " for internal memeory but not for the
external memory.
Did I miss something should be noted?

Look foraward to your response and thank you in advance.