summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af2f24a)
raw | patch | inline | side by side (parent: af2f24a)
author | Jianzhong Xu <xuj@ti.com> | |
Tue, 13 Mar 2018 19:40:51 +0000 (15:40 -0400) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Mon, 19 Mar 2018 17:38:27 +0000 (12:38 -0500) |
installer_builder/rtsc/ti/pasdk/Settings.xdc.xdt | [new file with mode: 0644] | patch | blob |
installer_builder/rtsc/ti/pasdk/config.bld | [new file with mode: 0644] | patch | blob |
installer_builder/rtsc/ti/pasdk/package.bld | [new file with mode: 0644] | patch | blob |
installer_builder/rtsc/ti/pasdk/package.xdc | [new file with mode: 0644] | patch | blob |
installer_builder/rtsc/ti/pasdk/package.xs | [new file with mode: 0644] | patch | blob |
installer_builder/rtsc/ti/pasdk/pasdkver.h.xdt | [new file with mode: 0644] | patch | blob |
diff --git a/installer_builder/rtsc/ti/pasdk/Settings.xdc.xdt b/installer_builder/rtsc/ti/pasdk/Settings.xdc.xdt
--- /dev/null
@@ -0,0 +1,48 @@
+
+%%{
+/*!
+ * This template implements the Settings.xdc
+ */
+ /* Versioning */
+ var ver = this;
+ for each(i=0;i<ver.length;i++)
+ {
+ if(String(ver[i]).length < 2)
+ {
+ ver[i]="0"+ver[i];
+ }
+ }
+
+ var packageVersion = "\""+ver[0]+"."+ver[1]+"."+ver[2]+"."+ver[3]+"\"";
+
+%%}
+
+module Settings
+{
+ config string pasdkVersionString = `packageVersion`;
+ /*! This variable is to control the SoC type selection.
+ * By default this variable is set to NULL.
+ *
+ * To use LLD for the selected device, add the following lines to config
+ * file and set the deviceType correctly:
+ *
+ * var pasdkSettings = xdc.useModule ('ti.pasdk.Settings');
+ * pasdkSettings.socType = "k2g";
+ *
+ */
+ metaonly config string socType = "";
+
+ /*! This variable is to control the device library type selection.
+ * By default this variable is set to release.
+ *
+ * To use the debug/release library, add the following lines to config
+ * file and set the library profile accordingly:
+ *
+ * var pasdkSettings = xdc.useModule ('ti.pasdk.Settings');
+ * pasdkSettings.libProfile = "debug";
+ *
+ */
+ metaonly config string libProfile = "release";
+
+}
+
diff --git a/installer_builder/rtsc/ti/pasdk/config.bld b/installer_builder/rtsc/ti/pasdk/config.bld
--- /dev/null
@@ -0,0 +1,21 @@
+/******************************************************************************
+ * FILE PURPOSE: Build configuration Script for the PASDK
+ ******************************************************************************
+ * FILE NAME: config.bld
+ *
+ * DESCRIPTION:
+ * This file contains the build configuration script for the PASDK.
+ * Note: this file is a dummy file for now as PASDK source code is compiled
+ * by makefiles.
+ *
+ * Copyright (C) 2014-2016, Texas Instruments, Inc.
+ *****************************************************************************/
+
+/* Create the SoC List */
+var socs = {
+ /* device independent libraries */
+ k2g :
+ {
+ }
+};
+
diff --git a/installer_builder/rtsc/ti/pasdk/package.bld b/installer_builder/rtsc/ti/pasdk/package.bld
--- /dev/null
@@ -0,0 +1,28 @@
+/******************************************************************************
+* FILE PURPOSE: Build description for the Performance Audio SDK
+ ******************************************************************************
+ * FILE NAME: package.bld
+ *
+ * DESCRIPTION:
+ * This file contains the build specification and description for the PASDK
+ * Version number must be provided as an argument as below:
+ * xdc XDCARGS="version=1_3_0_0" release
+ *
+ * Copyright (C) 2018, Texas Instruments, Inc.
+ *****************************************************************************/
+
+var version = [0,0,0,0]; /* version number */
+
+version[0] = arguments[0][8];
+version[1] = arguments[0][10];
+version[2] = arguments[0][12];
+version[3] = arguments[0][14];
+
+/* Generate Settings.xdc */
+var tplt = xdc.loadTemplate("./Settings.xdc.xdt");
+tplt.genFile("./Settings.xdc",version);
+
+/* Generate pasdkver.h */
+var tplt = xdc.loadTemplate("./pasdkver.h.xdt");
+tplt.genFile("./pasdkver.h",version);
+
diff --git a/installer_builder/rtsc/ti/pasdk/package.xdc b/installer_builder/rtsc/ti/pasdk/package.xdc
--- /dev/null
@@ -0,0 +1,15 @@
+/******************************************************************************
+ * FILE PURPOSE: Package specification file for the Performance Audio SDK
+ ******************************************************************************
+ * FILE NAME: package.xdc
+ *
+ * DESCRIPTION:
+ * This file contains the package specification for the PASDK
+ *
+ * Copyright (C) 2012-2018, Texas Instruments, Inc.
+ *****************************************************************************/
+
+package ti.pasdk[1, 0, 0, 0] {
+ module Settings;
+}
+
diff --git a/installer_builder/rtsc/ti/pasdk/package.xs b/installer_builder/rtsc/ti/pasdk/package.xs
--- /dev/null
@@ -0,0 +1,90 @@
+/*******************************************************************************
+* FILE PURPOSE: Implementation of XDC getLibs() method for Performance Audio SDK
+ *******************************************************************************
+ * FILE NAME: package.xs
+ *
+ * Copyright (C) 2018, Texas Instruments, Inc.
+ *****************************************************************************/
+
+/*
+ * ======== Package.getLibs ========
+ * This function is called when a program's configuration files are
+ * being generated and it returns the name of a library appropriate
+ * for the program's configuration.
+ */
+
+function getLibs(prog)
+{
+ var suffix = prog.build.target.suffix;
+
+ var name = this.$name + ".a" + suffix;
+ var socType = this.Settings.socType;
+
+ socType = socType.toLowerCase();
+
+ var lib = java.lang.System.getenv("LIBDIR");
+
+ /* If NULL, default to "lib" folder */
+ if (lib == null)
+ {
+ lib = "./lib";
+ } else {
+ print ("\tSystem environment LIBDIR variable defined : " + lib);
+ }
+
+ var socTypes = [
+ 'k2g',
+ ];
+
+ /* Get the SOC */
+ for each (var soc in socTypes)
+ {
+ if (socType.equals(soc))
+ {
+ lib = lib + "/" + soc;
+ name = this.$name + ".a" + suffix;
+ break;
+ }
+ }
+
+ /* Get target folder, if applicable */
+ if ( java.lang.String(suffix).contains('66') )
+ lib = lib + "/c66";
+ else if (java.lang.String(suffix).contains('a15') )
+ lib = lib + "/a15";
+ else
+ throw new Error("\tUnknown target for: " + this.packageBase + lib);
+
+ var libProfiles = ["debug", "release"];
+ /* get the configured library profile */
+ for each(var profile in libProfiles)
+ {
+ if (this.Settings.libProfile.equals(profile))
+ {
+ lib = lib + "/" + profile;
+ break;
+ }
+ }
+
+ /* Get library name with path */
+ lib = lib + "/" + name;
+ if (java.io.File(this.packageBase + lib).exists()) {
+ print ("\tLinking with library " + this.$name + ":" + lib);
+ return lib;
+ }
+
+ /* Could not find any library, throw exception */
+ throw new Error("\tLibrary not found: " + this.packageBase + lib);
+}
+
+/*
+ * ======== package.close ========
+ */
+function close()
+{
+ if (xdc.om.$name != 'cfg') {
+ return;
+ }
+}
+
+
diff --git a/installer_builder/rtsc/ti/pasdk/pasdkver.h.xdt b/installer_builder/rtsc/ti/pasdk/pasdkver.h.xdt
--- /dev/null
@@ -0,0 +1,100 @@
+%%{
+/*!
+ * This template implements the pasdkver.h
+ */
+ /* Versioning */
+ var ver = this;
+ var ver1 = [00,00,00,00];
+ var ver2 = [00,00,00,00];
+
+ for each(i=0;i<ver.length;i++)
+ {
+ if(String(ver[i]).length < 2)
+ {
+ ver1[i]="0"+ver[i];
+ }
+ else
+ {
+ ver1[i] = ver[i];
+ }
+
+ ver2[i] = Number(ver[i]).toString(16).toUpperCase();
+
+ if(String(ver2[i]).length < 2)
+ {
+ ver2[i]="0"+ver2[i];
+ }
+ }
+
+ var versionStr = "\""+"PASDK Revision: "+ver1[0]+"."+ver1[1]+"."+ver1[2]+"."+ver1[3]+"\"";
+ var versionID = "(0x"+ver2[0]+ver2[1]+ver2[2]+ver2[3]+")";
+
+%%}
+#ifndef _PASDKVER_H
+#define _PASDKVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ============================================================= */
+/**
+ * @file pasdkver.h
+ *
+ * path ti/pasdk/pasdkver.h
+ *
+ * @brief PASDK Version Definitions
+ *
+ * ============================================================
+ * Copyright (c) Texas Instruments Incorporated 2018
+ *
+ * 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.
+ *
+*/
+
+/**
+ * @brief This is the PASDK Version. Version numbers are encoded in the following
+ * format:
+ * 0xAABBCCDD -> Arch (AA); API Changes (BB); Major (CC); Minor (DD)
+ */
+#define PASDK_VERSION_ID `versionID`
+
+/**
+ * @brief This is the version string which describes the PASDK along with the
+ * date and build information.
+ */
+#define PASDK_VERSION_STR `versionStr`
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _PASDKVER_H */