Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

3.1.  The relationship between libgloss and newlib

Newlib is now divided into two parts. The main newlib directory contains the bulk of the code for the two main libraries, libc and libm, together with any architecture specific code for particular targets.

The libgloss directory contains code specific to particular platforms on which the library will be used, generally referred to as the Board Support Package (BSP). Any particular target architecture may have multiple BSPs, for example for different hardware platforms, for a simulator etc.

The target architecture specific code within the newlib directory may be very modest - possibly as little as an implementation of setjmp and a specification of the IEEE floating point format to use.

The board support package is more complex. It requires an implementation of eighteen system calls and the definition of one global data structure, although the implementation of some of those system calls may be completely trivial.

[Note]Note

The separation of BSP implementation into libgloss is relatively recent. Consequently the source tree contains a number of older target implementations where the BSP is entirely within newlib. When looking for examples, be sure to choose an architecture which has been implemented through libgloss. The OpenRISC 1000  implementation is one such architecture.

Embecosm divider strip