about header files used in score

Zhongjie zhurabbit at gmail.com
Mon Jun 15 15:28:09 UTC 2009


while, I think I got what you mean.
I think we just need to make sure the "OS proper" and BSP code do not use
some functions from C library. It is a little hard to tell which could be
used and which could not be used, I think.
One needs to know the detail implementation of the function in  the library

Is there a list about which method could be used in BSP code?

Regards
Zhongjie

On Mon, Jun 15, 2009 at 9:51 PM, Joel Sherrill <joel.sherrill at oarcorp.com>wrote:

> Zhongjie wrote:
>
>> When you build gcc, you could tell gcc whether you have a c library, when
>> you tell gcc you do not have
>> a c library, gcc will define "inhibit_libc", the stdio.h included by
>> libgcc2.c is in the section with "inhibit_libc"
>> defined, when you build gcc to *-elf- or *-eabi- , such arm-elf-gcc or
>> arm-eabi-gcc, you do not need any
>> c header files for the target.
>>
> While this is true for gcc in general, when you build an rtems toolset,
> you always build the C library at the same time.  This means gcc does
> have access to newlib.
>
> RTEMS "OS proper" code shouldn't be depending on the C Library
> much except for base C99 types and methods like the memory
> and string code which doesn't require OS support.
>
> It doesn't impact the design of the OS.  It is just a set of features
> that are maintained by someone else and always there.
> --joel
>
>>
>> Regards
>> Zhongjie
>> -----Original Message-----
>> *From*: Chris Johns <chrisj at rtems.org <mailto:
>> Chris%20Johns%20%3cchrisj at rtems.org<Chris%2520Johns%2520%253cchrisj at rtems.org>
>> %3e>>
>> *To*: Zhongjie <zhurabbit at gmail.com <mailto:
>> Zhongjie%20%3czhurabbit at gmail.com <Zhongjie%2520%253czhurabbit at gmail.com>
>> %3e>>
>> *Cc*: rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>> *Subject*: Re: about header files used in score
>> *Date*: Mon, 15 Jun 2009 09:10:59 +1000
>>
>> Zhongjie wrote:
>> > thanks for reply.
>> > I am just beginning studying RTEMS, the newlib depends on a limited >
>> number of low level functions.
>>
>> Welcome.
>>
>> > In fact, we do not need any C library to build gcc as a cross complier,
>> > like arm-elf-gcc, only enable the c
>> > language. what I concerns is that some part of RTEMS should can be >
>> compiled using those compiler.
>>
>> If you look in libgcc2.c you will see an include for stdio.h. I have
>> always needed some libc headers to build gcc.
>>
>> > Of course, with newlib support, RTEMS works well, it just a little >
>> confused logically for a beginner like me.
>> > as my understanding, it is a c library depends on a os, not a os depends
>> > a c library.
>> > I think we could define those types in rtems, then included by gcc and >
>> newlib, but not use those types directly in
>> > a c library header files. it will make the architecture more clearly.
>>
>> GCC and newlib have all the types defined for a specific target and RTEMS
>> uses them.
>>
>> Regards
>> Chris
>>
>>
>>
>
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel.sherrill at OARcorp.com        On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>  Support Available             (256) 722-9985
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20090615/8adec933/attachment-0001.html>


More information about the users mailing list