Interface between a C library and board support package

B

Bilgehan.Balban

Hi,

A simple question - it's not completely clear for me the interface
between a generic C library (such as glib or newlib) and a board
support package that implements it.

I've looked at newlib source code, and it is clear how it is done for
syscalls such as sys_open, sys_read, sys_write, the bsp supplies the
corresponding _open _read _write etc. in it's own implementation.

But how about malloc or printf? Could you briefly explain main points
of entry between a bsp and a C library in general?

Thanks,
Bahadir
 
J

Jack Klein

Hi,

A simple question - it's not completely clear for me the interface
between a generic C library (such as glib or newlib) and a board
support package that implements it.

The C language does not define any interface between the standard C
library and any operating system, BSP, BIOS, or anything else. It
defines an abstract API with defined properties and does not even
specify how it is implemented at that API level, let alone levels
beyond that.
I've looked at newlib source code, and it is clear how it is done for
syscalls such as sys_open, sys_read, sys_write, the bsp supplies the
corresponding _open _read _write etc. in it's own implementation.

This level of "under the hood" detail is actually off-topic here,
because it is not defined by the language and much of it can't be
implemented in standard C.
But how about malloc or printf? Could you briefly explain main points
of entry between a bsp and a C library in general?

Actually, no we can't, not here. The places you want to ask about
this are groups like support groups for your
particular compiler, such as support groups for your
particular OS, if you use one (if you are
using Linux in an embedded system, which is becoming popular these
days), and finally support groups for your particular embedded
processor, if there are any, such as for example
The C language literally does not specify how the library interfaces
to anything else, that is entirely up to the library provider.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top