I am using Silicon-Labs 8051F321 with PK51 (C51 + LX51) and use Silabs' library USBXpress to operate the USB. I need to locate the Library code in specific location (since two applications are using the same library). All the linker commands that are related to location are locating source code but NOT LIBRARY code. How can I locate the Library code?
"All the linker commands that are related to location are locating source code" Eh??? The Linker knows nothing about source code!
Just in case it was not clear enought: If there is a source code (C or ASM) it is possible to locate its code wherever I want within the code space. However, when I was trying to locate library code within a specific code range - I could not do it. What is the way to locate library code? Does any of you know if it is possible with PK51?
What you'll have to do is to run the linker a total of three times. Once to turn your library into a single object module, with a fixed location, then once more for each project using this "static shared library", to link the project to the library. If that library needs interrupts, this will become even more complicated. It may even become impossible.