[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RTEMS and libc support

LuÃs Henriques wrote:

I've been trying to understand how RTEMS supports libc.  It seems that
the support to the stdin, stdout and stderr file descriptors is tightly
implemented in the RTEMS source tree.

Is there a way to create an application that does not use libc support
code provided with RTEMS?  I do not want my application to link with
object files such as open, close, write, etc.  Is it possible to remove
these dependencies?

Without modifying any standard BSP support code in RTEMS, I would probably start by overriding a few key routines that the BSP calls to initialize the C library.

See libbsp/shared/bsp_postdriver_hook and libbsp/shared/bsplibc.c.
I think that if you provide an empty bsp_postdriver_hook function,
you will avoid stdin, etc..

bsplibc.c is where some more stuff gets initialized that you might
be interested in disabling.

Once we are sure what the set of functions involved is, we can
try to figure out how to do it more generally.

Thanks in advance for any help.

Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985