]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - ipc-bios.bld
Hide omaprpc on BIOS side under MmServiceMgr to improve client integration.
[ipc/ipcdev.git] / ipc-bios.bld
1 /*
2  * Copyright (c) 2011-2013, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
33 /*
34  * Generally there is no need to edit this file!
35  *
36  * This file controls which libraries are built, as well as compiler options
37  * to use.
38  *
39  * The contents of this file usually don't change, but having it in your
40  * ownership allows you to tweak your compiler options.  If you do change
41  * this file, however, on the next upgrade of the product we recommend
42  * that you take "ipc.bld" file as supplied by the upgrade and then merge
43  * your changes with it.
44  */
46 /*
47  *  ======== ipc-bios.bld ========
48  *  This script is run prior to all build scripts. It sets host-system-
49  *  independent values for targets and platforms, then it attempts to
50  *  find the host-system-specific user.bld script that sets rootDirs.
51  *
52  *  These settings may be a function of the following global variables:
53  *
54  *      environment a hash table of environment strings
55  *
56  *      arguments   an array of string arguments to the _config.bld script
57  *                  initialized as follows:
58  *                      arguments[0] - the file name of the _config.bld script
59  *                      arguments[1] - the first argument specified in XDCARGS
60  *                          :
61  *                      arguments[n] - the n'th argument in XDCARGS
62  *
63  *      Build       an alias for xdc.om.xdc.bld.BuildEnvironment
64  */
66 /* for M3-devices only (OMAP5), build using the SMP-enabled platform */
67 var build_smp = "1";
69 /* Common ccopts suffix used for all C6x targets */
70 var c6xOpts = " -mi10 -mo -pdr -pden -pds=238 -pds=880 -pds1110 -g ";
72 /*
73  * -mi10 => maximum cycles that interrupts may be disabled is 10
74  * -mo => place each function in subsection
75  * -pdr => show remarks
76  * -pden => show remark ids
77  * -pds=238 => ignore "controlling expression is constant"
78  * -pds=880 => ignore "unused parameter"
79  */
81 var ccOpts = {
82     "ti.targets.C28_large"            : " -mo -g ",
83     "ti.targets.C28_float"            : " -mo -g ",
85     "ti.targets.C64P"                 : c6xOpts,
86     "ti.targets.C64P_big_endian"      : c6xOpts,
87     "ti.targets.C674"                 : c6xOpts,
89     "ti.targets.elf.C64P"             : c6xOpts,
90     "ti.targets.elf.C64P_big_endian"  : c6xOpts,
91     "ti.targets.elf.C64T"             : " -mi10 -mo -pds=71",
92     "ti.targets.elf.C66"              : c6xOpts,
93     "ti.targets.elf.C66_big_endian"   : c6xOpts,
94     "ti.targets.elf.C674"             : c6xOpts,
96     "ti.targets.arm.elf.Arm9"         : " -ms -g ",
97     "ti.targets.arm.elf.A8F"          : " -ms -g ",
98     "ti.targets.arm.elf.A8Fnv"        : " -ms -g ",
99     "ti.targets.arm.elf.M3"           : " --embed_inline_assembly -ms -pds=71",
100     "ti.targets.arm.elf.M4"           : " -ms -g ",
101     "ti.targets.arm.elf.M4F"          : " -ms -g ",
103     "ti.targets.arp32.elf.ARP32"      : " -g ",
104     "ti.targets.arp32.elf.ARP32_far"  : " -g ",
106     "gnu.targets.arm.A8F"             : " -g ",
107     "gnu.targets.arm.A15F"            : " -g "
108 };
110 /* Enable building SMP-BIOS enabled libraries for targets that support it */
111 xdc.module("ti.targets.arm.elf.M3").profiles["smp"] =
112         xdc.module("ti.targets.arm.elf.M3").profiles["debug"];
113 xdc.module("ti.targets.arm.elf.M4").profiles["smp"] =
114         xdc.module("ti.targets.arm.elf.M4").profiles["debug"];
116 /* initialize local vars with those set in xdcpaths.mak (via XDCARGS) */
117 for (arg = 0; arg < arguments.length; arg++) {
118     /*
119      * Get the compiler's installation directory.
120      * For "ti.targets.elf.C674=/vendors/c6x/7.2.0", we get "/vendors/c6x/7.2.0"
121      */
122     var targetName = arguments[arg].split("=")[0];
123     var rootDir = arguments[arg].split("=")[1];
125     /* only build for the specified compilers */
126     if (rootDir == "" || rootDir == undefined) {
127         continue;
128     }
130     var target = xdc.useModule(targetName);
131     target.rootDir = rootDir;
132     target.ccOpts.suffix += ccOpts[targetName];
134     /* Add appropriate platforms to build for based on target name */
135     if (targetName.match(/elf\.C674/)) {
136         target.platforms = [ "ti.platforms.evmOMAPL138:DSP" ];
137     }
139     if (targetName.match(/elf\.C66/)) {
140         target.lnkOpts.suffix += " -cr";
141         target.platforms = [
142             //"ti.platforms.simKepler"
143             //"ti.platforms.evm6614:DSP"
144             "ti.platforms.evmTCI6638K2K"
145         ];
146     }
148     if (targetName.match(/elf\.C64T/)) {
149         target.lnkOpts.prefix += " -e=ti_sysbios_family_c64p_Hwi0";
150         /* NOTE: These platforms (from omapzoom) are local, custom: */
151         target.platforms = [
152                     //"ti.platform.omap4430.dsp",
153                     "ti.platform.omap54xx.dsp",
154                 ];
155     }
157     if (targetName.match(/elf\.M3/)) {
158         target.lnkOpts.prefix += " --retain=.resource_table";
159         target.lnkOpts.prefix += " --cinit_compression=off";
160         /* NOTE: These platforms (from omapzoom) are local, custom: */
161         /* Set default platform and list of all interested platforms for M3 */
162         if (build_smp == null || build_smp == "0") {
163             /* Helps boot times, plus unmasks issues w/ uninit'd vars */
164             target.lnkOpts.prefix +=  " --zero_init=off";
165             target.platforms = [
166                         //"ti.platform.omap4430.core0",
167                         "ti.platform.omap54xx.core0",
168                    ];
169         }
170         else {
171             target.platforms =  [
172                         //"ti.platform.omap4430.ipu",
173                         "ti.platform.omap54xx.ipu",
174                    ];
175         }
176     }
178     Build.targets.$add(target);
182 /* lib/ is a generated directory that 'xdc clean' should remove */
183 var Pkg = xdc.useModule('xdc.bld.PackageContents');
184 Pkg.generatedFiles.$add("lib/");
186 /*
187  * Some packages build for 'all profiles' - but that's too much to ship.
188  * Loop over all profiles in all Build.targets and remove everything
189  * except 'release' and 'debug'.
190  */
191 for (var t = 0; t < Build.targets.length; t++) {
192     for (prof in Build.targets[t].profiles) {
193        if ((prof != 'release') && (prof != 'debug') && (prof != 'smp')) {
194             delete Build.targets[t].profiles[prof];
195         }
196     }
199 /* -----------------------------------------------------------------------*/
200 /* make release files '.tar.gz' files (.tar is default) */
201 Pkg.attrs.compress = true;