New in newlib and porting

Jeff Johnston jjohnstn@redhat.com
Fri Jan 7 22:56:00 GMT 2011


On 01/07/2011 04:23 PM, Sergio wrote:
> Hi list.
> I'm new in newlib and I'm trying to port newlib 1.18 to specific
> hardware (embbedded without operation system).
> In google I find 2 alternatives:
> 1) Add syscalls.c to my project with my own version of some functions
> like _sbrk.
> 2) Use libgloss to make the port.
> Before reading about 2 alternatives, I think the correct options is
> the number 2. But .... where can I read how?
> I'm using gcc 4.4.4 on ARM, and compile newlib with standard options
> and --disable-newlib-supplied-syscalls
> Other question: I have my own linker script (for my specific board and
> processor) what I need to add to make
> newlib work?
>
> Thank's a lot
>
> Sergio

Yes option 2 is the correct way to do things now.

Take a look at:
http://www.embecosm.com/appnotes/ean9/ean9-howto-newlib-1.0.pdf

If you have a linker script, that goes in libgloss as well.  Take a look 
at libgloss/mn10300 for example which provides a sim.ld linker script to 
link for the simulator.

-- Jeff J.



More information about the Newlib mailing list