Tool/software:
Hello,
I have a library (F021), that is used by both CPUs of a TMS320F28379D. Both CPUs use the same subset of functions from the library and the library has a load address in flash and a run address in RAM.
Now, to save some flash memory, I want one CPU (CPU2 in my example) to contain the library in flash and copy the library to RAM (as usual). As shared RAM can not be executed by both CPUs (what a pity), one copy of the shared library goes into GS0 (for example) and a second copy will be copied to GS1. Now, as both copies have different run addresses, I have to adjust at least on of the copies.
My current approach is, to link the library two times into an out file, with different run addresses, convert both out files to a hex file and then, use a hand written tool, to create a diff over both hex files. The difference is written as a C array to a text file.. CPU2 will then be linked with one copy of the shared library (with the load address for CPU1 for example) and the C array, that contains the differences between booth versions. During startup, CPU2 copies the shared library to GS0 and GS1 and the applies the differences to GS1.
Question: Is it possible to solve that problem, just using tools provided by TI? I've read all the linker documentation covering the --relocatable option, but have got enough details to see, if that way, would allow me to retrieve a table of code locations in the shared library that would have to be corrected, if the run address of the library will be changed.
best regards and thanks in advance,
Torsten