How was newlib supposed to have been used?
Andrew STUBBS
andrew.stubbs@st.com
Fri Jan 18 23:06:00 GMT 2008
Dave Korn wrote:
> Well, actually I was going to leave Luke to work on that! Maybe porting
> RTEMS to his board might be the easiest way to get Ada running; option 2 would
> be to just try and hack/stub out the bits of runtime that aren't supported;
> option 3 would be to try and build gnat/newlib and just add the missing
> support. It's not easy to say from this end which is likely to be the
> quickest solution for Luke's situation - but it's probably possible to say
> that porting glibc would be the slowest!
All one needs to do is implement the syscalls. The stuff in
newlib/sys/<arch>. Most of these (read, write, etc.) can be simply
stubed out - there's no I/O or clock or filesystem on a bare metal
system (well, one assumes the app deals with that sort of thing).
As a bare minimum one needs to implement _sbrk, or else malloc won't
work, but that can be simply copied from an existing port (assuming a
similar memory layout).
Andrew
More information about the Newlib
mailing list