Oops, I made a mistake; sorry, the bottom instructions I sent earlier don't
work.
After trying again, I finally figured it out; it was tedious, basically, I
had to search through the whole dvevm development directory to find the answer.
All I had to do was add the following line to the package.bld file in my ARM
project directory:
MVArm9.lnkOpts.suffix = "./mylib.a -lm -lc -lrt -ldl " +
MVArm9.lnkOpts.suffix;
From this, the XDC tool automatically generates the package/cfg/app_x470MV.xdl
library dependency file, which includes all the necessary XDC, CE, dsplink, etc,
as well as my custom libraries. I couldnt believe that the XDC Users Guide
or
any other document didnt mention this.
Regards,
Andy
----- Original Message ----
From: Andy Ngo <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, February 8, 2007 2:37:04 PM
Subject: Finally figured out how to link my own libraries into ARM executable
using XDC
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_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source