thanks for reply.<br>I am just beginning studying RTEMS, the newlib depends on a limited number of low level functions.<br>In fact, we do not need any C library to build gcc as a cross complier, like arm-elf-gcc, only enable the c<br>
language. what I concerns is that some part of RTEMS should can be compiled using those compiler.<br>Of course, with newlib support, RTEMS works well, it just a little confused logically for a beginner like me.<br>as my understanding, it is a c library depends on a os, not a os depends a c library.<br>
I think we could define those types in rtems, then included by gcc and newlib, but not use those types directly in<br>a c library header files. it will make the architecture more clearly.<br><br>Regards<br>Zhongjie<br><div class="gmail_quote">
On Sun, Jun 14, 2009 at 6:01 AM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Zhongjie wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
I don't know whether am I wrong, but I don't think it is right to uesd header files like stdlib.h sys/types.h in the score?<br>
logically, we should not use any c library in the score and bsp.<br>
could any one tell me why?<br>
<br>
</blockquote>
<br></div>
The C library is part of the C language, for example you need libc headers to build gcc as libc is used by the compiler. Looking at the list of headers I would say most are after standard type support to improve the portability of RTEMS. Having said this we do try to limit the scope but sometimes things creep in. If you see something specific that concerns you please raise it.<br>

<br>
RTEMS needs a working C compiler and supported libc to work. With gcc it knows about the RTEMS thread model and so does newlib the C library we use with gcc.<br>
<br>
Regards<br>
Chris<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
here is a list of some of those files, there are more in bsp code.<br>
rtems/src/ratemonreportstatistics.c:#include <stdlib.h><br>
rtems/src/rtemsobjectgetclassinfo.c:#include <stdio.h><br>
rtems/include/rtems/rtems/types.h:#include <stdint.h><br>
rtems/include/rtems/rtems/object.h:#include <stdint.h><br>
rtems/include/rtems/rtems/region.h:#include <stddef.h><br>
score/cpu/sh/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/sh/rtems/score/types.h:#include <stdint.h><br>
score/cpu/c4x/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/c4x/rtems/score/types.h:#include <stdint.h><br>
score/cpu/arm/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/arm/rtems/score/types.h:#include <stdint.h><br>
score/cpu/avr/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/avr/rtems/score/types.h:#include <stdint.h><br>
score/cpu/bfin/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/bfin/rtems/score/types.h:#include <stdint.h><br>
score/cpu/i386/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/i386/rtems/score/types.h:#include <stdint.h><br>
score/cpu/m32c/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/m32c/rtems/score/types.h:#include <stdint.h><br>
score/cpu/m32c/context_init.c:#include <stdint.h><br>
score/cpu/m32r/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/m32r/rtems/score/types.h:#include <stdint.h><br>
score/cpu/m32r/context_init.c:#include <stdint.h><br>
score/cpu/m68k/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/m68k/rtems/score/types.h:#include <stdint.h><br>
score/cpu/lm32/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/lm32/rtems/score/types.h:#include <stdint.h><br>
score/cpu/mips/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/mips/rtems/score/types.h:#include <stdint.h><br>
score/cpu/unix/cpu.c:#include <stdio.h><br>
score/cpu/unix/cpu.c:#include <stdlib.h><br>
score/cpu/unix/cpu.c:#include <unistd.h><br>
score/cpu/unix/cpu.c:   * Avoid using the stdio section of the library.<br>
score/cpu/unix/cpu.c:         *  We avoid using the stdio section of the library.<br>
score/cpu/unix/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/unix/rtems/score/types.h:#include <stdint.h><br>
score/cpu/h8300/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/h8300/rtems/score/types.h:#include <stdint.h><br>
score/cpu/nios2/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/nios2/rtems/score/types.h:#include <stdint.h><br>
score/cpu/sparc/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/sparc/rtems/score/types.h:#include <stdint.h><br>
score/cpu/no_cpu/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/no_cpu/rtems/score/types.h:#include <stdint.h><br>
score/cpu/powerpc/rtems/score/types.h:#include <stdbool.h><br>
score/cpu/powerpc/rtems/score/types.h:#include <stdint.h><br>
score/cpu/powerpc/rtems/powerpc/registers.h:#include <stdint.h><br>
score/src/objectgetnameasstring.c:#include <stdlib.h><br>
score/src/objectgetnameasstring.c:#include <stdio.h><br>
score/src/timespecdivide.c:#include <stdio.h><br>
score/src/objectsetname.c:#include <stdlib.h><br>
score/src/objectsetname.c:#include <stdio.h><br>
score/src/heapwalk.c:#include <stdlib.h> /* abort */<br>
score/src/heapwalk.c:#include <stdio.h><br>
score/src/ts64divide.c:#include <stdio.h><br>
score/include/rtems/score/timespec.h:#include <stdint.h> /* uint32_t */<br>
score/include/rtems/system.h:#include <stddef.h><br>
score/include/rtems/system.h:#include <stdint.h><br>
sapi/src/posixapi.c:#include <sys/types.h><br>
sapi/src/itronapi.c:#include <sys/types.h><br>
sapi/include/confdefs.h:  #include <sys/types.h><br>
score/cpu/unix/cpu.c:#include <sys/types.h><br>
score/src/ts64lessthan.c:#include <sys/types.h><br>
score/src/timespectoticks.c:#include <sys/types.h><br>
score/src/timespecdivide.c:#include <sys/types.h><br>
score/src/timespecdividebyinteger.c:#include <sys/types.h><br>
score/src/ts64getseconds.c:#include <sys/types.h><br>
score/src/ts64getnanoseconds.c:#include <sys/types.h><br>
score/src/timespecgreaterthan.c:#include <sys/types.h><br>
score/src/timespecisvalid.c:#include <sys/types.h><br>
score/src/ts64equalto.c:#include <sys/types.h><br>
score/src/timespecsubtract.c:#include <sys/types.h><br>
score/src/ts64addto.c:#include <sys/types.h><br>
score/src/ts64set.c:#include <sys/types.h><br>
score/src/timespeclessthan.c:#include <sys/types.h><br>
score/src/timespecaddto.c:#include <sys/types.h><br>
score/src/ts64toticks.c:#include <sys/types.h><br>
score/src/ts64dividebyinteger.c:#include <sys/types.h><br>
score/src/ts64subtract.c:#include <sys/types.h><br>
score/src/ts64totimespec.c:#include <sys/types.h><br>
score/src/ts64divide.c:#include <sys/types.h><br>
score/src/ts64greaterthan.c:#include <sys/types.h><br>
score/src/ts64settozero.c:#include <sys/types.h><br>
<br>
BR.<br>
Zhongjie<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
</blockquote>
</blockquote></div><br>