diff --git a/ipc-bios.bld b/ipc-bios.bld
index e6ee4f916b9720ed5e66da7aaf4011ca0ca27270..1dc417a90fe97f93a825acff26cf6283791bc695 100644 (file)
--- a/ipc-bios.bld
+++ b/ipc-bios.bld
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
/*
- * ======== ipc.bld ========
+ * ======== ipc-bios.bld ========
* This script is run prior to all build scripts. It sets host-system-
* independent values for targets and platforms, then it attempts to
* find the host-system-specific user.bld script that sets rootDirs.
*
* These settings may be a function of the following global variables:
*
- * environment a hash table of environment strings
+ * environment a hash table of environment strings
*
- * arguments an array of string arguments to the _config.bld script
- * initialized as follows:
- * arguments[0] - the file name of the _config.bld script
- * arguments[1] - the first argument specified in XDCARGS
- * :
- * arguments[n] - the n'th argument in XDCARGS
+ * arguments an array of string arguments to the script
+ * initialized as follows:
+ * arguments[0] - the file name of the script
+ * arguments[1] - the first argument specified in XDCARGS
+ * :
+ * arguments[n] - the n'th argument in XDCARGS
*
- * Build an alias for xdc.om.xdc.bld.BuildEnvironment
+ * Build an alias for xdc.om.xdc.bld.BuildEnvironment
*/
+var Build = xdc.useModule('xdc.bld.BuildEnvironment');
+var Pkg = xdc.useModule('xdc.bld.PackageContents');
+
/* Common ccopts suffix used for all C6x targets */
var c6xOpts = " -mi10 -mo -pdr -pden -pds=238 -pds=880 -pds1110 -g ";
"ti.targets.arm.elf.Arm9" : " -ms -g ",
"ti.targets.arm.elf.A8F" : " -ms -g ",
"ti.targets.arm.elf.A8Fnv" : " -ms -g ",
- "ti.targets.arm.elf.M3" : " -ms -g ",
+ "ti.targets.arm.elf.M3" : " --embed_inline_assembly -ms -pds=71",
"ti.targets.arm.elf.M4" : " -ms -g ",
"ti.targets.arm.elf.M4F" : " -ms -g ",
"gnu.targets.arm.A15F" : " -g "
};
-/* Enable building SMP-BIOS enabled libraries for targets that support it */
-xdc.module("ti.targets.arm.elf.M3").profiles["smp"] =
- xdc.module("ti.targets.arm.elf.M3").profiles["debug"];
-xdc.module("ti.targets.arm.elf.M4").profiles["smp"] =
- xdc.module("ti.targets.arm.elf.M4").profiles["debug"];
+var lnkOpts = {
+ "ti.targets.elf.C66" : " --cinit_compression=off",
+ "ti.targets.arm.elf.M4" : " --retain=.resource_table" +
+ " --cinit_compression=off"
+};
+
+var platform = "";
+var smpEnabled = true;
+var Bld_goal = "";
/* initialize local vars with those set in xdcpaths.mak (via XDCARGS) */
for (arg = 0; arg < arguments.length; arg++) {
+ /* split each arg into its '+' separated parts */
+ var configParts = arguments[arg].split(";");
+ // print("arg " + arg + " has " + configParts.length + " parts");
+
+ /* if "known args come in, filter them... else they're targets */
+ if (configParts[0].split("=")[0] == "PLATFORM") {
+ // print("FOUND PLATFORM ARG - " + configParts[0]);
+ platform = configParts[0].split("=")[1];
+ continue;
+ }
+ else if (configParts[0].split("=")[0] == "BIOS_SMPENABLED") {
+ // print("FOUND SMP_ENABLED ARG - " + configParts[0]);
+ smpEnabled = configParts[0].split("=")[1].match(/^1$/);
+ continue;
+ }
+ else if (configParts[0].split("=")[0] == "GOAL") {
+ Bld_goal = configParts[0].split("=")[1];
+ continue;
+ }
+
+ if (platform == "") {
+ platform = "NONE";
+ }
+
/*
* Get the compiler's installation directory.
* For "ti.targets.elf.C674=/vendors/c6x/7.2.0", we get "/vendors/c6x/7.2.0"
*/
- var targetName = arguments[arg].split("=")[0];
- var rootDir = arguments[arg].split("=")[1];
+ var targetName = configParts[0].split("=")[0];
+ var rootDir = configParts[0].split("=")[1];
/* only build for the specified compilers */
if (rootDir == "" || rootDir == undefined) {
continue;
}
+// print("Building '" + targetName + "' using '" + rootDir + "' ...");
+
var target = xdc.useModule(targetName);
target.rootDir = rootDir;
- target.ccOpts.suffix += ccOpts[targetName];
+ if (ccOpts[targetName] != undefined) {
+ target.ccOpts.suffix += ccOpts[targetName];
+ }
+ if (lnkOpts[targetName] != undefined) {
+ target.lnkOpts.suffix += lnkOpts[targetName];
+ }
+
+ /* for all the other parts, assign target.<left> = <right> */
+ for (var i = 1; i < configParts.length; i++) {
+ var modCfgParam = configParts[i].split("=")[0];
+ var modCfgValue = configParts[i].split("=")[1];
+ var modCfgIndex = modCfgParam.split(".");
+ var element = target;
+
+// print("Configuring target." + modCfgParam + " = " + modCfgValue);
+
+ for (j = 0; j < (modCfgIndex.length -1); j++) {
+ element = element[modCfgIndex[j]];
+ }
+ element[modCfgIndex[j]] = modCfgValue;
+ }
- /* Add appropriate platforms to build for based on target name */
+ /* Add appropriate platforms to build for based on target name */
if (targetName.match(/elf\.C674/)) {
- target.platforms = [ "ti.platforms.evmOMAPL138:DSP" ];
+ if (platform == 'OMAPL138') {
+ target.platforms.$add("ti.platforms.evmOMAPL138:DSP");
+ }
}
- if (targetName.match(/elf\.C66/)) {
- target.lnkOpts.suffix += " -cr";
- target.platforms = [
- "ti.platforms.simKepler"
- //"ti.platforms.evm6614:DSP"
- ];
+ if (targetName.match(/elf\.C66$/)) {
+ switch (platform) {
+ case '66AK2E':
+ target.platforms.$add("ti.platforms.evmC66AK2E:core0");
+ break;
+
+ case 'TCI6630':
+ target.platforms.$add("ti.platforms.evmTCI6630K2L:core0");
+ break;
+
+ case 'TCI6636':
+ target.platforms.$add("ti.platforms.evmTCI6636K2H:core0");
+ break;
+
+ case 'TCI6638':
+ target.platforms.$add("ti.platforms.evmTCI6638K2K:core0");
+ break;
+
+ case 'DRA7XX':
+ target.platforms.$add("ti.platforms.evmDRA7XX:dsp1");
+ target.platforms.$add("ti.platforms.evmDRA7XX:dsp2");
+ break;
+
+ case 'NONE':
+ /* okay, no platform specified */
+ break;
+
+ default:
+ print("Unknown platform, skipping " + platform);
+ break;
+ }
+ }
+
+ if (targetName.match(/elf\.C64T/)) {
+ if (platform == 'OMAP54XX') {
+ target.platforms.$add("ti.platforms.sdp5430:DSP");
+ }
+ }
+
+ if (targetName.match(/elf\.M4$/)) {
+ switch (platform) {
+ case 'OMAP54XX':
+ target.platforms.$add("ti.platforms.sdp5430:IPU");
+ break;
+
+ case 'DRA7XX':
+ target.platforms.$add("ti.platforms.evmDRA7XX:ipu2");
+ target.platforms.$add("ti.platforms.evmDRA7XX:ipu1");
+ break;
+
+ case 'NONE':
+ /* okay, no platform specified */
+ break;
+
+ default:
+ print("Unknown platform, skipping " + platform);
+ break;
+ }
}
Build.targets.$add(target);
}
+if (smpEnabled) {
+ /* Enable building SMP-BIOS enabled libraries for targets that support it */
+ if (Pkg.name.match(/^ti\.sdo\.(ipc|utils)/)) {
+ xdc.module("ti.targets.arm.elf.M3").profiles["smp"] =
+ xdc.module("ti.targets.arm.elf.M3").profiles["debug"];
+ xdc.module("ti.targets.arm.elf.M4").profiles["smp"] =
+ xdc.module("ti.targets.arm.elf.M4").profiles["debug"];
+ }
+}
/* lib/ is a generated directory that 'xdc clean' should remove */
-var Pkg = xdc.useModule('xdc.bld.PackageContents');
Pkg.generatedFiles.$add("lib/");
/*
/* -----------------------------------------------------------------------*/
/* make release files '.tar.gz' files (.tar is default) */
Pkg.attrs.compress = true;
+
+/* catch inadvertant use of unsupported data types */
+Pkg.attrs.defs = "-Dxdc__strict";