DSPRelated.com
Forums

dsp56f807 and stdio without external ram

Started by igttom December 18, 2002
I have problem to make a printf with a project compiled for internal
flash and internal ram. When I compile for external ram like the
evaluation board all is working fine. The 807 has 8k x 16 of internal
Ram, so this should be enough to use a stdio function like printf or
sprintf. Does anyone know how to configure this ?
I use the Metrowerks CW 5.0.2.
Thanks
Thomas




I spoke about the same problem a few days ago. Printf (sprintf....)
implementation require dynamic memory configured in 'linker.cmd'.

Richard Kis.

> -----Original Message-----
> From: igttom <> [mailto:]
> Sent: Wednesday, December 18, 2002 11:47 AM
> To:
> Subject: [motoroladsp] dsp56f807 and stdio without external ram > I have problem to make a printf with a project compiled for internal
> flash and internal ram. When I compile for external ram like the
> evaluation board all is working fine. The 807 has 8k x 16 of internal
> Ram, so this should be enough to use a stdio function like printf or
> sprintf. Does anyone know how to configure this ?
> I use the Metrowerks CW 5.0.2.
> Thanks
> Thomas >
>
> _____________________________________
> 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/ >
>



Thanks,
the solution was described by Art Johnson ins Message 903. In printf.c an Array of type auto with dimension of 512 is generated in the function __pformatter() on the Stack. My On Chip Configuration only declared 160 words of Stack and so it crashed in sprintf which called __pformatter(). I patched Array size in printf.c to 80 an included the source to my project ( there is no Makefile to generate the msl libs ). Some warnings of doubled Symbols in the Lib can be ignored this time, because Symbols included in the Source are taken by the Linker.
It seems that dynamic memory is not needed for this.
Thomas Erdmann
----- Original Message -----
From: Richard Kis
To: e...@igt-gmbh.de ; m...@yahoogroups.com
Sent: Wednesday, December 18, 2002 2:12 PM
Subject: RE: [motoroladsp] dsp56f807 and stdio without external ram

I spoke about the same problem a few days ago. Printf (sprintf....)
implementation require dynamic memory configured in 'linker.cmd'.

Richard Kis.

> -----Original Message-----
> From: igttom <e...@igt-gmbh.de> [mailto:e...@igt-gmbh.de]
> Sent: Wednesday, December 18, 2002 11:47 AM
> To: m...@yahoogroups.com
> Subject: [motoroladsp] dsp56f807 and stdio without external ram> I have problem to make a printf with a project compiled for internal
> flash and internal ram. When I compile for external ram like the
> evaluation board all is working fine. The 807 has 8k x 16 of internal
> Ram, so this should be enough to use a stdio function like printf or
> sprintf. Does anyone know how to configure this ?
> I use the Metrowerks CW 5.0.2.
> Thanks
>   Thomas>
>
> _____________________________________
> 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

>
> ">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:  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.


The stationary that ships with CodeWarrior has a simple example that
shows how to perform a printf in any memory configuration.

- Create a new project for the M56807 using the stationary
- Select the target "flash pxROM w/ int xRAM" in the drop down list
in at the top of the target menu. Tis target is the memory
configuration you had asked about.
-Jumper the EVM as described in the targets linker command file
(JG7=on, JG8=OFF)
-launch and run

Standard out should stream out of console window.

-Robert St. John
Metrowerks

Note: To have full FILE IO, you need to switch to use the Host IO
MSL library. These take more room on the target, but provide more
functionality. It also reuires some dynamic memory to be setup via
the heap. This is described in the Targeting 56800 manual.

Stdio on the other hand, works with both sets of libraries. With no
dynamic memory requirements.

File IO and standard IO is a debug only feature its not designed to
work in a production environment. It uses the debugger to hand the
IO between the debug host and the target. --- In , "igttom <erdmann@i...>"
<erdmann@i...> wrote:
> I have problem to make a printf with a project compiled for
internal
> flash and internal ram. When I compile for external ram like the
> evaluation board all is working fine. The 807 has 8k x 16 of
internal
> Ram, so this should be enough to use a stdio function like printf
or
> sprintf. Does anyone know how to configure this ?
> I use the Metrowerks CW 5.0.2.
> Thanks
> Thomas