-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbios.bld
149 lines (128 loc) · 5.6 KB
/
bios.bld
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*
* Copyright (c) 2013, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Generally there is no need to edit this file!
*
* This file controls which libraries are built, as well as compiler options
* to use.
*
* The contents of this file usually don't change, but having it in your
* ownership allows you to tweak your compiler options. If you do change
* this file, however, on the next upgrade of the product we recommend
* that you take "bios.bld" file as supplied by the upgrade and then merge
* your changes with it.
*/
/*
* ======== 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
*
* 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
*
* Build an alias for xdc.om.xdc.bld.BuildEnvironment
*/
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
var Pkg = xdc.useModule('xdc.bld.PackageContents');
var c6xOpts = " -mi10 -mo -pdr -pden -pds=238 -pds=880 -pds1110 -g ";
var ccOpts = {
"ti.targets.C28_large" : " -mo -g ",
"ti.targets.C28_float" : " -mo -g ",
"ti.targets.C64P" : c6xOpts,
"ti.targets.C64P_big_endian" : c6xOpts,
"ti.targets.C674" : c6xOpts,
"ti.targets.elf.C64P" : c6xOpts,
"ti.targets.elf.C64P_big_endian" : c6xOpts,
"ti.targets.elf.C64T" : c6xOpts,
"ti.targets.elf.C66" : c6xOpts,
"ti.targets.elf.C66_big_endian" : c6xOpts,
"ti.targets.elf.C674" : c6xOpts,
"ti.targets.arm.elf.Arm9" : " -ms -g ",
"ti.targets.arm.elf.A8Fnv" : " -ms -g ",
"ti.targets.arm.elf.M3" : " -ms -g ",
"ti.targets.arm.elf.M4" : " -ms -g ",
"ti.targets.arm.elf.M4F" : " -ms -g ",
"ti.targets.msp430.elf.MSP430X" : " -g ",
"ti.targets.msp430.elf.MSP430X_small" : " -g ",
"ti.targets.arp32.elf.ARP32" : " -g ",
"ti.targets.arp32.elf.ARP32_far" : " -g ",
"gnu.targets.arm.M3" : " -g ",
"gnu.targets.arm.M4" : " -g ",
"gnu.targets.arm.M4F" : " -g ",
"gnu.targets.arm.A8F" : " -g ",
"gnu.targets.arm.A9F" : " -g ",
"gnu.targets.arm.A15F" : " -g ",
"iar.targets.msp430.MSP430X_small" : "",
"iar.targets.arm.M3" : "",
"iar.targets.arm.M4" : "",
"iar.targets.arm.M4F" : "",
};
smpEnabled = true;
/* initialize local vars with those set in xdcpaths.mak (via XDCARGS) */
for (arg = 0; arg < arguments.length; arg++) {
if (arguments[arg].split("=")[0] == "BIOS_SMPENABLED") {
// print("FOUND SMP_ENABLED ARG - " + configParts[0]);
smpEnabled = arguments[arg].split("=")[1].match(/^1$/);
continue;
}
/*
* 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];
/* only build for the specified compilers */
if (rootDir == "" || rootDir == undefined) {
continue;
}
var target = xdc.useModule(targetName);
target.rootDir = rootDir;
target.ccOpts.suffix += ccOpts[targetName];
Build.targets.$add(target);
}
if (smpEnabled) {
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 */
Pkg.generatedFiles.$add("lib/");