This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil C Library

Hi Sir,
How do we use the keil C uVersion to produce a LIB, in which the addresses of functions and RAM will not be changed even after compilation.  The LIB is similar to BIN, but other programs are able to call its function using function names.  Can this be done?

  • You can't usually do that with a library. Libraries still consist of ordinary compiler object modules, i.e. they haven't been located to specific addresses yet.

    Nor is it actually necessary to have it absolutely located to allow other software to use it.

    What's worse, building a lib like that will generate seriously suboptimal code, because it essentially makes the overlay mechanism's work impossible. You'll get much larger code than you would with a proper library.

    If, after all these comments, you still want to fix the locations, you have to pass the library through the linker, then link the resulting absolute object module with the client program.