]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/commitdiff
Build: Entry point alignment to ti.ipc.remoteproc
authorChris Ring <cring@ti.com>
Tue, 16 Jul 2013 17:22:07 +0000 (10:22 -0700)
committerChris Ring <cring@ti.com>
Fri, 26 Jul 2013 03:48:23 +0000 (20:48 -0700)
Move the logic ensuring entry point alignment from
ipc-bios.bld into ti.ipc.remoteproc.  This is a commonly
used package in environments where these alignment
constraints exist.

This also enables customer executables to 'freely' meet
the necessary entry point alignment requirements without
explicitly doing anything.

Note that because of the clever technique employed to ensure
alignment, namely setting the entry point to BIOS's
already-aligned HWI vector table, we only override the entry
point this flag if BIOS is used.  If BIOS is not used, it
becomes the application's responsibility to ensure any
device-specific entry point alignment constraints are met.

A nice side effect is that ipcdev can now build executables
that don't have a BIOS dependency.

ipc-bios.bld
packages/ti/ipc/remoteproc/linkcmd.xdt [new file with mode: 0644]
packages/ti/ipc/remoteproc/package.bld
packages/ti/ipc/remoteproc/package.xs

index 5ec2a7ee908e6731080bc1897af82320b7301068..5e3501528283f9f38a09efbed5979f42d1a93773 100644 (file)
@@ -108,9 +108,7 @@ var ccOpts = {
 };
 
 var lnkOpts = {
-    "ti.targets.elf.C66"              : " -e=ti_sysbios_family_c64p_Hwi0" +
-                                        " --cinit_compression=off",
-    "ti.targets.elf.C64T"             : " -e=ti_sysbios_family_c64p_Hwi0",
+    "ti.targets.elf.C66"              : " --cinit_compression=off",
     "ti.targets.arm.elf.M4"           : " --retain=.resource_table" +
                                         " --cinit_compression=off"
 };
diff --git a/packages/ti/ipc/remoteproc/linkcmd.xdt b/packages/ti/ipc/remoteproc/linkcmd.xdt
new file mode 100644 (file)
index 0000000..857c622
--- /dev/null
@@ -0,0 +1,57 @@
+%%{
+/*
+ *  Copyright (c) 2008-2013, Texas Instruments Incorporated
+ *
+ *  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.
+ */
+%%}
+
+%if (xdc.module('ti.sysbios.BIOS').$used) {
+    /*
+     *  Set entry point to the HWI reset vector 0 to automatically satisfy
+     *  any alignment constraints for the boot vector.
+     */
+%if ((Program.build.target.$name.match(/C64P/)) ||
+%    (Program.build.target.$name.match(/C674/)) ||
+%    (Program.build.target.$name.match(/C64T/)) ||
+%    (Program.build.target.$name.match(/C66/)) ||
+%    (Program.build.target.$name.match(/C67P/))) {
+%    if (Program.build.target.$name.match(/elf/)) {
+    -eti_sysbios_family_c64p_Hwi0
+%    }
+%    else {
+    -e_ti_sysbios_family_c64p_Hwi0
+%    }
+%}
+
+    /*
+     * We just modified the entry point, so suppress "entry point symbol other
+     * than _c_int00 specified" warning.
+     */
+    --diag_suppress=10063
+%}
\ No newline at end of file
index 6d0372c7a0e74b610a93e7afc3cf9ff1d119db95..aceab31801a848ac70a0b6af30d9655db720741e 100644 (file)
@@ -44,6 +44,7 @@ var Pkg = xdc.useModule('xdc.bld.PackageContents');
 Pkg.attrs.exportSrc = true;
 
 Pkg.otherFiles = ["package.bld", "rsc_types.h",
+        "linkcmd.xdt",
         "rsc_table_omapl138.h",
         "rsc_table_tci6614.h",
         "rsc_table_tci6614_v3.3.h",
index 42a355a62f72c6387c32700a22fb2aa0745a9e33..63343199353ef9f9339eaf6430bd811e16dbf09a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012, Texas Instruments Incorporated
+ * Copyright (c) 2011-2013, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -64,3 +64,11 @@ function getLibs(prog)
 
     return (lib);
 }
+
+/*
+ *  ======== Package.getSects ========
+ */
+function getSects()
+{
+    return "ti/ipc/remoteproc/linkcmd.xdt";
+}