index 4d04473a3f709698dc8ede5eff412dc29ae31d5e..f2b7a32a56b88cf1185ef628b8ddb2e85ddef20c 100644 (file)
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
defs: " -DSMP"
},
isas: [ "v7M", "v7M4" ],
+ devices: [
+ {
+ name: "_omap5",
+ defs: " -DOMAP5",
+ },
+ {
+ name: "_vayu",
+ defs: " -DVAYU",
+ },
+ ],
}
);
-/* pm library for DSP target */
+/* pm library for Tesla DSP target */
libArray.push(
{
name: "ti.pm",
}
);
+/* pm library for DRA7XX DSP target */
+libArray.push(
+ {
+ name: "ti.pm_dra7xx_dsp",
+ sources: [
+ "IpcPowerDsp_dra7xx",
+ ],
+ isas: [ "66" ],
+ devices: [
+ {
+ name: "_vayu",
+ defs: " -DVAYU",
+ },
+ ],
+ }
+);
+
+
/* ==== loop over array of libraries ==== */
for (var i = 0; i < libArray.length; i++) {
var lib = libArray[i];
/* ==== loop over all profiles ==== */
for (var profile in targ.profiles) {
- /* name = lib/profile/name.a+suffix */
- var name = "lib/" + profile + "/" + lib.name;
+ var devices = "devices" in lib ? lib.devices
+ : [{name: "", defs: ""}];
+
+ for (d = 0; d < devices.length; d++) {
- /* pass along library attributes specified in library array */
- var libAttrs = "libAttrs" in lib ? lib.libAttrs : {};
+ /* name = lib/profile/name_device.a+suffix */
+ var name = "lib/" + profile + "/" + lib.name + devices[d].name;
- /* must set profile explicitly */
- libAttrs.profile = profile;
+ /* pass along library attributes specified in library array */
+ var libAttrs = {};
- /* build the library */
- var library = Pkg.addLibrary(name, targ, libAttrs);
+ if ("libAttrs" in lib) {
+ libAttrs.defs = lib.libAttrs.defs + devices[d].defs;
+ }
+ else {
+ libAttrs.defs = devices[d].defs;
+ }
- /* add the source files */
- library.addObjects(lib.sources);
+ /* must set profile explicitly */
+ libAttrs.profile = profile;
+
+ /* build the library */
+ var library = Pkg.addLibrary(name, targ, libAttrs);
+
+ /* add the source files */
+ library.addObjects(lib.sources);
+ }
}
}
}