I don't know if any of you had faced this issue before but I, for the longest
time, couldn't figure how to link my own
libraries into the ARM application using XDC until now. Hopefully it helps you.
I wanted to link -lm -lc -lrt -ldl and my own library myLib.a into the
app.x470MV. After asking for help and reading
through the User Guide, I was finally able to figure it out. I had to first
create
a link cmd file myLink.cmd with the libraries I wanted to link into
app.x470MV:
-lm
-lc
-lrt
-ldl
./myLib.a
Then I created an XDC Linker template myLinkCmd.xdt with the following
contents:
% // include all the libraries the packages selected
% for (var i = 1; i < arguments.length; i++) {
-l"`arguments[i]`"
% }
/* include the original linker command file */
-l"myLink.cmd"
Then I specified in the program configuration script (app.cfg) that I want to
use this linker command file template
instead of one the XDC tools would provide by adding the following line to
app.cfg:
Program.linkTemplate = "./myLinkCmd.xdt";
Now when I do a gmake, the XDC linker file package/cfg/app_x470MV.xdl is
automatically generated with the libraries
I needed to link into my ARM application.
Before this, I manually edited the automatically-generated package.mak to add
my libraries but it would get lost if I changed any of XDC files (*.cfg, *.bld,
*.tcf, etc).
Hopefully, this help you guys.
Regards,
Andy_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source