Try to use this one as linker.cmd:
You should create, in your project, a file called appconst.c.
Into this file you can put all the constants you want to allocate into
the data flash memory.
Good luck!
P.S. I'm using a CodeWarrior older version than your: 4.5
# Linker.cmd file for DSP56807EVM
# using internal data memory only ( EX = 0, Boot Mode 0A )
#*************************************************
******************************
.HardwareAndWatchdogResetVector :
{
# Vectors for Reset and One must be mapped to Boot Flash to be
programmed
# correctly since this area is shaddowed between 0x000-0x0003
and
# 0xF800-0xF803
# vectorreset.c (.text)
} > .pBootFlash
.ApplicationInterruptVector :
{
vector.c (.text)
} > .pInterruptVector
#*************************************************
******************************
.ApplicationCode :
{
# Place all code into Program Flash
} > .pFlash
#*************************************************
******************************
.InitializedDataForProgramRAM : AT (ADDR(.pFlash) + 1 +
SIZEOF(.pFlash) / 2)
{
# Define variables for C initialization code of Program RAM data
--- In motoroladsp@moto..., Charlie W <charliewtx@y...> wrote: > If i remember correctly. In your codewarrior
> stationery, there is a file called constant.c that was
> created by codewarrior is used to store constant in
> data flash.
>
> --- christian.epp@g... wrote:
>
> > Hi all
> >
> > On Friday 17 June 2005 01:52, Michael W. Mann wrote:
> >
> > > You can use data flash to store constants in flash
> > instead of data
> > > RAM. This can be done with a properly constructed
> > linker command
> >
> > Hmmm. I tried that last week! Didnt't work! (OK, I
> > have to admit, I use really
> > old Codewarrior for Motorola DSP56800 version 5.0.5)
> >
> > I tried "const data to .rodata section"-swich and
> > declared data "const". Added
> > * (.rodata) for the my .x.flash section -> linker
> > puts it in .data section
> > in X-RAM.
> >
> > I tried the OBJECT (data,file) directive in the
> > linker command file to put the
> > data in .x.flash memory-> linker puts it in .data
> > section in X-RAM.
> >
> > I tried lots of other things -> linker puts it in
> > .data section in X-RAM. He
> > really knowns what he wants. But he doesnt't know
> > what I want him to want :-)
> >
> > I even tried to use the X-FLASH as copy source for
> > initialized data (with the
> > AT() directive) -> even that didn't work. The
> > Motorola guys probably had a
> > reason to put the initialized data mirror in the
> > P-FLASH and copy it from
> > there (in their SDK).
> >
> > I must admit, I am not up to date with my
> > development suit. Is this a known
> > bug of the old linker ? Anyone heard of that ?
> >
> > Christian
> >
> >
> >
> >
> >
> >
> >
> > motoroladsp-unsubscribe@moto...
> >
> >
> >
> >
>
>
>
> __________________________________
>
Reply by Litinas, Terry●July 12, 20052005-07-12
Christian,
I use CodeWarrior 5.1.1 and have been able to place constants in 56F807 data
flash using the #pragmas define_section and section. Below is an example.
Hope this helps.
Terry Litinas
/***************************************************************************
*************************************/
/* Store these error code lookup tables in data flash */
#pragma define_section xFlash ".constants.data" RW
#pragma section xFlash end
/***************************************************************************
*************************************/
If i remember correctly. In your codewarrior
stationery, there is a file called constant.c that was
created by codewarrior is used to store constant in
data flash.
--- christian.epp@chri... wrote:
> Hi all
>
> On Friday 17 June 2005 01:52, Michael W. Mann wrote:
>
> > You can use data flash to store constants in flash
> instead of data
> > RAM. This can be done with a properly constructed
> linker command
>
> Hmmm. I tried that last week! Didnt't work! (OK, I
> have to admit, I use really
> old Codewarrior for Motorola DSP56800 version 5.0.5)
>
> I tried "const data to .rodata section"-swich and
> declared data "const". Added
> * (.rodata) for the my .x.flash section -> linker
> puts it in .data section
> in X-RAM.
>
> I tried the OBJECT (data,file) directive in the
> linker command file to put the
> data in .x.flash memory-> linker puts it in .data
> section in X-RAM.
>
> I tried lots of other things -> linker puts it in
> .data section in X-RAM. He
> really knowns what he wants. But he doesnt't know
> what I want him to want :-)
>
> I even tried to use the X-FLASH as copy source for
> initialized data (with the
> AT() directive) -> even that didn't work. The
> Motorola guys probably had a
> reason to put the initialized data mirror in the
> P-FLASH and copy it from
> there (in their SDK).
>
> I must admit, I am not up to date with my
> development suit. Is this a known
> bug of the old linker ? Anyone heard of that ?
>
> Christian
Reply by Charlie W●July 2, 20052005-07-02
If i remember correctly. In your codewarrior
stationery, there is a file called constant.c that was
created by codewarrior is used to store constant in
data flash.
--- christian.epp@chri... wrote:
> Hi all
>
> On Friday 17 June 2005 01:52, Michael W. Mann wrote:
>
> > You can use data flash to store constants in flash
> instead of data
> > RAM. This can be done with a properly constructed
> linker command
>
> Hmmm. I tried that last week! Didnt't work! (OK, I
> have to admit, I use really
> old Codewarrior for Motorola DSP56800 version 5.0.5)
>
> I tried "const data to .rodata section"-swich and
> declared data "const". Added
> * (.rodata) for the my .x.flash section -> linker
> puts it in .data section
> in X-RAM.
>
> I tried the OBJECT (data,file) directive in the
> linker command file to put the
> data in .x.flash memory-> linker puts it in .data
> section in X-RAM.
>
> I tried lots of other things -> linker puts it in
> .data section in X-RAM. He
> really knowns what he wants. But he doesnt't know
> what I want him to want :-)
>
> I even tried to use the X-FLASH as copy source for
> initialized data (with the
> AT() directive) -> even that didn't work. The
> Motorola guys probably had a
> reason to put the initialized data mirror in the
> P-FLASH and copy it from
> there (in their SDK).
>
> I must admit, I am not up to date with my
> development suit. Is this a known
> bug of the old linker ? Anyone heard of that ?
>
> Christian
>
>
> motoroladsp-unsubscribe@moto...
__________________________________
Reply by Yochum, William●June 17, 20052005-06-17
Christian,
I'm using CodeWarrior 4.1. We had the same problem.
The (.rodata) section wasn't supported.
My solution was a bit of a kludge. I created a special linker
section that explicitly listed all files that contained constant data.
Any files appearing in the ".constants" section, now take
initialized
data and treat it as a data flash constant. But be careful because
this places a special burden on the program files to PREVENT use of
initialized variables unless those variables are treated as constants!
William C. Yochum Microwave Data Systems Inc.
Principal Eng./Software 175 Science Parkway
Phone: (585) 242-8319 Rochester, NY 14620
FAX: (585) 241-5590 USA
> -----Original Message-----
> From: christian.epp@chri... [mailto:christian.epp@chri...]
> Sent: Friday, June 17, 2005 2:32 AM
> To: motoroladsp@moto...
> Subject: Re: [motoroladsp] Re: how to use data_flash of dsp56f807 ?
> Hi all
>
> On Friday 17 June 2005 01:52, Michael W. Mann wrote:
>
> > You can use data flash to store constants in flash instead of data
> > RAM. This can be done with a properly constructed linker command
>
> Hmmm. I tried that last week! Didnt't work! (OK, I have to
> admit, I use really
> old Codewarrior for Motorola DSP56800 version 5.0.5)
>
> I tried "const data to .rodata section"-swich and declared
> data "const". Added
> * (.rodata) for the my .x.flash section -> linker puts it in
> .data section
> in X-RAM.
>
> I tried the OBJECT (data,file) directive in the linker
> command file to put the
> data in .x.flash memory-> linker puts it in .data section in X-RAM.
>
> I tried lots of other things -> linker puts it in .data
> section in X-RAM. He
> really knowns what he wants. But he doesnt't know what I want
> him to want :-)
>
> I even tried to use the X-FLASH as copy source for
> initialized data (with the
> AT() directive) -> even that didn't work. The Motorola guys
> probably had a
> reason to put the initialized data mirror in the P-FLASH and
> copy it from
> there (in their SDK).
>
> I must admit, I am not up to date with my development suit.
> Is this a known
> bug of the old linker ? Anyone heard of that ?
>
> Christian
The information contained in this message is confidential and intended only
for use of the designated recipient(s) named above. If the reader of this
message is not the intended recipient or an agent responsible for delivering
it to the intended recipient, you are hereby notified that you have received
this message in error, and that any review, dissemination, distribution,
copying, or alteration of this message is strictly prohibited. If you have
received this communication in error, please notify the originator
immediately and remove it from your system.
Reply by chri...@gmx.net●June 17, 20052005-06-17
Hi all
On Friday 17 June 2005 01:52, Michael W. Mann wrote:
> You can use data flash to store constants in flash
instead of data
> RAM. This can be done with a properly constructed linker command
Hmmm. I tried that last week! Didnt't work! (OK, I have to admit, I use
really
old Codewarrior for Motorola DSP56800 version 5.0.5)
I tried "const data to .rodata section"-swich and declared data
"const". Added
* (.rodata) for the my .x.flash section -> linker puts it in .data section
in X-RAM.
I tried the OBJECT (data,file) directive in the linker command file to put the
data in .x.flash memory-> linker puts it in .data section in X-RAM.
I tried lots of other things -> linker puts it in .data section in X-RAM. He
really knowns what he wants. But he doesnt't know what I want him to want
:-)
I even tried to use the X-FLASH as copy source for initialized data (with the
AT() directive) -> even that didn't work. The Motorola guys probably had
a
reason to put the initialized data mirror in the P-FLASH and copy it from
there (in their SDK).
I must admit, I am not up to date with my development suit. Is this a known
bug of the old linker ? Anyone heard of that ?
Christian
Reply by Michael W. Mann●June 16, 20052005-06-16
--- In motoroladsp@moto..., "wysxtrue88" <wy_sx88@s...>
wrote: > Hi,
> I want to use data_flash as non volatile memory. How can i do to read
> and write variables in data_flash of dsp56f807 ?
> Thanks.
You can use data flash to store constants in flash instead of data
RAM. This can be done with a properly constructed linker command file.
If you want to store new data after boot, remember that unused flash
words are all 0xFFFF. Programming flash means writing zeros. You can
program individual words but have to erase flash a page at a time.
You can use the flash primitives found in Processor Expert.
Reply by wysxtrue88●June 15, 20052005-06-15
Hi,
I want to use data_flash as non volatile memory. How can i do to read
and write variables in data_flash of dsp56f807 ?
Thanks.