How to convert MyLibName.a to MyLibName.bin?
Hello guys.
I have an interesting project where I need to load user applications (binaries) from external flash memory (FATFS) into RAM and run them from there. Also, I want to use a static library (let's call it libAPI.a for example) that should be available for the main application and user applications. This library must be placed in the MCU flash memory at a specific address (this is already solved by the linker script).
(This is what I need to get. Function addresses are not real. They are just needed to demonstrate this problem.)
I have often used libraries as static and I had no problem with that. But in this project, I have to share library code between the main application and one of the user applications loaded into RAM. Therefore, the approach described above is not a good idea, because at link time the linker only fetches functions from libAPI.a that are needed for the current project. Thus, the addresses of these functions are different each time.
(This is what I have in fact. Function addresses are not real. They are just needed to demonstrate this problem.)
My question is, how can I get libAPI.bin instead of libAPI.a where ALL of its functions will be available, and how can I link it to both projects - main and user application?
Thanks in advance for any advice or ideas!
