How was newlib supposed to have been used?

Luke A. Guest laguest@archeia.com
Sat Jan 19 01:09:00 GMT 2008


On Fri, 2008-01-18 at 14:08 +0000, Andrew STUBBS wrote:
> 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).

Ok.

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

I think that this is only really useful if you are aiming for an
embedded target with a set amount of memory. I'm not, I'm aiming for PC
to start with, this could have any amount of memory.

Thanks,
Luke.




More information about the Newlib mailing list