Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Freescale DSPs | RE: Flash config v.s. ExtMem config

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

  

Post a new Thread

RE: Flash config v.s. ExtMem config - metrowerks - Dec 11 16:50:00 2001

>I run my software and it works
>great in ExtRam but will not run under Flash. I traced a big
problem back
>to sprintf calls. Any time I try to call that it blows up.

ANSWER> The real problem here is probably the size of your
stack that is allocated via the linker command file. sprintf
requires a pretty large buffer when called upon that gets placed
upon the stack. In the External Ram Target, the stack is
allocated as follows:

.xStack (RW) : ORIGIN = 0xF200, LENGTH = 0x0D80

In the Flash Target, the stack is allocated as follows:

.xStack (RW) : ORIGIN = 0x0EA0, LENGTH = 0x0160

So, as you can see, you've significantly reduced the size of your
stack. In your case, the stack is probably overflowing into the
peripherals segment which is defined afterwards in the Flash
target and causing problems which permits it from running
properly. Therefore, you need to find a way to increase your
stack size and still fit everything in the data space. For example,
if you have external memory available, you can put some stuff in
that space which is defined as follows:

.xExtRAM (R) : ORIGIN = 0x2000, LENGTH = 0xDF80

If you'll notice, it is not used in the linker.cmd file for Flash as
it
tries to fit everything into internal memory on the chip. However,
if you have external memory available on your board, you should
exercise use of it. If not, then you are just going to have to play
a
space game and try to increase your stack size and still fit
everything into data memory.

>I also removed the DSP libraries from the
>project to trim the size of stuff. Are there other ways to do that
as well,
>when we are only using the chip as a micro-controller at this
time.

ANSWER> The linker does a really good job of deadstripping
code that is unused from libraries contained within the SDK
project (since all of the libraries are built with the CodeWarrior C
Compiler). You can read about this on page DSP-98 in the
Targeting_DSP56800.pdf.

>Also there are some really strange things happening when
running in Flash as
>opposed to ExtRam, where is this documented?

ANSWER> Without any details I'm not sure how much I can help
you on this one. There's not much documentation regarding
running from Flash but there is documentation regarding
programming the flash and debugging in flash in Chapter 11 of
the Targeting_DSP56800.pdf.

>Thanks for any help and please excuse my ignorance as this
kind of
>progrmming is new to me. I am an old hand when there is a
big huge
>operating system and a ton of resources, but this tight squeeze
stuff is all
>new.

ANSWER> No problem, thanks for using CodeWarrior during the
learning curve. :-)

Ron
--
Metrowerks wishes you and yours
Seasons Greetings and Happy Holidays

Ron Liechty



______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )