[ECOS] ecosconfig - disabling printf?

Scott Dattalo scott@dattalo.com
Mon Nov 11 07:28:00 GMT 2002

On Mon, 11 Nov 2002 harri.siirtola@vtt.fi wrote:

> Scott wrote:
> --------------------------------------------
> I'm at a point now in my project where I'd like to disable some of the
> ecos components so that I can reduce the memory footprint. One option in
> particular I'd like to remove is printf -- However, it's not clear which
> option (or set of options) that I must change to disable printf. For
> example, I tried to remove several packages:...

> -------------------------------

On Mon, 11 Nov 2002 harri.siirtola@vtt.fi wrote:

> Scott, how about using some #defines for disabling it? I've been using
> #define printf
> #define vprintf
> // Other versions of printf if needed
> #endif
> This way the compiler won't generate calls to printing functions and the 
> linker won't include the code into your executable. And you don't have to 
> have separate configurations for the cases.


It's not that simple. To implement your suggestion requires that the eCos 
source be modified. The whole idea of the CDL is to configure eCos - not 
modify it. I'm fairly certain there's a way to disable printf (and 
friends) via CDL. Since posting the original query I've deleted every 
package that I could. However, I'm starting to suspect that there's a 
dependency buried in the bowels of the arm/at91 source code that is 
forcing (v)printf to be linked with my executable. If that's the case, 
then well, I'll modify the eCos source in the short term. Then when 
T[io]m's patches are committed to CVS I'll re-visit the issue.


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

More information about the Ecos-discuss mailing list