newlib without OS
Mark Salter
msalter@redhat.com
Thu Apr 25 09:40:00 GMT 2002
>>>>> Paulo Eduardo Ferreira de Castro writes:
> Hello.
> 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.
Sure this is fairly common, actually. And there's no reason you
couldn't get "printf" to work on an embedded system without OS.
> 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?
Check out the libgloss module. This is where the glue between
newlib and an embedded system (with or without OS/monitor) is
found. There are lots of examples there.
--Mark
More information about the Newlib
mailing list