[ECOS] ecosconfig - disabling printf?

harri.siirtola@vtt.fi harri.siirtola@vtt.fi
Mon Nov 11 04:58:00 GMT 2002


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

ecosconfig remove libc_stdio

ecosconfig remove libc

If there's a printf in my application, I get the expected "implicit
declaration blah blah error". That's good, however

arm-elf-objdump -D MyApp | grep print

(MyApp is the executable for my application)

indicates that "vprintf" is still being used.


Which package(s)/option(s) do I need to inhibit to remove dependencies on
vprintf?

Scott
-------------------------------

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


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