Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: RE: Create a xdc.bld.iTarget extension

$
0
0

I think that creating a new target just to add one library is too much unnecessary work. The easiest way to accomplish the addition of the library is to create a new package, let's call it systemelectronics.libPkg, and instruct the user to add the following to a config script:
xdc.loadPackage("systemelectronics.libPkg");
The package can either build the library or simply deliver it. If the library is already built, getLibs() function in package.xs would be simple:
function getLibs(prog) {
    return ("myLibs/myLib.lib");
}

If you build the library from the sources, then you don't need getLibs. The default version of it would work for you. But your package.bld would be now:
for (var i = 0; i < Build.targets.length; i++) {
    var targ = Build.targets[i];

    var lib = Pkg.addLibrary('lib/' + Pkg.name, targ);
    lib.addObjects(Pkg.modules);
}

You probably want to build only for the A8Fnv target.


Viewing all articles
Browse latest Browse all 25965

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>