newlib without OS

Paulo Eduardo Ferreira de Castro
Thu Apr 25 08:47:00 GMT 2002


I have some conceptual questions. Any help will be appreciated.

Is it possible to use newlib for an embedded processor without
using an operational system? Certainly, several functions
shouldn't work, like "printf" or other I/O in general, because
they might depend on a specific hardware/OS. On the other hand,
I'd like to be able to use functions like "strcpy" (string.h),
"sin" (math.h) and "malloc" (would malloc work?!) without an OS.

Perhaps my question should be: what are the parts of newlib that
depend on an OS? Is it possible to build newlib without those
parts? Is there a special target string to represent the absence
of an OS? For instance, "sparc-linux" refers to Linux, but
perhaps "sparc-elf" could mean "please generate OS-independent
binaries for a sparc processor". Otherwise, what does "sparc-elf"

Is it correct to say that the only way by which an application or
library (newlib) can use the services of an OS is by the use of
system calls?

In newlib's source code, what are the directories or files that
are OS-specific? Are those files the only place where I would
find system calls?

Thanks a lot.

Paulo E. F. Castro
State University of Campinas, Brazil.

More information about the Newlib mailing list