Reply by Estevam Fabio-R49496●May 26, 20042004-05-26
Hi Robert,
I am using CW6.0 and the array that I declared as const is properly allocated
in
X Flash memory (starting in X:0x1800 for the 56F826).
For example:
const int a[6]={1,2,3,4,5,6};
int main(void)
{ ....
This is the disassembly code:
*** INITIALIZED DATA (.rodata) ***
0x00000000: 01 00 02 00 03 00 04 00 05 00 06 00 '............'
(Note that it is displaying the values as little, but this was fixed to show
big-endian in version 6.1)
Make sure that in Settings/Code Generation/M56800 Processor you selected
"Write
constant data to .rodata section".
Best regards,
Fabio Estevam
-----Original Message-----
From: Robert Imhoff [mailto:]
Sent: domingo, 23 de maio de 2004 03:44
To:
Subject: [motoroladsp] allocating variables in data rom
Hello
I wonder if someone could give me a hint about the most efficient way
to allocate variables in data flash on a DSP56800E using Codewarrior.
The goal is to have a larger chunk (e.g. a struct) of some rarely
changing parameters remain persistent in data flash where they would be
read-only in normal use, and not get overwritten at reboot.
Declaring them as CONST looks like it would have them re-initialized by
the start-up code ...
Many thanks!
Robert
_____________________________________
Note: If you do a simple "reply" with your email client, only the
author of this
message will receive your answer. You need to do a "reply all" if you
want your
answer to be distributed to the entire group.
_____________________________________
About this discussion group:
We have regions of FLASH that we only write to with explicit
"config"
commands. We access it with pointers-to-structs, or
pointers-to-arrays-of-words, so the linker cmd file never locates variables
there.
However, we usually copy from that area into RAM variables at boot time and
after re-configuring, so we're not space-efficient. This is unnecessary.
Rick Corey
-----Original Message-----
From: Robert Imhoff [mailto:]
Sent: Sunday, May 23, 2004 2:44 AM
To:
Subject: [motoroladsp] allocating variables in data rom
Hello
I wonder if someone could give me a hint about the most efficient way
to allocate variables in data flash on a DSP56800E using Codewarrior.
The goal is to have a larger chunk (e.g. a struct) of some rarely
changing parameters remain persistent in data flash where they would be
read-only in normal use, and not get overwritten at reboot.
Declaring them as CONST looks like it would have them re-initialized by
the start-up code ...
Many thanks!
Robert
_____________________________________
Note: If you do a simple "reply" with your email client, only the
author of
this message will receive your answer. You need to do a "reply all" if
you
want your answer to be distributed to the entire group.
_____________________________________
About this discussion group:
I wonder if someone could give me a hint about the most efficient way
to allocate variables in data flash on a DSP56800E using Codewarrior.
The goal is to have a larger chunk (e.g. a struct) of some rarely
changing parameters remain persistent in data flash where they would be
read-only in normal use, and not get overwritten at reboot.
Declaring them as CONST looks like it would have them re-initialized by
the start-up code ...