DSPRelated.com
Forums

Moving one bss var into .xExt_Ram

Started by Jacob Christ December 7, 2002
Okay, I've been trying for two days to get one uninitalized global
variable into my .xExtRAM segment. Every thing I try seems to move
the whole .bss section. I've tried creating a loan file defines the
var then use something like

.ExternalRam :
{
adc_data.c (.bss)
} > .xExtRAM

I've also tried this with an external ref in my code.

.ExternalRam :
{
Fadc_data = .;
} > .xExtRAM Thanks in advance,

Jacob




Jacob, you can put xRAM .bss sections into the external xRAM by doing the
following in your Linker Command File "linker.cmd":

In the "MEMORY" section:
.xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
.xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80

In the "SECTIONS" section:
#*******************************************************************************
.DataForExtDataRAM :
{

# .bss sections

extram_data.c (.bss)

} > .xExtRAM_Mirror
#*******************************************************************************

The above is for an '807 chip, and will put all uninitialized data (.bss) from
the file "extram_data.c" into the external xRAM area. We have done this and it
works for us in two of our products that use an external RAM chip. It works for
the .xExtRAM_Mirror section that overlaps the normal .xExtRAM section. I
haven't bothered to find out exactly why this is so, but I'm sure it would only
take someone a few minutes to look it up in the on-line documentation.

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com

-----Original Message-----
From: Jacob Christ <> [mailto:]
Sent: Friday, December 06, 2002 4:02 PM
To:
Subject: [motoroladsp] Moving one bss var into .xExt_Ram Okay, I've been trying for two days to get one uninitalized global
variable into my .xExtRAM segment. Every thing I try seems to move
the whole .bss section. I've tried creating a loan file defines the
var then use something like

.ExternalRam :
{
adc_data.c (.bss)
} > .xExtRAM

I've also tried this with an external ref in my code.

.ExternalRam :
{
Fadc_data = .;
} > .xExtRAM Thanks in advance,

Jacob

_____________________________________
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:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/



Make sure that linker command directives for the rest of the BSS sections are placed in the linker.cmd file AFTER your special adc_data.c bss section.

 

You should attach your entire linker.cmd file to this email so we may better understand where the problem is.

 

Leonard

 

-----Original Message-----
From: j...@pontech.com [mailto:j...@pontech.com]
Sent: Friday, December 06, 2002 5:02 PM
To: m...@yahoogroups.com
Subject: [motoroladsp] Moving one bss var into .xExt_Ram

 

Okay, I've been trying for two days to get one uninitalized global
variable into my .xExtRAM segment.  Every thing I try seems to move
the whole .bss section.  I've tried creating a loan file defines the
var then use something like

.ExternalRam :
{
   adc_data.c (.bss)
} > .xExtRAM

I've also tried this with an external ref in my code.

.ExternalRam :
{
   Fadc_data = .;
} > .xExtRAM Thanks in advance,

Jacob


_____________________________________
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:

To Join:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3


">Yahoo! Terms of Service.


Jacob,

Leonard's point is very important...

If you have a statement early on in your linker command file such as:

* (.bss)

This wildcard character represents all of the filenames within your
project and will therefore put all of their .bss portions into the
current section. Therefore, if you already have used this type of
section allocation earlier on in your LCF, then subsequent .bss
section allocation later on in your LCF will probably not happen the
way you expect.

The wildcard character is smart enough though to know when you have
added .bss portions from certain files before the use of the wildcard
character, that's why it is so important that you make sure you don't
have this type of declaration BEFORE you try and allocate this one
uninitialized global variable into the .xExtRAM segment.

For some information regarding the "*" wildcard character and its use
within the linker command file, see page DSP-231 in the
Targeting_DSP56800.pdf within the CodeWarrior installation.

Hope this info helps!

Regards,
John

--- In , "Jacob Christ <jacob@p...>"
<jacob@p...> wrote:
> Okay, I've been trying for two days to get one uninitalized global
> variable into my .xExtRAM segment. Every thing I try seems to move
> the whole .bss section. I've tried creating a loan file defines
the
> var then use something like
>
> .ExternalRam :
> {
> adc_data.c (.bss)
> } > .xExtRAM
>
> I've also tried this with an external ref in my code.
>
> .ExternalRam :
> {
> Fadc_data = .;
> } > .xExtRAM > Thanks in advance,
>
> Jacob




Art,

Please see my and Leonard's posted response regarding Jacob's issue.
Most likely, this is Jacob's problem.

With regards to your response, your section definition
for .DataForExtDataRAM strikes me as a little funny because normally
when you are dealing with MEMORY segments that are mirrored (in your
case, X external RAM is being mirrored in on-chip Program Flash), you
would use the AT parameter to specify the location in ROM where you
want the section to be placed at loadtime....then the actual MEMORY
segment pointed to in the SECTIONS definition is the relocation
segment where it is copied to at runtime. For example, see the code
snippet below:

.data : AT(__xROM_data_start) # load address is in ROM
{ # starting after constant data

* (.data)
etc.
etc.
* (.bss)

} > .x_internal_RAM # relocation address --
# intended final destination in RAM

In your example, you define a mirrored segment in Program ROM
(.xExtRAM_Mirror) that mirrors your .xExtRAM segment in X memory.
However, based on your LCF, it doesn't look like you ever actually
copy the data to the .xExtRAM segment at runtime. Instead, it just
looks like you do a straight load to Program ROM and that's it.
Maybe you forgot to include the AT directive in the post, or maybe
it's not your intent of how to handle this section, I just thought I
would point out the peculiarity.......if this isn't helpful, just
disregard.

Regards,
John

--- In , "Art Johnson" <art@p...> wrote:
> Jacob, you can put xRAM .bss sections into the external xRAM by
doing the following in your Linker Command File "linker.cmd":
>
> In the "MEMORY" section:
> .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
>
> In the "SECTIONS" section:
>
#*********************************************************************
**********
> .DataForExtDataRAM :
> {
>
> # .bss sections
>
> extram_data.c (.bss)
>
> } > .xExtRAM_Mirror
>
#*********************************************************************
**********
>
> The above is for an '807 chip, and will put all uninitialized data
(.bss) from the file "extram_data.c" into the external xRAM area. We
have done this and it works for us in two of our products that use an
external RAM chip. It works for the .xExtRAM_Mirror section that
overlaps the normal .xExtRAM section. I haven't bothered to find out
exactly why this is so, but I'm sure it would only take someone a few
minutes to look it up in the on-line documentation.
>
> Regards,
>
> Art Johnson
> Senior Systems Analyst
> PMC Prime Mover Controls Inc.
> 3600 Gilmore Way
> Burnaby, B.C., Canada
> V5G 4R8
> Phone: 604 433-4644
> FAX: 604 433-5570
> Email: art@p...
> http://www.pmc-controls.com >
>
> -----Original Message-----
> From: Jacob Christ <jacob@p...> [mailto:jacob@p...]
> Sent: Friday, December 06, 2002 4:02 PM
> To:
> Subject: [motoroladsp] Moving one bss var into .xExt_Ram > Okay, I've been trying for two days to get one uninitalized global
> variable into my .xExtRAM segment. Every thing I try seems to move
> the whole .bss section. I've tried creating a loan file defines
the
> var then use something like
>
> .ExternalRam :
> {
> adc_data.c (.bss)
> } > .xExtRAM
>
> I've also tried this with an external ref in my code.
>
> .ExternalRam :
> {
> Fadc_data = .;
> } > .xExtRAM > Thanks in advance,
>
> Jacob >
>
> _____________________________________
> 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:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/motoroladsp
>
> More Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/



The syntax and methods we use in all of our LCFs are straight copies from the
linker.cmd files that come with the SDK example projects. Since everything
works perfectly, we do not see the need for any of our developers to waste their
very valuable time attempting to "prettify" the LCFs in the way you suggest. We
truly have much better things to do with our time, like trying to get enough
sleep, or to see our families once in a while.

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com
-----Original Message-----
From: jdw_atx <> [mailto:]
Sent: Monday, December 09, 2002 10:21 AM
To:
Subject: Re: Moving one bss var into .xExt_Ram Art,

Please see my and Leonard's posted response regarding Jacob's issue.
Most likely, this is Jacob's problem.

With regards to your response, your section definition
for .DataForExtDataRAM strikes me as a little funny because normally
when you are dealing with MEMORY segments that are mirrored (in your
case, X external RAM is being mirrored in on-chip Program Flash), you
would use the AT parameter to specify the location in ROM where you
want the section to be placed at loadtime....then the actual MEMORY
segment pointed to in the SECTIONS definition is the relocation
segment where it is copied to at runtime. For example, see the code
snippet below:

.data : AT(__xROM_data_start) # load address is in ROM
{ # starting after constant data

* (.data)
etc.
etc.
* (.bss)

} > .x_internal_RAM # relocation address --
# intended final destination in RAM

In your example, you define a mirrored segment in Program ROM
(.xExtRAM_Mirror) that mirrors your .xExtRAM segment in X memory.
However, based on your LCF, it doesn't look like you ever actually
copy the data to the .xExtRAM segment at runtime. Instead, it just
looks like you do a straight load to Program ROM and that's it.
Maybe you forgot to include the AT directive in the post, or maybe
it's not your intent of how to handle this section, I just thought I
would point out the peculiarity.......if this isn't helpful, just
disregard.

Regards,
John

--- In , "Art Johnson" <art@p...> wrote:
> Jacob, you can put xRAM .bss sections into the external xRAM by
doing the following in your Linker Command File "linker.cmd":
>
> In the "MEMORY" section:
> .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
>
> In the "SECTIONS" section:
>
#*********************************************************************
**********
> .DataForExtDataRAM :
> {
>
> # .bss sections
>
> extram_data.c (.bss)
>
> } > .xExtRAM_Mirror
>
#*********************************************************************
**********
>
> The above is for an '807 chip, and will put all uninitialized data
(.bss) from the file "extram_data.c" into the external xRAM area. We
have done this and it works for us in two of our products that use an
external RAM chip. It works for the .xExtRAM_Mirror section that
overlaps the normal .xExtRAM section. I haven't bothered to find out
exactly why this is so, but I'm sure it would only take someone a few
minutes to look it up in the on-line documentation.
>
> Regards,
>
> Art Johnson
> Senior Systems Analyst
> PMC Prime Mover Controls Inc.
> 3600 Gilmore Way
> Burnaby, B.C., Canada
> V5G 4R8
> Phone: 604 433-4644
> FAX: 604 433-5570
> Email: art@p...
> http://www.pmc-controls.com >
>
> -----Original Message-----
> From: Jacob Christ <jacob@p...> [mailto:jacob@p...]
> Sent: Friday, December 06, 2002 4:02 PM
> To:
> Subject: [motoroladsp] Moving one bss var into .xExt_Ram > Okay, I've been trying for two days to get one uninitalized global
> variable into my .xExtRAM segment. Every thing I try seems to move
> the whole .bss section. I've tried creating a loan file defines
the
> var then use something like
>
> .ExternalRam :
> {
> adc_data.c (.bss)
> } > .xExtRAM
>
> I've also tried this with an external ref in my code.
>
> .ExternalRam :
> {
> Fadc_data = .;
> } > .xExtRAM > Thanks in advance,
>
> Jacob >
>
> _____________________________________
> 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:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/motoroladsp
>
> More Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/



Team,

Whatever way is more correct, I was doing it the way Art suggested
except that I didn't have the Mirror. Well, today it's working Arts
way and the way I tried last week. I think just posing the question
intimidated my linker into working the way I expected it too... go
figure. Anyway, now that I have this huge amount of external RAM to
store my adc data in I upped my fft size so that I could get better
bandwidth resolution by using a larger FFT (2024 point instead of
1024 point). Well, now I have this huge twiddle table sitting in
xFlash and I can't link becuase I'm out of xFlash. See, I knew that
one of the problems someone else was going to come up and nip me in
the arse.

Oh, I also had the chance to add more files to my project this
morning and unchecked the Build All build and I didn't get the error
that one or more files couldn't be added to the project.

Art / Ron, could you point me to the workaround?

Jacob

--- In , "Art Johnson" <art@p...> wrote:
> The syntax and methods we use in all of our LCFs are straight
copies from the linker.cmd files that come with the SDK example
projects. Since everything works perfectly, we do not see the need
for any of our developers to waste their very valuable time
attempting to "prettify" the LCFs in the way you suggest. We truly
have much better things to do with our time, like trying to get
enough sleep, or to see our families once in a while.
>
> Regards,
>
> Art Johnson
> Senior Systems Analyst
> PMC Prime Mover Controls Inc.
> 3600 Gilmore Way
> Burnaby, B.C., Canada
> V5G 4R8
> Phone: 604 433-4644
> FAX: 604 433-5570
> Email: art@p...
> http://www.pmc-controls.com >
> -----Original Message-----
> From: jdw_atx <jdw_atx@y...> [mailto:jdw_atx@y...]
> Sent: Monday, December 09, 2002 10:21 AM
> To:
> Subject: Re: Moving one bss var into .xExt_Ram > Art,
>
> Please see my and Leonard's posted response regarding Jacob's
issue.
> Most likely, this is Jacob's problem.
>
> With regards to your response, your section definition
> for .DataForExtDataRAM strikes me as a little funny because
normally
> when you are dealing with MEMORY segments that are mirrored (in
your
> case, X external RAM is being mirrored in on-chip Program Flash),
you
> would use the AT parameter to specify the location in ROM where you
> want the section to be placed at loadtime....then the actual MEMORY
> segment pointed to in the SECTIONS definition is the relocation
> segment where it is copied to at runtime. For example, see the
code
> snippet below:
>
> .data : AT(__xROM_data_start) # load address is in ROM
> { # starting after constant data
>
> * (.data)
> etc.
> etc.
> * (.bss)
>
> } > .x_internal_RAM # relocation address --
> # intended final destination in RAM
>
> In your example, you define a mirrored segment in Program ROM
> (.xExtRAM_Mirror) that mirrors your .xExtRAM segment in X memory.
> However, based on your LCF, it doesn't look like you ever actually
> copy the data to the .xExtRAM segment at runtime. Instead, it just
> looks like you do a straight load to Program ROM and that's it.
> Maybe you forgot to include the AT directive in the post, or maybe
> it's not your intent of how to handle this section, I just thought
I
> would point out the peculiarity.......if this isn't helpful, just
> disregard.
>
> Regards,
> John
>
> --- In , "Art Johnson" <art@p...> wrote:
> > Jacob, you can put xRAM .bss sections into the external xRAM by
> doing the following in your Linker Command File "linker.cmd":
> >
> > In the "MEMORY" section:
> > .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> > .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
> >
> > In the "SECTIONS" section:
> >
>
#*********************************************************************
> **********
> > .DataForExtDataRAM :
> > {
> >
> > # .bss sections
> >
> > extram_data.c (.bss)
> >
> > } > .xExtRAM_Mirror
> >
>
#*********************************************************************
> **********
> >
> > The above is for an '807 chip, and will put all uninitialized
data
> (.bss) from the file "extram_data.c" into the external xRAM area.
We
> have done this and it works for us in two of our products that use
an
> external RAM chip. It works for the .xExtRAM_Mirror section that
> overlaps the normal .xExtRAM section. I haven't bothered to find
out
> exactly why this is so, but I'm sure it would only take someone a
few
> minutes to look it up in the on-line documentation.
> >
> > Regards,
> >
> > Art Johnson
> > Senior Systems Analyst
> > PMC Prime Mover Controls Inc.
> > 3600 Gilmore Way
> > Burnaby, B.C., Canada
> > V5G 4R8
> > Phone: 604 433-4644
> > FAX: 604 433-5570
> > Email: art@p...
> > http://www.pmc-controls.com
> >
> >
> >
> >
> > -----Original Message-----
> > From: Jacob Christ <jacob@p...> [mailto:jacob@p...]
> > Sent: Friday, December 06, 2002 4:02 PM
> > To:
> > Subject: [motoroladsp] Moving one bss var into .xExt_Ram
> >
> >
> > Okay, I've been trying for two days to get one uninitalized
global
> > variable into my .xExtRAM segment. Every thing I try seems to
move
> > the whole .bss section. I've tried creating a loan file defines
> the
> > var then use something like
> >
> > .ExternalRam :
> > {
> > adc_data.c (.bss)
> > } > .xExtRAM
> >
> > I've also tried this with an external ref in my code.
> >
> > .ExternalRam :
> > {
> > Fadc_data = .;
> > } > .xExtRAM
> >
> >
> > Thanks in advance,
> >
> > Jacob
> >
> >
> >
> >
> > _____________________________________
> > 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:
> >
> > To Join:
> >
> > To Post:
> >
> > To Leave:
> >
> > Archives: http://www.yahoogroups.com/group/motoroladsp
> >
> > More Groups: http://www.dsprelated.com/groups.php3
> >
> >
> > ">http://docs.yahoo.com/info/terms/



Art,

>Since everything works perfectly, we do not see the need for any of
>our developers to waste their very valuable time attempting
>to "prettify" the LCFs in the way you suggest. We truly have much
>better things to do with our time, like trying to get enough sleep,
>or to see our families once in a while.

Appreciate the candid response. :-)

However, I was just trying to be helpful hence my comment:

> Maybe you forgot to include the AT directive in the post, or maybe
> it's not your intent of how to handle this section, I just thought
> I would point out the peculiarity.......if this isn't helpful, just
> disregard.

I was simply trying to lend knowledge to the group regarding using
the AT parameter and ROM-RAM copying with the use of the linker
command file. I apologize for my attempts to "prettify"
anything.....geez.

Regards,
John

--- In , "Art Johnson" <art@p...> wrote:
> The syntax and methods we use in all of our LCFs are straight
copies from the linker.cmd files that come with the SDK example
projects. Since everything works perfectly, we do not see the need
for any of our developers to waste their very valuable time
attempting to "prettify" the LCFs in the way you suggest. We truly
have much better things to do with our time, like trying to get
enough sleep, or to see our families once in a while.
>
> Regards,
>
> Art Johnson
> Senior Systems Analyst
> PMC Prime Mover Controls Inc.
> 3600 Gilmore Way
> Burnaby, B.C., Canada
> V5G 4R8
> Phone: 604 433-4644
> FAX: 604 433-5570
> Email: art@p...
> http://www.pmc-controls.com >
> -----Original Message-----
> From: jdw_atx <jdw_atx@y...> [mailto:jdw_atx@y...]
> Sent: Monday, December 09, 2002 10:21 AM
> To:
> Subject: Re: Moving one bss var into .xExt_Ram > Art,
>
> Please see my and Leonard's posted response regarding Jacob's
issue.
> Most likely, this is Jacob's problem.
>
> With regards to your response, your section definition
> for .DataForExtDataRAM strikes me as a little funny because
normally
> when you are dealing with MEMORY segments that are mirrored (in
your
> case, X external RAM is being mirrored in on-chip Program Flash),
you
> would use the AT parameter to specify the location in ROM where you
> want the section to be placed at loadtime....then the actual MEMORY
> segment pointed to in the SECTIONS definition is the relocation
> segment where it is copied to at runtime. For example, see the
code
> snippet below:
>
> .data : AT(__xROM_data_start) # load address is in ROM
> { # starting after constant data
>
> * (.data)
> etc.
> etc.
> * (.bss)
>
> } > .x_internal_RAM # relocation address --
> # intended final destination in RAM
>
> In your example, you define a mirrored segment in Program ROM
> (.xExtRAM_Mirror) that mirrors your .xExtRAM segment in X memory.
> However, based on your LCF, it doesn't look like you ever actually
> copy the data to the .xExtRAM segment at runtime. Instead, it just
> looks like you do a straight load to Program ROM and that's it.
> Maybe you forgot to include the AT directive in the post, or maybe
> it's not your intent of how to handle this section, I just thought
I
> would point out the peculiarity.......if this isn't helpful, just
> disregard.
>
> Regards,
> John
>
> --- In , "Art Johnson" <art@p...> wrote:
> > Jacob, you can put xRAM .bss sections into the external xRAM by
> doing the following in your Linker Command File "linker.cmd":
> >
> > In the "MEMORY" section:
> > .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> > .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
> >
> > In the "SECTIONS" section:
> >
>
#*********************************************************************
> **********
> > .DataForExtDataRAM :
> > {
> >
> > # .bss sections
> >
> > extram_data.c (.bss)
> >
> > } > .xExtRAM_Mirror
> >
>
#*********************************************************************
> **********
> >
> > The above is for an '807 chip, and will put all uninitialized
data
> (.bss) from the file "extram_data.c" into the external xRAM area.
We
> have done this and it works for us in two of our products that use
an
> external RAM chip. It works for the .xExtRAM_Mirror section that
> overlaps the normal .xExtRAM section. I haven't bothered to find
out
> exactly why this is so, but I'm sure it would only take someone a
few
> minutes to look it up in the on-line documentation.
> >
> > Regards,
> >
> > Art Johnson
> > Senior Systems Analyst
> > PMC Prime Mover Controls Inc.
> > 3600 Gilmore Way
> > Burnaby, B.C., Canada
> > V5G 4R8
> > Phone: 604 433-4644
> > FAX: 604 433-5570
> > Email: art@p...
> > http://www.pmc-controls.com
> >
> >
> >
> >
> > -----Original Message-----
> > From: Jacob Christ <jacob@p...> [mailto:jacob@p...]
> > Sent: Friday, December 06, 2002 4:02 PM
> > To:
> > Subject: [motoroladsp] Moving one bss var into .xExt_Ram
> >
> >
> > Okay, I've been trying for two days to get one uninitalized
global
> > variable into my .xExtRAM segment. Every thing I try seems to
move
> > the whole .bss section. I've tried creating a loan file defines
> the
> > var then use something like
> >
> > .ExternalRam :
> > {
> > adc_data.c (.bss)
> > } > .xExtRAM
> >
> > I've also tried this with an external ref in my code.
> >
> > .ExternalRam :
> > {
> > Fadc_data = .;
> > } > .xExtRAM
> >
> >
> > Thanks in advance,
> >
> > Jacob
> >
> >
> >
> >
> > _____________________________________
> > 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:
> >
> > To Join:
> >
> > To Post:
> >
> > To Leave:
> >
> > Archives: http://www.yahoogroups.com/group/motoroladsp
> >
> > More Groups: http://www.dsprelated.com/groups.php3
> >
> >
> > ">http://docs.yahoo.com/info/terms/


Jacob,

> Oh, I also had the chance to add more files to my project this
> morning and unchecked the Build All build and I didn't get the
error
> that one or more files couldn't be added to the project.

COMMENTS: Glad to hear that it worked out for you. :-)

> Anyway, now that I have this huge amount of external RAM to
> store my adc data in I upped my fft size so that I could get better
> bandwidth resolution by using a larger FFT (2024 point instead of
> 1024 point). Well, now I have this huge twiddle table sitting in
> xFlash and I can't link becuase I'm out of xFlash.

> Art / Ron, could you point me to the workaround?

COMMENTS: Jacob, not sure which workaround you are requesting, but
if you have run out of xFlash then there's not much of a workaround
for that. However, if it's just a matter of the MEMORY segment that
you are exceeding perhaps you can tweak the size of the segment. I
would have to see your linker command file to see what is possible.
Can't really think of a quick workaround to get you around this
without it.......sorry I can't help more.

Regards,
John

--- In , "Jacob Christ <jacob@p...>"
<jacob@p...> wrote:
> Team,
>
> Whatever way is more correct, I was doing it the way Art suggested
> except that I didn't have the Mirror. Well, today it's working
Arts
> way and the way I tried last week. I think just posing the
question
> intimidated my linker into working the way I expected it too... go
> figure. Anyway, now that I have this huge amount of external RAM
to
> store my adc data in I upped my fft size so that I could get better
> bandwidth resolution by using a larger FFT (2024 point instead of
> 1024 point). Well, now I have this huge twiddle table sitting in
> xFlash and I can't link becuase I'm out of xFlash. See, I knew
that
> one of the problems someone else was going to come up and nip me in
> the arse.
>
> Oh, I also had the chance to add more files to my project this
> morning and unchecked the Build All build and I didn't get the
error
> that one or more files couldn't be added to the project.
>
> Art / Ron, could you point me to the workaround?
>
> Jacob
>
> --- In , "Art Johnson" <art@p...> wrote:
> > The syntax and methods we use in all of our LCFs are straight
> copies from the linker.cmd files that come with the SDK example
> projects. Since everything works perfectly, we do not see the need
> for any of our developers to waste their very valuable time
> attempting to "prettify" the LCFs in the way you suggest. We truly
> have much better things to do with our time, like trying to get
> enough sleep, or to see our families once in a while.
> >
> > Regards,
> >
> > Art Johnson
> > Senior Systems Analyst
> > PMC Prime Mover Controls Inc.
> > 3600 Gilmore Way
> > Burnaby, B.C., Canada
> > V5G 4R8
> > Phone: 604 433-4644
> > FAX: 604 433-5570
> > Email: art@p...
> > http://www.pmc-controls.com
> >
> >
> >
> > -----Original Message-----
> > From: jdw_atx <jdw_atx@y...> [mailto:jdw_atx@y...]
> > Sent: Monday, December 09, 2002 10:21 AM
> > To:
> > Subject: Re: Moving one bss var into .xExt_Ram
> >
> >
> > Art,
> >
> > Please see my and Leonard's posted response regarding Jacob's
> issue.
> > Most likely, this is Jacob's problem.
> >
> > With regards to your response, your section definition
> > for .DataForExtDataRAM strikes me as a little funny because
> normally
> > when you are dealing with MEMORY segments that are mirrored (in
> your
> > case, X external RAM is being mirrored in on-chip Program Flash),
> you
> > would use the AT parameter to specify the location in ROM where
you
> > want the section to be placed at loadtime....then the actual
MEMORY
> > segment pointed to in the SECTIONS definition is the relocation
> > segment where it is copied to at runtime. For example, see the
> code
> > snippet below:
> >
> > .data : AT(__xROM_data_start) # load address is in ROM
> > { # starting after constant data
> >
> > * (.data)
> > etc.
> > etc.
> > * (.bss)
> >
> > } > .x_internal_RAM # relocation address --
> > # intended final destination in RAM
> >
> > In your example, you define a mirrored segment in Program ROM
> > (.xExtRAM_Mirror) that mirrors your .xExtRAM segment in X
memory.
> > However, based on your LCF, it doesn't look like you ever
actually
> > copy the data to the .xExtRAM segment at runtime. Instead, it
just
> > looks like you do a straight load to Program ROM and that's it.
> > Maybe you forgot to include the AT directive in the post, or
maybe
> > it's not your intent of how to handle this section, I just
thought
> I
> > would point out the peculiarity.......if this isn't helpful, just
> > disregard.
> >
> > Regards,
> > John
> >
> > --- In , "Art Johnson" <art@p...>
wrote:
> > > Jacob, you can put xRAM .bss sections into the external xRAM by
> > doing the following in your Linker Command File "linker.cmd":
> > >
> > > In the "MEMORY" section:
> > > .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> > > .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
> > >
> > > In the "SECTIONS" section:
> > >
> >
>
#*********************************************************************
> > **********
> > > .DataForExtDataRAM :
> > > {
> > >
> > > # .bss sections
> > >
> > > extram_data.c (.bss)
> > >
> > > } > .xExtRAM_Mirror
> > >
> >
>
#*********************************************************************
> > **********
> > >
> > > The above is for an '807 chip, and will put all uninitialized
> data
> > (.bss) from the file "extram_data.c" into the external xRAM
area.
> We
> > have done this and it works for us in two of our products that
use
> an
> > external RAM chip. It works for the .xExtRAM_Mirror section that
> > overlaps the normal .xExtRAM section. I haven't bothered to find
> out
> > exactly why this is so, but I'm sure it would only take someone a
> few
> > minutes to look it up in the on-line documentation.
> > >
> > > Regards,
> > >
> > > Art Johnson
> > > Senior Systems Analyst
> > > PMC Prime Mover Controls Inc.
> > > 3600 Gilmore Way
> > > Burnaby, B.C., Canada
> > > V5G 4R8
> > > Phone: 604 433-4644
> > > FAX: 604 433-5570
> > > Email: art@p...
> > > http://www.pmc-controls.com
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Jacob Christ <jacob@p...> [mailto:jacob@p...]
> > > Sent: Friday, December 06, 2002 4:02 PM
> > > To:
> > > Subject: [motoroladsp] Moving one bss var into .xExt_Ram
> > >
> > >
> > > Okay, I've been trying for two days to get one uninitalized
> global
> > > variable into my .xExtRAM segment. Every thing I try seems to
> move
> > > the whole .bss section. I've tried creating a loan file
defines
> > the
> > > var then use something like
> > >
> > > .ExternalRam :
> > > {
> > > adc_data.c (.bss)
> > > } > .xExtRAM
> > >
> > > I've also tried this with an external ref in my code.
> > >
> > > .ExternalRam :
> > > {
> > > Fadc_data = .;
> > > } > .xExtRAM
> > >
> > >
> > > Thanks in advance,
> > >
> > > Jacob
> > >
> > >
> > >
> > >
> > > _____________________________________
> > > 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:
> > >
> > > To Join:
> > >
> > > To Post:
> > >
> > > To Leave:
> > >
> > > Archives: http://www.yahoogroups.com/group/motoroladsp
> > >
> > > More Groups: http://www.dsprelated.com/groups.php3
> > >
> > >
> > > ">http://docs.yahoo.com/info/terms/


Jacob, if you could send me a ZIP file of your project, with an explanation of
what is happening, it should only take me a couple of minutes to fix whatever is
wrong. We have a couple of "expanded-memory" products using the '807 chip here,
one of which has the following in external Data (X) memory space:

1) 32K x 16 external RAM chip
2) 512K x 16 external Flash chip (paged into a 4K-word block of X memory)
3) XR16C2850 external DUART chip, to get 2 more serial ports
4) Epson RTC-7301 Real Time Clock (RTC) chip

All of the above has worked flawlessly, over the last 6+ months of development
work. The '807 chip (at least in Mode 0A which we use exclusively) does not
have any requirement for external Program (P) memory, but the procedure for
adding external P memory devices is almost identical to the procedure we use for
adding external X memory devices.

In any case, if you can send me a test case of the problem you are having, it
should only take me a couple of minutes to fix whatever is wrong. With your
permission, of course, I would then like to post the "before-and-after" stuff to
this discussion group, so that other members can learn from this example.

To all of the group: If you are having a problem like this, please send in a
test case with your message, or at least enough of your files so that we can
figure out your problem and fix it for you. Just sending in a written
description wastes our time, because then we have to ask you to send in what we
really need, namely your files that demonstrate the problem you are having.

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com
-----Original Message-----
From: Jacob Christ <> [mailto:]
Sent: Monday, December 09, 2002 11:26 AM
To:
Subject: [motoroladsp] Re: Moving one bss var into .xExt_Ram Team,

Whatever way is more correct, I was doing it the way Art suggested
except that I didn't have the Mirror. Well, today it's working Arts
way and the way I tried last week. I think just posing the question
intimidated my linker into working the way I expected it too... go
figure. Anyway, now that I have this huge amount of external RAM to
store my adc data in I upped my fft size so that I could get better
bandwidth resolution by using a larger FFT (2024 point instead of
1024 point). Well, now I have this huge twiddle table sitting in
xFlash and I can't link becuase I'm out of xFlash. See, I knew that
one of the problems someone else was going to come up and nip me in
the arse.

Oh, I also had the chance to add more files to my project this
morning and unchecked the Build All build and I didn't get the error
that one or more files couldn't be added to the project.

Art / Ron, could you point me to the workaround?

Jacob

--- In , "Art Johnson" <art@p...> wrote:
> The syntax and methods we use in all of our LCFs are straight
copies from the linker.cmd files that come with the SDK example
projects. Since everything works perfectly, we do not see the need
for any of our developers to waste their very valuable time
attempting to "prettify" the LCFs in the way you suggest. We truly
have much better things to do with our time, like trying to get
enough sleep, or to see our families once in a while.
>
> Regards,
>
> Art Johnson
> Senior Systems Analyst
> PMC Prime Mover Controls Inc.
> 3600 Gilmore Way
> Burnaby, B.C., Canada
> V5G 4R8
> Phone: 604 433-4644
> FAX: 604 433-5570
> Email: art@p...
> http://www.pmc-controls.com >
> -----Original Message-----
> From: jdw_atx <jdw_atx@y...> [mailto:jdw_atx@y...]
> Sent: Monday, December 09, 2002 10:21 AM
> To:
> Subject: Re: Moving one bss var into .xExt_Ram > Art,
>
> Please see my and Leonard's posted response regarding Jacob's
issue.
> Most likely, this is Jacob's problem.
>
> With regards to your response, your section definition
> for .DataForExtDataRAM strikes me as a little funny because
normally
> when you are dealing with MEMORY segments that are mirrored (in
your
> case, X external RAM is being mirrored in on-chip Program Flash),
you
> would use the AT parameter to specify the location in ROM where you
> want the section to be placed at loadtime....then the actual MEMORY
> segment pointed to in the SECTIONS definition is the relocation
> segment where it is copied to at runtime. For example, see the
code
> snippet below:
>
> .data : AT(__xROM_data_start) # load address is in ROM
> { # starting after constant data
>
> * (.data)
> etc.
> etc.
> * (.bss)
>
> } > .x_internal_RAM # relocation address --
> # intended final destination in RAM
>
> In your example, you define a mirrored segment in Program ROM
> (.xExtRAM_Mirror) that mirrors your .xExtRAM segment in X memory.
> However, based on your LCF, it doesn't look like you ever actually
> copy the data to the .xExtRAM segment at runtime. Instead, it just
> looks like you do a straight load to Program ROM and that's it.
> Maybe you forgot to include the AT directive in the post, or maybe
> it's not your intent of how to handle this section, I just thought
I
> would point out the peculiarity.......if this isn't helpful, just
> disregard.
>
> Regards,
> John
>
> --- In , "Art Johnson" <art@p...> wrote:
> > Jacob, you can put xRAM .bss sections into the external xRAM by
> doing the following in your Linker Command File "linker.cmd":
> >
> > In the "MEMORY" section:
> > .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> > .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
> >
> > In the "SECTIONS" section:
> >
>
#*********************************************************************
> **********
> > .DataForExtDataRAM :
> > {
> >
> > # .bss sections
> >
> > extram_data.c (.bss)
> >
> > } > .xExtRAM_Mirror
> >
>
#*********************************************************************
> **********
> >
> > The above is for an '807 chip, and will put all uninitialized
data
> (.bss) from the file "extram_data.c" into the external xRAM area.
We
> have done this and it works for us in two of our products that use
an
> external RAM chip. It works for the .xExtRAM_Mirror section that
> overlaps the normal .xExtRAM section. I haven't bothered to find
out
> exactly why this is so, but I'm sure it would only take someone a
few
> minutes to look it up in the on-line documentation.
> >
> > Regards,
> >
> > Art Johnson
> > Senior Systems Analyst
> > PMC Prime Mover Controls Inc.
> > 3600 Gilmore Way
> > Burnaby, B.C., Canada
> > V5G 4R8
> > Phone: 604 433-4644
> > FAX: 604 433-5570
> > Email: art@p...
> > http://www.pmc-controls.com
> >
> >
> >
> >
> > -----Original Message-----
> > From: Jacob Christ <jacob@p...> [mailto:jacob@p...]
> > Sent: Friday, December 06, 2002 4:02 PM
> > To:
> > Subject: [motoroladsp] Moving one bss var into .xExt_Ram
> >
> >
> > Okay, I've been trying for two days to get one uninitalized
global
> > variable into my .xExtRAM segment. Every thing I try seems to
move
> > the whole .bss section. I've tried creating a loan file defines
> the
> > var then use something like
> >
> > .ExternalRam :
> > {
> > adc_data.c (.bss)
> > } > .xExtRAM
> >
> > I've also tried this with an external ref in my code.
> >
> > .ExternalRam :
> > {
> > Fadc_data = .;
> > } > .xExtRAM
> >
> >
> > Thanks in advance,
> >
> > Jacob
> >
> >
> >
> >
> > _____________________________________
> > 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:
> >
> > To Join:
> >
> > To Post:
> >
> > To Leave:
> >
> > Archives: http://www.yahoogroups.com/group/motoroladsp
> >
> > More Groups: http://www.dsprelated.com/groups.php3
> >
> >
> > ">http://docs.yahoo.com/info/terms/
_____________________________________
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:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/