- What is the difference between Runtime library and standard library (For c language)?
The C standard library is a set of functions that every conforming hosted C implementation makes available to programs. In its case, "library" means an abstract collection of functions, not a linkable object file.
A runtime library, on the other hand, is a binary library file or files containing function implementations that the implementation wishes to provide to all programs. It is specific to a given C implementation. Runtime libraries typically contain implementations of at least some of the standard library functions, but they may omit some or even all of those, and they may include functions not specified to belong to the standard library.
Depending on the implementation, some or even all of the standard library functions, and perhaps even more functions, are made available to programs by default even when no libraries are specifically linked.
- I would like to write a code for microcontroller that will use standard c library. Previously I used to work in custom defined library environment. But now I have to integrate Standard C libraries. I am going to use Greenhills compiler. My questioins are: Do I have to integrate standard C library or Runtime library? how to get these libraries and integrate into the system?
If you're writing for a microcontroller then that's probably a standalone implementation, not a hosted one. Standalone implementations are not required to provide most standard library functions, which I guess is the point. In any event, standard library vs. runtime library is a red herring. What you need is implementations of the functions you actually use. In all likelihood, those form a smallish subset of the standard library functions, plus some of your functions.
As to where to get them, if Greenhills does not provide a version for you then there are lightweight implementations of the C standard library available, such as µClibc (== microcontroller libc). Google can probably help you find more. If you choose to integrate one of these then be sure to abide by its licensing terms. You may need your management to approve that.