This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: newlib without OS


>>>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]