This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ecosconfig - disabling printf?


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

<snip>
> -------------------------------

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

> 
> Scott, how about using some #defines for disabling it? I've been using
> 
> #if NO_PRINTF
> #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.

Harri,

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.

Scott


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]