To do so you have to modify the linker script that you're using.
You'll likely find it in your makefile in the line that links the final binary. The linker script is the file passed via the -T
option.
Once you have this, open it in a text editor and search for the SECTION
directive. You'll likely find a group called .text
in it which lists all sections that should go into the final text segment.
You can just add the code-section name of the SDK to this list. You can even use wildcards if the SDK has multiple sections with a common prefix (that happends quite a lot).
The same thing can be done using the .data
group and the .bss
group if nessesary.
After these modifications you can re-link your executable and the sections from the SDK library should go straight into the .text
and .data
groups.
If you want to, you can also create new groups in the MEMORY
declaration at the top of the linker file. That gives you direct control over the exact address that the linker will use. You can then redirect the SDK library sections right into the new memory regions that you've created and you have the libs always at the same address.