Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » How to add pre-built library to RTSC-ed one ?
How to add pre-built library to RTSC-ed one ? [message #778546] Fri, 13 January 2012 08:23 Go to next message
Naoki Kawada is currently offline Naoki KawadaFriend
Messages: 10
Registered: January 2012
Location: Tokyo
Junior Member
Hello,

In the config.bld, we can add C source objects to RTSC-ed library.

var Build = xdc.useModule('xdc.bld.BuildEnvironment');
var Pkg = xdc.useModule('xdc.bld.PackageContents');
 
/* ---- what to build ---- */
 
for each (var targ in Build.targets) {
    Pkg.addLibrary("lib/isqrt_loop", targ).addObjects(["isqrt_loop.c"]);
}


With such a script, the C sources are compiled and then added to RTSC library appropriately.

Now, I would like to know how to add pre-built library to RTSC library.
In this case, how can I add "pre-built.lib" to isqrt_loop.lib ?

Best Regards,
Kawada
Re: How to add pre-built library to RTSC-ed one ? [message #778741 is a reply to message #778546] Fri, 13 January 2012 18:34 Go to previous messageGo to next message
Sasha Slijepcevic is currently offline Sasha SlijepcevicFriend
Messages: 115
Registered: July 2009
Senior Member
Kawada,
each package can supply multiple libraries when being used in a configuration. It's done through the function getLibs, which is implemented in package.xs. In many cases, a package does not implement getLibs because the default implementation can handle the most common case with only one library per package.
Here is a guide for adding getLibs in cases where a package has only pre-built libraries, which is not exactly the same as your case, but the guide should help you write your getLibs.
There is another user guide for writing getLibs, which mostly deals with the cases where your package supports multiple targets and can possibly be invoked for build targets that your package does not support.
Re: How to add pre-built library to RTSC-ed one ? [message #778963 is a reply to message #778741] Sat, 14 January 2012 08:37 Go to previous message
Naoki Kawada is currently offline Naoki KawadaFriend
Messages: 10
Registered: January 2012
Location: Tokyo
Junior Member
Hello Sasha,

Thanks for the quick response ! I got it. Making RTSC package for pre-built lib, and using "require" keyword for it in wrapper package would solve my issue.

Best Regards,
Kawada

Previous Topic:new XML(...) error
Next Topic:xdc -j4
Goto Forum:
  


Current Time: Thu Apr 25 01:11:20 GMT 2024

Powered by FUDForum. Page generated in 0.03912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top