[ECOS] Stack usage measurement

Gary Thomas gary@mlbassoc.com
Mon Apr 20 10:52:00 GMT 2009

Ross Younger wrote:
> Szentirmai Gergely wrote:
>> Does anybody has a estimation about the stack usage of pintf stuff? [...]
>> As a summary, I would have to avoid the usage of any printf if I'm short
>> of memory?
> printf (or, more precisely, the actual format conversion in vfnprintf) is
> really quite a complicated function. This regularly bites people on limited
> targets; sometimes simply using printf is enough to cause your application
> to fail to link because it won't fit into RAM.
> If you don't need to print out floating point numbers, you might save a
> little code size by disabling that support in your eCos config. Otherwise,
> puts and putc are pretty lean and mean - you could save a lot of code and
> stack if you can avoid printf in your application.

Good points, but 'diag_printf()' is already quite stripped; no floating point.

Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list