Adding a bsp/OS to newlib

Norbert Lange
Mon Mar 25 19:28:00 GMT 2013


I compiled and patched newlib for a toolchain last year, I did this  
primary in a rather hackish way. By now we run into some limitations and I  
would like to add a own "plattform" to newlib.
the idea is simply to have a common codebase for a few toolchains, or if  
possible some choice with linking the system library (lnosys, lfullsys).
I am still lost on how to archive this, there are a few resources on the  
net (eg.  
but they dont answer the questions I have.

The target is arm, and I probably could add everything in the libgloss/arm  
directory but I fail to see how this will add the option of chossing  
different system libs.
Or I could use a new folder in newlib/libc/sys, but I still dont know how  
you generate libraries fromt that or if thats even possible. Also there  
are several locks used and I dont know how to override these  

So, probably best to summarize what I want/expect:
A single source-tree, which through configure options can be instructed to  
A toolchain using newlib, where newlib will build multiple system libs  
during compilation, libnosys, libmysys, eventually more. The OS is based  
on FreeRTOS, so ideally the implementation is not tied to a single cpu  
A barebone toolchain for single-threaded processors/dsps

I suppose I wont be able to fullfill both roles with a single toolchain,  
since eg. locks and threads are something deeply tied into the executeable  
(and probably I want different configurations anyway).

So how would I get along with a arm-mysys-eabi configuration? where would  
eg. OS code for the locks end up, where would the BSP be placed - own  
directory in libgloss or arm?
and where is it defined which bsps get build, are the arm, mysys and nosys  
directories built?
Would be thankfull for an outline of the steps involved.

kind regards, Norbert

More information about the Newlib mailing list