]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/pcie-lld.git/commitdiff
sync with latest device library implementation from uart
authorJohn Dowdal <jdowdal@ti.com>
Tue, 8 Sep 2015 20:17:16 +0000 (16:17 -0400)
committerJohn Dowdal <jdowdal@ti.com>
Tue, 8 Sep 2015 20:17:16 +0000 (16:17 -0400)
15 files changed:
Settings.xdc.xdt
build/buildlib.xs
config.bld
docs/Module.xs
example/sample/am571x/armv7/bios/PCIE_AM571X_armExampleProject.txt
example/sample/am571x/armv7/bios/pcie_sample.cfg
example/sample/am571x/c66/bios/PCIE_AM571XC66BiosExampleProject.txt
example/sample/am571x/c66/bios/pcie_sample.cfg
example/sample/am572x/armv7/bios/PCIE_AM572X_armExampleProject.txt
example/sample/am572x/armv7/bios/pcie_sample.cfg
example/sample/am572x/c66/bios/PCIE_AM572XC66BiosExampleProject.txt
example/sample/am572x/c66/bios/pcie_sample.cfg
package.bld
package.xs
src/Module.xs

index 8f13c29020ca475ed2a12cf880e68331cb62835f..09ed5a146bc3adc20413938da859a0fbc5e732dc 100644 (file)
@@ -29,11 +29,13 @@ module Settings
      * file and set the deviceType correctly:\r
      * \r
      *      var pcie = xdc.useModule ('ti.drv.pcie.Settings');\r
-     *      pcie.deviceType = "k2k";\r
+     *      pcie.socType = "k2k";\r
      * \r
      * If this is not set, then hyperlink will use device independent\r
      * library where user must supply compiled pcie_device.obj\r
      */\r
+    metaonly config string socType = "";\r
+    /*! Backwards compatible version of socType w/ keystone 2 */\r
     metaonly config string deviceType = "";\r
 }\r
 \r
index 61b6ef8458fa28f5565070c1e732f843cfbf8fd2..a944e2fa38b014ebce3b9bb85b6d724e73e50195 100644 (file)
@@ -113,6 +113,8 @@ function createMake(makefile)
       \r
       makefile.writeLine("\n# Output for prebuilt generated libraries");\r
       makefile.writeLine("export LIBDIR ?= ./lib");\r
+      /* use sectti.exe from path */\r
+      makefile.writeLine("export SECTTI ?= sectti");\r
 \r
       /* Create INCDIR from XDCPATH */\r
     \r
@@ -195,7 +197,7 @@ function createMake(makefile)
       makefile.writeLine("clean_package:")\r
       for each (var libdir in socs)\r
       {         \r
-        makefile.writeLine("\t$(RMDIR) $(LIBDIR)/"+libdir.name.toString()+"/*/");  \r
+        makefile.writeLine("\t$(RMDIR) $(LIBDIR)/"+"/*/");  \r
       }    \r
       makefile.writeLine("\t$(RMDIR) package/cfg");            \r
    }\r
@@ -220,7 +222,7 @@ function createLibMake(device, makelibname,targetname, objectPath)
    var cmdprefix;\r
    var targetDir;\r
    var stringname=String(targetname).replace("(xdc.bld.ITarget.Module)","");\r
-   \r
+\r
    switch(stringname)\r
    {\r
     case String(C66LE):\r
@@ -241,6 +243,18 @@ function createLibMake(device, makelibname,targetname, objectPath)
       targetDir="armv7";\r
       targetname=A15LE;\r
       break;\r
+    case String(A9LE):\r
+      tooldir="TOOLCHAIN_PATH_A9";\r
+      cmdprefix="CROSS_TOOL_PRFX";\r
+      targetDir="armv7";\r
+      targetname=A9LE;\r
+      break;\r
+    case String(A8LE):\r
+      tooldir="TOOLCHAIN_PATH_A8";\r
+      cmdprefix="CROSS_TOOL_PRFX";\r
+      targetDir="armv7";\r
+      targetname=A8LE;\r
+      break;\r
     case String(M4LE):\r
       tooldir="TOOLCHAIN_PATH_M4";\r
       cmdprefix="";\r
@@ -276,8 +290,8 @@ function createLibMake(device, makelibname,targetname, objectPath)
     libmakefile.writeLine("#");\r
     libmakefile.writeLine("empty =");\r
     libmakefile.writeLine("space =$(empty) $(empty)");\r
-  \r
-    if (targetname.name == "A15F")\r
+    \r
+    if ((targetname.name == "A15F") || (targetname.name == "A9F") || (targetname.name == "A8F"))\r
     {\r
     \r
         if(stringname.match("gnu.targets"))\r
@@ -304,7 +318,7 @@ function createLibMake(device, makelibname,targetname, objectPath)
         libmakefile.writeLine("INTERNALDEFS = -MD -MF $@.dep");\r
         libmakefile.writeLine("INTERNALLINKDEFS = -o $@ -m $@.map");  /* TBD */\r
         libmakefile.writeLine("OBJDIR =  $(LIBDIR)/" + device.toString() + "/" + targetDir +"/obj"); \r
-        libmakefile.writeLine("DEVOBJDIR = $(LIBDIR)/" + device.toString() + "/" + targetDir +"/obj");\r
+    \r
     }\r
     else\r
     {\r
@@ -334,7 +348,7 @@ function createLibMake(device, makelibname,targetname, objectPath)
             java.lang.System.exit(1);\r
 \r
         }\r
-\r
+       \r
         libmakefile.writeLine("INCS = -I. -I$(strip $(subst ;, -I,$(subst $(space),\\$(space),$(INCDIR)))) -I$("+tooldir+")/include");\r
         libmakefile.writeLine("OBJEXT = o"+targetname.suffix); \r
         libmakefile.writeLine("AOBJEXT = s"+targetname.suffix);     \r
@@ -346,9 +360,7 @@ function createLibMake(device, makelibname,targetname, objectPath)
         libmakefile.writeLine("INTERNALDEFS = -D"+stringname.replace(/\./g,"_")+"  -DMAKEFILE_BUILD -eo.$(OBJEXT) -ea.$(AOBJEXT) -fr=$(@D) -fs=$(@D) -ppa -ppd=$@.dep");\r
         libmakefile.writeLine("INTERNALLINKDEFS = -o $@ -m $@.map");\r
         libmakefile.writeLine("OBJDIR =  $(LIBDIR)/" + device.toString() + "/" + targetDir +"/obj"); \r
-        libmakefile.writeLine("DEVOBJDIR = $(LIBDIR)/" + device.toString() + "/" + targetDir +"/obj");\r
     }\r
-\r
    \r
  return libmakefile;\r
 \r
@@ -403,7 +415,7 @@ function makeAddObjects(srcString, makefilename, srcfiles, flags,fileExt, target
  \r
  if(fileExt == "c")\r
  {\r
-   if (targetName.name == "A15F")\r
+   if ((targetName.name == "A15F") || (targetName.name == "A9F") || (targetName.name == "A8F"))\r
    {\r
     makefilename.writeLine("\t$(RM) $@.dep");\r
     makefilename.writeLine("\t$(CC) $(CFLAGS_INTERNAL) $("+compileflagstring+") $(INTERNALDEFS) $(INCS) $< -o $@");\r
@@ -447,11 +459,19 @@ function makeAddObjects(srcString, makefilename, srcfiles, flags,fileExt, target
  *  Utility function which will build a specific library\r
  **************************************************************************/\r
 var makefilelocal;\r
-function buildLibrary (device, libOptions, libName, target, libFiles) \r
+function buildLibrary (socName, isDmaSoc, isSoc, libOptions, libName, target, libFiles) \r
 {\r
     var targetDir;\r
 \r
     if (target.name == "A15F")\r
+    {\r
+        targetDir = "armv7";\r
+    }\r
+       else if (target.name == "A9F")\r
+    {\r
+        targetDir = "armv7";\r
+    }\r
+       else if (target.name == "A8F")\r
     {\r
         targetDir = "armv7";\r
     }\r
@@ -464,10 +484,22 @@ function buildLibrary (device, libOptions, libName, target, libFiles)
         targetDir = "c66";\r
     }\r
     \r
-        \r
-    var lldFullLibraryPath = "./lib/" + device.toString() + "/" + targetDir + "/" + libName;\r
-    var lldFullBuildPath = "./build/" + device.toString() + "/" + targetDir + "/" + libName;\r
-    var lldFullLibraryPathMake = "$(LIBDIR)/" + device.toString() + "/" + targetDir + "/" + libName;\r
+    /* Derive the operating system and soc names */\r
+    if (isDmaSoc == "true") {\r
+        var libNameExp = libName+"."+socName+".dma";\r
+        targetDir = socName+"/"+targetDir;\r
+    }\r
+    else if (isSoc == "true") {\r
+        var libNameExp = libName+"."+socName;\r
+        targetDir = socName+"/"+targetDir;\r
+    }\r
+    else  {\r
+        var libNameExp = libName;\r
+    }\r
+\r
+    var lldFullLibraryPath = "./lib/" + targetDir +"/" + libNameExp;\r
+    var lldFullBuildPath = "./build/" + targetDir +"/" + libNameExp;\r
+    var lldFullLibraryPathMake = "$(LIBDIR)/" + targetDir +"/" + libNameExp;\r
 \r
     /* Create Main make file in the root of package folder */\r
     makefilelocal = createMake(makefilelocal);\r
@@ -481,7 +513,7 @@ function buildLibrary (device, libOptions, libName, target, libFiles)
     makefilelocal.writeLine(libMake+": FORCE\n\t$(MAKE) -f "+lib+".mk $@");                                 \r
 \r
     /* Create Library make file in the lib folder */\r
-    var makefilelib= createLibMake(device, lib+".mk",target,objectPath);  \r
+    var makefilelib= createLibMake(socName, lib+".mk",target,objectPath);  \r
 \r
     /* Rule to clean library in main makefile */\r
     makefilelocal.writeLine("# Rule to clean "+libMake+" library");                                              \r
@@ -500,22 +532,22 @@ function buildLibrary (device, libOptions, libName, target, libFiles)
         var extension = srcFile.substr(dot,srcFile.length);      \r
         if(extension == ".c")\r
         {\r
-          cfiles.push(srcFile);\r
+            cfiles.push(srcFile);\r
         }\r
         else if(extension == ".sa")\r
         {\r
-          safiles.push(srcFile);\r
+            safiles.push(srcFile);\r
         }\r
         else if(extension == ".asm")\r
         {\r
-           afiles.push(srcFile);\r
+            afiles.push(srcFile);\r
         }\r
         else\r
         {\r
-           print("ERROR: Unsupported file extension");\r
-           java.lang.System.exit(1);\r
+            print("ERROR: Unsupported file extension");\r
+            java.lang.System.exit(1);\r
         }\r
-     }\r
+    }\r
     if(cfiles.length > 0)\r
     {                                                \r
       makeAddObjects("COMMONSRC",makefilelib,cfiles,libOptions,"c",target, "$(OBJDIR)");\r
@@ -534,35 +566,34 @@ function buildLibrary (device, libOptions, libName, target, libFiles)
 \r
     makefilelib.writeLine(librule);\r
     makefilelib.writeLine("\t@echo archiving $? into $@ ...");\r
-    makefilelib.writeLine("\tif [ ! -d $(LIBDIR)/" + device.toString() + "/" + targetDir + " ]; then $(MKDIR) $(LIBDIR)/" + device.toString() + "/" + targetDir + " ; fi;"); \r
+    makefilelib.writeLine("\tif [ ! -d $(LIBDIR)/"+targetDir+" ]; then $(MKDIR) $(LIBDIR)/"+targetDir+" ; fi;"); \r
        makefilelib.writeLine("\t$(ARIN) $(ARFLAGS_INTERNAL) $@ $?");\r
-    makefilelib.close();   \r
+       makefilelib.close();   \r
 \r
     /* Create the Epilogue; which executes after all the builds are completed. \r
      * This is used to generate the benchmark information for the built library. \r
      * Also add the benchmarking information file to the package. */\r
-\r
     /* Put the temp file in object directory since javascript doesn't have a built in tmpname, \r
      * and don't want --jobs=# with # > 1 to result in collisions */\r
-    var libName = lldFullLibraryPath + ".a" + target.suffix;\r
-    var tempFile = libName + ".xml";\r
-    Pkg.makeEpilogue += ".libraries: benchmarking_"  + device.toString() + "_" + target.suffix + "\n";\r
-    Pkg.makeEpilogue += "benchmarking_" + device + "_" + target.suffix + ": " + libName;\r
+    var libFullName = lldFullLibraryPath + ".a" + target.suffix;\r
+    var tempFile = libFullName + ".xml";\r
+    Pkg.makeEpilogue += ".libraries: " + libFullName +  "_size.txt\n";\r
+    Pkg.makeEpilogue += libFullName +  "_size.txt: " + libFullName + "\n";\r
     if ( java.lang.String(target.name).contains('66') )\r
     {    \r
-        Pkg.makeEpilogue += "\n\t $(C6X_GEN_INSTALL_PATH)/bin/ofd6x -x " + libName + " > " + tempFile;\r
-        Pkg.makeEpilogue += "\n\t sectti " + tempFile + " > " + libName +  "_size.txt";\r
+        Pkg.makeEpilogue += "\n\t $(C6X_GEN_INSTALL_PATH)/bin/ofd6x -x " + libFullName + " > " + tempFile;\r
+        Pkg.makeEpilogue += "\n\t $(SECTTI) " + tempFile + " > " + libFullName +  "_size.txt";\r
         Pkg.makeEpilogue += "\n\t $(RM) " + tempFile + "\n\n";\r
     }   \r
     else if (target.name == "M4")\r
     {\r
-        Pkg.makeEpilogue += "\n\t $(TOOLCHAIN_PATH_M4)/bin/armofd -x " + libName + " > " + tempFile;\r
-        Pkg.makeEpilogue += "\n\t sectti " + tempFile + " > " + libName +  "_size.txt";\r
+        Pkg.makeEpilogue += "\n\t $(TOOLCHAIN_PATH_M4)/bin/armofd -x " + libFullName + " > " + tempFile;\r
+        Pkg.makeEpilogue += "\n\t $(SECTTI) " + tempFile + " > " + libFullName +  "_size.txt";\r
         Pkg.makeEpilogue += "\n\t $(RM) " + tempFile + "\n\n";\r
     }\r
     else\r
     {\r
-        Pkg.makeEpilogue += "\n\t $(TOOLCHAIN_PATH_A15)/bin/$(CROSS_TOOL_PRFX)size " + libName + " > " + libName + "_size.txt";\r
+        Pkg.makeEpilogue += "\n\t $(TOOLCHAIN_PATH_A15)/bin/$(CROSS_TOOL_PRFX)size " + libFullName + " > " + libFullName + "_size.txt";\r
     }                \r
     Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix + "_size.txt";\r
     Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullBuildPath + ".a" + target.suffix + ".mk";\r
@@ -570,71 +601,11 @@ function buildLibrary (device, libOptions, libName, target, libFiles)
 \r
     /* We need to clean after ourselves; extend the 'clean' target to take care of this. */\r
     Pkg.makeEpilogue += "\nclean::\n";\r
-    Pkg.makeEpilogue += "\t$(RM) " + lldFullBuildPath + ".a" + target.suffix + "_size.txt\n";    \r
-    Pkg.makeEpilogue += "\t$(RMDIR) " + "$(LIBDIR)/" + device.toString() + "/" + targetDir +" \n\n";\r
+    Pkg.makeEpilogue += "\t$(RM) " + lldFullBuildPath + ".a" + target.suffix + "_size.txt\n"; \r
+    Pkg.makeEpilogue += "\t$(RMDIR) " + "$(LIBDIR)/" + targetDir + "/ \n\n";\r
 \r
     return lib;\r
 }\r
 \r
-/**************************************************************************\r
- * FUNCTION NAME : createMiniPkg\r
- **************************************************************************\r
- * DESCRIPTION   :\r
- *  The function is responsible for creating the mini tar package\r
- *  The MINI package has the following files:- \r
- *      - Driver Source Files. \r
- *      - Header files (exported and internal driver files) \r
- *      - Simple Makefiles. \r
- **************************************************************************/\r
-function createMiniPkg(pkgName)\r
-{\r
-    /* Get the package Name. */\r
-    var packageRepository = xdc.getPackageRepository(Pkg.name);\r
-    var packageBase       = xdc.getPackageBase(Pkg.name);\r
-    var packageName       = packageBase.substring(packageRepository.length + 1);\r
-\r
-    /* Convert the Package name by replacing back slashes with forward slashes. This is required because\r
-     * otherwise with long names the tar is unable to change directory. */\r
-    var newPkgName = new java.lang.String(packageRepository);\r
-    var newPkgRep  = newPkgName.replace('\\', '/');\r
-\r
-    /* Step1: Create the MINI Package and add the simple Big and Little Endian Makefiles to the package */\r
-    Pkg.makeEpilogue += "release: mini_pkg\n";\r
-    Pkg.makeEpilogue += "mini_pkg:\n";\r
-    Pkg.makeEpilogue += "\t tar -C " + "\"" + newPkgRep + "\"" + " -cf packages/" + pkgName + "_mini.tar " + \r
-                        packageName + "simpleC66LE.mak " + packageName + "simpleC66BE.mak\n";\r
-                        \r
-\r
-    /* Step2: Add the exported header files to the package */\r
-    var includeFiles = libUtility.listAllFiles (".h", ".", false);\r
-    for (var k = 0 ; k < includeFiles.length; k++)\r
-        Pkg.makeEpilogue += "\t tar -C " + "\"" + newPkgRep + "\"" + " -rf packages/" + pkgName + "_mini.tar " + \r
-                        packageName + includeFiles[k] + "\n";\r
-\r
-    /* Step3: Add the internal header files to the package */\r
-    includeFiles = libUtility.listAllFiles (".h", "include", true);\r
-    for (var k = 0 ; k < includeFiles.length; k++)\r
-        Pkg.makeEpilogue += "\t tar -C " + "\"" + newPkgRep + "\"" + " -rf packages/" + pkgName + "_mini.tar " + \r
-                        packageName + includeFiles[k] + "\n";\r
-\r
-    /* Step4: Add the PDSP firmware files to the package */\r
-    includeFiles = libUtility.listAllFiles (".h", "firmware", true);\r
-    for (var k = 0 ; k < includeFiles.length; k++)\r
-        Pkg.makeEpilogue += "\t tar -C " + "\"" + newPkgRep + "\"" + " -rf packages/" + pkgName + "_mini.tar " + \r
-                        packageName + includeFiles[k] + "\n";\r
-\r
-    /* Step5: Add the device specific files to the package */\r
-    includeFiles = libUtility.listAllFiles (".c", "device", true);\r
-    for (var k = 0 ; k < includeFiles.length; k++)\r
-        Pkg.makeEpilogue += "\t tar -C " + "\"" + newPkgRep + "\"" + " -rf packages/" + pkgName + "_mini.tar " + \r
-                        packageName + includeFiles[k] + "\n";\r
-\r
-    /* Step4: Add the driver source files to the package; the filter should have generated a source listing */\r
-    Pkg.makeEpilogue += "\t tar -C " + "\"" + newPkgRep + "\"" + " -T src.lst -rf packages/" + pkgName + "_mini.tar " + "\n";\r
-\r
-    /* Ensure that we clean up the mini package */\r
-    Pkg.makeEpilogue += "clean::\n";\r
-    Pkg.makeEpilogue += "\t $(RM) packages/" + pkgName + "_mini.tar\n";\r
-}\r
 \r
 \r
index 8372ae38e27068c51410b7b1e3aec80bd047e996..4ff1013e578269457cac20e7a5a470bc7489b066 100644 (file)
-/******************************************************************************\r
- * FILE PURPOSE: Build configuration Script for the PCIE LLD\r
- ******************************************************************************\r
- * FILE NAME: config.bld\r
- *\r
- * DESCRIPTION: \r
- *  This file contains the build configuration script for the PCIE LLD\r
- *  and is responsible for configuration of the paths for the various \r
- *  tools required to build the driver.\r
- *\r
- * Copyright (C) 2012-2015, Texas Instruments, Inc.\r
- *****************************************************************************/\r
-\r
-/* Get the Tools Base directory from the Environment Variable. */\r
-var c66ToolsBaseDir = java.lang.System.getenv("C6X_GEN_INSTALL_PATH");\r
-var m4ToolsBaseDir  = java.lang.System.getenv("TOOLCHAIN_PATH_M4");\r
-var a15ToolsBaseDir = java.lang.System.getenv("TOOLCHAIN_PATH_A15");\r
-\r
-/* Check if we need to create the Makefiles? */\r
-var miniBuild = java.lang.System.getenv("MINI_PACKAGE");\r
-\r
-/* Get the extended debug flags */\r
+/******************************************************************************
+ * FILE PURPOSE: Build configuration Script for the PCIE LLD
+ ******************************************************************************
+ * FILE NAME: config.bld
+ *
+ * DESCRIPTION: 
+ *  This file contains the build configuration script for the PCIE LLD
+ *  and is responsible for configuration of the paths for the various 
+ *  tools required to build the driver.
+ *
+ * Copyright (C) 2012-2015, Texas Instruments, Inc.
+ *****************************************************************************/
+
+/* Get the Tools Base directory from the Environment Variable. */
+var c66ToolsBaseDir = java.lang.System.getenv("C6X_GEN_INSTALL_PATH");
+var m4ToolsBaseDir  = java.lang.System.getenv("TOOLCHAIN_PATH_M4");
+var a15ToolsBaseDir = java.lang.System.getenv("TOOLCHAIN_PATH_A15");
+var a9ToolsBaseDir  = java.lang.System.getenv("TOOLCHAIN_PATH_A9");
+var a8ToolsBaseDir  = java.lang.System.getenv("TOOLCHAIN_PATH_A8");
+
+/* Get the extended debug flags for C66x, 
+ * did not change the name for backwards compatibilty */
 var extDbgFlags = java.lang.System.getenv("EXTDBGFLAGS");
-\r
-/* Get the base directory for the PCIE LLD Package */\r
-var pcielldPath = new java.io.File(".//").getPath();\r
-\r
-/* This is the part Number for which the PCIE LLD is being created */\r
-var pcielldPartNumber = java.lang.System.getenv("PARTNO");\r
-\r
-if(pcielldPartNumber == null)\r
-{\r
-    pcielldPartNumber = "keystone2";\r
-}\r
-\r
-/* Include Path */\r
-var pcielldIncPath = " -I" + pcielldPath;\r
-\r
-/* Configure the PCIE LLD Version Information */\r
-/* 3 steps: remove SPACE and TAB, convert to string and split to make array */\r
-var pcielldReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');\r
-\r
-/* PCIE LLD Coverity Analysis: Check the environment variable to determine if Static\r
- * Analysis has to be done on the driver Code base or not? */\r
-var pcieCoverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
-\r
-/* C66 ELF compiler configuration for Little Endian Mode. */\r
-var C66LE            = xdc.useModule('ti.targets.elf.C66');\r
-C66LE.rootDir       = c66ToolsBaseDir;\r
-C66LE.ccOpts.prefix  = "-mo -o3 -q -k -eo.o";\r
+
+/* Get the extended debug flags for A15 */
+var extDbgFlags_a15 = java.lang.System.getenv("EXTDBGFLAGS_A15");
+
+/* Get the extended debug flags for A8 */
+var extDbgFlags_a8 = java.lang.System.getenv("EXTDBGFLAGS_A8");
+
+/* Get the extended debug flags for A9 */
+var extDbgFlags_a9 = java.lang.System.getenv("EXTDBGFLAGS_A9");
+
+/* Get the extended debug flags for M4 */
+var extDbgFlags_m4 = java.lang.System.getenv("EXTDBGFLAGS_M4");
+
+/* Get the base directory for the PCIE LLD Package */
+var driverPath = new java.io.File(".//").getPath();
+
+/* Include Path */
+var lldIncludePath = " -I" + driverPath;
+
+/* Configure the PCIE LLD Version Information */
+/* 3 steps: remove SPACE and TAB, convert to string and split to make array */
+var driverReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');
+
+/* C66 ELF compiler configuration for Little Endian Mode. */
+var C66LE           = xdc.useModule('ti.targets.elf.C66');
+C66LE.rootDir       = c66ToolsBaseDir;
+C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o";
 if(extDbgFlags)     
-    C66LE.ccOpts.prefix = C66LE.ccOpts.prefix + " " + extDbgFlags; \r
-\r
-/* C66 ELF compiler configuration for Big Endian Mode. */\r
-var C66BE            = xdc.useModule('ti.targets.elf.C66_big_endian');\r
-C66BE.rootDir       = c66ToolsBaseDir;\r
-C66BE.ccOpts.prefix  = "-mo -o3 -q -k -eo.o -DBIGENDIAN";\r
+    C66LE.ccOpts.prefix = C66LE.ccOpts.prefix + " " + extDbgFlags; 
+
+/* C66 ELF compiler configuration for Big Endian Mode. */
+var C66BE           = xdc.useModule('ti.targets.elf.C66_big_endian');
+C66BE.rootDir       = c66ToolsBaseDir;
+C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o -DBIGENDIAN";
 if(extDbgFlags)     
     C66BE.ccOpts.prefix = C66BE.ccOpts.prefix + " " + extDbgFlags;
-\r
-/* ARMv7 A15 compiler configuration */\r
-var A15LE            = xdc.useModule('gnu.targets.arm.A15F');\r
-A15LE.rootDir        = a15ToolsBaseDir;\r
-A15LE.ccOpts.prefix  = "-mno-unaligned-access -c -mtune=cortex-a15 -marm -DDRA7xx -gstrict-dwarf -Wall -D__ARMv7 -D_LITTLE_ENDIAN=1";\r
-\r
-/* M4 ELF compiler configuration for Little Endian Mode. */\r
-var M4LE            = xdc.useModule('ti.targets.arm.elf.M4');\r
-M4LE.rootDir        = m4ToolsBaseDir;\r
-M4LE.ccOpts.prefix  = "-o4 -qq -pdsw255 -DMAKEFILE_BUILD";\r
-\r
-/* Check if we need to run the STATIC Analysis or not? */\r
-var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
-\r
-/* Setup the Coverity Filters to perform Static Analysis. */\r
-if (coverityAnalysis == "ON") {\r
-    var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");\r
-    var cfgBase = xdc.getPackageBase("tisb.coverity.filters") + "cfg";\r
-\r
-    var coverityFilter = [\r
-    {\r
-        moduleName: "tisb.coverity.filters.Coverity",\r
-        params: {\r
-            cfgDir:  cfgBase,  // The Coverity configuration file directory\r
-            rootDir: coverityInstallPath,\r
-            outDir: xdc.csd() + "cov_out",\r
-            analyzeLibs: true\r
-        }\r
-    },\r
-    ];\r
-\r
-    /* Run the coverity filters on the LE Build only. */\r
-    C66LE.profiles["release"].filters = coverityFilter;\r
-}\r
-\r
-if (miniBuild == "ON") \r
-{\r
-\r
-    var makeC66LEFilter = {\r
-        moduleName: "build.filter.Make",\r
-        params: {\r
-          makefileName: "simpleC66LE.mak",\r
-        }\r
-    };\r
-\r
-    C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter;\r
-\r
-\r
-    var makeC66BEFilter = {\r
-        moduleName: "build.filter.Make",\r
-        params: {\r
-          makefileName: "simpleC66BE.mak",\r
-        }\r
-    }; \r
-\r
-    C66BE.profiles["release"].filters[C66BE.profiles["release"].filters.length++] = makeC66BEFilter;\r
-}\r
-\r
-/* List all the build targets here. */\r
-Build.targets = [ C66LE, C66BE, M4LE, A15LE];\r
-
-/* device name (k2?) is inserted between first an second element of this
+
+/* ARMv7 A15 compiler configuration */
+var A15LE            = xdc.useModule('gnu.targets.arm.A15F');
+A15LE.rootDir        = a15ToolsBaseDir;
+A15LE.ccOpts.prefix  = "-mno-unaligned-access -c -mtune=cortex-a15 -marm -DDRA7xx -gstrict-dwarf -Wall -D__ARMv7 -D_LITTLE_ENDIAN=1";
+if(extDbgFlags_a15)     
+    A15LE.ccOpts.prefix = A15LE.ccOpts.prefix + " " + extDbgFlags_a15; 
+    
+/* ARMv7 A9 compiler configuration */
+var A9LE            = xdc.useModule('gnu.targets.arm.A9F');
+A9LE.rootDir        = a9ToolsBaseDir;
+A9LE.ccOpts.prefix  = "-mno-unaligned-access -c -mtune=cortex-a9 -marm -DDRA7xx -gstrict-dwarf -Wall -D__ARMv7 -D_LITTLE_ENDIAN=1";
+if(extDbgFlags_a9)     
+    A9LE.ccOpts.prefix = A9LE.ccOpts.prefix + " " + extDbgFlags_a9; 
+
+/* ARMv7 A8 compiler configuration */
+var A8LE            = xdc.useModule('gnu.targets.arm.A8F');
+A8LE.rootDir        = a8ToolsBaseDir;
+A8LE.ccOpts.prefix  = "-mno-unaligned-access -c -mtune=cortex-a8 -marm -DDRA7xx -gstrict-dwarf -Wall -D__ARMv7 -D_LITTLE_ENDIAN=1";
+if(extDbgFlags_a8)     
+    A8LE.ccOpts.prefix = A8LE.ccOpts.prefix + " " + extDbgFlags_a8; 
+
+/* M4 ELF compiler configuration for Little Endian Mode. */
+var M4LE            = xdc.useModule('ti.targets.arm.elf.M4');
+M4LE.rootDir        = m4ToolsBaseDir;
+M4LE.ccOpts.prefix  = "-o4 -qq -pdsw255 -DMAKEFILE_BUILD";
+if(extDbgFlags_m4)
+    M4LE.ccOpts.prefix = M4LE.ccOpts.prefix + " " + extDbgFlags_m4; 
+
+
+/* soc name (am?) is inserted between first an second element of this
    list to construct device file name for each device */
-var deviceConstruct = [ "soc/", "/src/pcie_soc.c" ];\r
-\r
-var soc_all =\r
-{\r
-    /* soc name */\r
-    name: "",\r
-    \r
-    /* Library options */\r
-    copts: "",\r
-              \r
-    /* target list */\r
-    targets: [ C66LE, C66BE, M4LE, A15LE]\r
-};\r
-\r
-var soc_k2k =\r
-{\r
-    /* soc name */\r
-    name: "k2k",\r
-    \r
-    /* Library options */\r
-    copts: " -DDEVICE_K2K",\r
-              \r
-    /* target list */\r
-    targets: [ C66LE, C66BE ]\r
-};\r
-\r
-var soc_k2h =\r
-{\r
-    /* soc name */\r
-    name: "k2h",\r
-    \r
-    /* Library options */\r
-    copts: " -DDEVICE_K2H",\r
-              \r
-    /* target list */\r
-    targets: [ C66LE, C66BE ]\r
-};\r
-\r
-var soc_k2l =\r
-{\r
-    /* soc name */\r
-    name: "k2l",\r
-    \r
-    /* Library options */\r
-    copts: " -DDEVICE_K2L",\r
-              \r
-    /* target list */\r
-    targets: [ C66LE, C66BE ]\r
-};\r
-\r
-var soc_k2e =\r
-{\r
-    /* soc name */\r
-    name: "k2e",\r
-    \r
-    /* Library options */\r
-    copts: " -DDEVICE_K2E",\r
-              \r
-    /* target list */\r
-    targets: [ C66LE, C66BE ]\r
-};\r
-\r
-var soc_am572x =\r
-{\r
-    /* soc name */\r
-    name: "am572x",\r
-    \r
-    /* Library options */\r
-    copts: " -DSOC_AM572x",\r
-              \r
-    /* target list */\r
-    targets: [ C66LE, C66BE, M4LE, A15LE]\r
-};\r
-\r
-var soc_am571x =\r
-{\r
-    /* soc name */\r
-    name: "am571x",\r
-    \r
-    /* Library options */\r
-    copts: " -DSOC_AM571x",\r
-              \r
-    /* target list */\r
-    targets: [ C66LE, C66BE, M4LE, A15LE]\r
-};\r
-\r
-/* Build soc-independent library only for now */\r
-var socs = [soc_all];\r
-\r
-\r
+var deviceConstruct = [ "soc/", "/src/pcie_soc.c" ];
+
+/* Create the SoC List  */
+var socs = { 
+    /* device independent libraries */
+    all :
+    {
+        /* Build this library */
+        build: "true",
+        /* SoC lib enabled */
+        socDevLib: "false",
+        /* Library options */
+        copts: "",
+        /* target lists, kept blank now, would be updated based on argument lists */
+        targets: []
+    },
+    k2k : 
+    {
+        /* this variable would be reinitialized to true, if XDCARGS contains am572x */
+        build: "false", 
+        /* SoC lib enabled */
+        socDevLib: "true",
+        /* Library options */
+        copts: " -DDEVICE_K2K",
+        /* target list */
+        targets: [ C66LE, C66BE ]
+    },
+    k2h : 
+    {
+        /* this variable would be reinitialized to true, if XDCARGS contains am572x */
+        build: "false", 
+        /* SoC lib enabled */
+        socDevLib: "true",
+        /* Library options */
+        copts: " -DDEVICE_K2H",
+        /* target list */
+        targets: [ C66LE, C66BE ]
+    },
+    k2e : 
+    {
+        /* this variable would be reinitialized to true, if XDCARGS contains am572x */
+        build: "false", 
+        /* SoC lib enabled */
+        socDevLib: "true",
+        /* Library options */
+        copts: " -DDEVICE_K2E",
+        /* target list */
+        targets: [ C66LE, C66BE ]
+    },
+    k2l : 
+    {
+        /* this variable would be reinitialized to true, if XDCARGS contains am572x */
+        build: "false", 
+        /* SoC lib enabled */
+        socDevLib: "true",
+        /* Library options */
+        copts: " -DDEVICE_K2L",
+        /* target list */
+        targets: [ C66LE, C66BE ]
+    },
+    am572x :
+    {
+        /* this variable would be reinitialized to true, if XDCARGS contains am572x */
+        build: "false", 
+        /* SoC lib enabled */
+        socDevLib: "true",
+        /* Library options */
+        copts: " -DSOC_AM572x",
+        /* target list */
+        targets: [ C66LE, M4LE, A15LE]
+    },
+    am571x :
+    {
+        /* this variable would be reinitialized to true, if XDCARGS contains am571x */
+        build: "false",     
+        /* SoC lib enabled */
+        socDevLib: "true",
+        /* Library options */
+        copts: " -DSOC_AM571x",
+        /* target list */
+        targets: [ C66LE, M4LE, A15LE]
+    }    
+};
+
+/**************************************************************************
+ * FUNCTION NAME : merge
+ **************************************************************************
+ * DESCRIPTION   :
+ *  The function is used to merge two arrarys
+ **************************************************************************/
+function merge() {
+    var args = arguments;
+    var hash = {};
+    var arr = [];
+    for (var i = 0; i < args.length; i++) {
+       for (var j = 0; j < args[i].length; j++) {
+         if (hash[args[i][j]] !== true) {
+           arr[arr.length] = args[i][j];
+           hash[args[i][j]] = true;
+         }
+       }
+     }
+    return arr;
+}
+
+/* Grab input from XDCARGS */
+var buildArguments  = [];
+
+/* Construct the build arguments */
+for (var tmp=0; arguments[tmp] != undefined; tmp++)
+{
+
+    /* If no arguments are provided, override for building all */
+    if ( ( arguments.length == 1) && (arguments[tmp].equals("./config.bld")) )
+        buildArguments[buildArguments.length++] = "all";
+    else
+        buildArguments[buildArguments.length++] = arguments[tmp];
+}
+
+/* Build targets on this build */
+var build_targets = [];
+
+for (var i=0; i < buildArguments.length; i++ ) {
+    /* Build it for all targets */
+    var soc_names = Object.keys(socs);
+    if (buildArguments[i] == "all") {
+        for (var j = 0; j < soc_names.length; j++)  {
+            build_targets = merge (build_targets.slice(0), socs[soc_names[j]].targets.slice(0));
+            /* Set build to "true" for that SoC */
+            socs[soc_names[j]].build = "true";
+        }
+    }
+    else {
+        /* Skip the first argument, which is ./config.bld to get to next SoCs */
+        if (i == 0) continue;          
+        /* Set that build to true if it is found in supported build socs */
+        for (j = 0; j < soc_names.length; j++) {
+            if (buildArguments[i] == soc_names[j]) {
+                socs[buildArguments[i]].build = "true";
+                build_targets = merge (build_targets.slice(0), socs[buildArguments[i]].targets.slice(0));
+                break;
+            }
+        }
+    }   
+}
+
+/* Update the Build target generated list */
+socs["all"].targets = build_targets; 
+Build.targets   = build_targets;
+
index 2ec4f47d68749a086e993c2866df62e929fb0147..ca4b33146be032eacf7366bdf400662dcb20b473 100644 (file)
@@ -45,7 +45,7 @@ function modBuild()
     Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/doxygen";\r
 \r
     /* Generate the ECLIPSE Plugin Generation: Only for SETUP Releases. */\r
-    if (pcielldInstallType == "SETUP")\r
+    if (driverInstallType == "SETUP")\r
     {\r
         Pkg.makePrologue += "all: eclipse_plugin_generation\n";\r
         Pkg.makePrologue += "eclipse_plugin_generation:\n";\r
index ab8009c75af6866c43e28fb3253ad233293daba3..3c29e1a0b9b464b26346a8f87519d4e836d48a5a 100644 (file)
@@ -1,5 +1,3 @@
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/soc/am571x/src/pcie_soc.c" 
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/uart/soc/am571x/UART_soc.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/src/pcie_sample.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/am57x/src/pcie_sample_board.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/am571x/armv7/bios/pcie_sample.cfg" 
index 54cba2f4f240d3216a464082276d9df3ed175b1b..770a564d8a9e9425dc75e7c8e868318697d79720 100644 (file)
@@ -98,16 +98,17 @@ System.SupportProxy = SysMin;
 var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
 
 /* Load and use the PCIE packages */
-var devType = "am571x";
+var socType = "am571x";
 var Pcie = xdc.loadPackage('ti.drv.pcie');
 /* Enable only if device-specific library should be used */ 
-/* Pcie.Settings.deviceType = devType; */
+Pcie.Settings.deviceType = socType; 
 
 /* Load the I2C package  - required by board */
 var I2c = xdc.loadPackage('ti.drv.i2c');
 
 /* Load the uart package -- required by board */
 var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
 
 /* Load the Board package and set the board name */
 var Board = xdc.loadPackage('ti.board');
@@ -115,12 +116,12 @@ Board.Settings.boardName = "idkAM571x";
 
 /* Load the osal package -- required by board & interrupt example */
 var osType = "tirtos"
-var Osal = xdc.useModule('ti.osal.Settings');
-Osal.osType = osType;
+var Osal = xdc.loadPackage('ti.osal');
+Osal.Settings.osType = osType;
 
 /*use CSL package*/
-var Csl = xdc.useModule('ti.csl.Settings');
-Csl.deviceType = devType;
+var Csl = xdc.loadPackage('ti.csl');
+Csl.Settings.deviceType = socType;
 
 var Cache = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
 var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
index fbaff408ba56051dcda1fa18834f0f356ca88bb5..80b552e4bf5b8fc0bf9cc32900cfc389426fd006 100644 (file)
@@ -1,4 +1,3 @@
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/soc/am571x/src/pcie_soc.c" 
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/src/pcie_sample.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/am57x/src/pcie_sample_board.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/am571x/c66/bios/pcie_sample.cfg"
index 50628b5a1b0a156708705d1ad3079af6cee9f63d..ae7d9ce921154518119fb36a95dae71e37888138 100644 (file)
@@ -36,16 +36,17 @@ Memory.defaultHeapSize = 0x10000;
 Program.heap = 0x10000;
 
 /* Load and use the PCIE packages */
-var devType = "am571x";
+var socType = "am571x";
 var Pcie = xdc.loadPackage('ti.drv.pcie');
 /* Enable only if device-specific library should be used */ 
-/* Pcie.Settings.deviceType = devType; */
+Pcie.Settings.deviceType = socType; 
 
 /* Load the I2C package  - required by board */
 var I2c = xdc.loadPackage('ti.drv.i2c');
 
 /* Load the uart package -- required by board */
 var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
 
 /* Load the Board package and set the board name */
 var Board = xdc.loadPackage('ti.board');
@@ -53,12 +54,12 @@ Board.Settings.boardName = "idkAM571x";
 
 /* Load the osal package -- required by board & interrupt example */
 var osType = "tirtos"
-var Osal = xdc.useModule('ti.osal.Settings');
-Osal.osType = osType;
+var Osal = xdc.loadPackage('ti.osal');
+Osal.Settings.osType = osType;
 
 /*use CSL package*/
-var Csl = xdc.useModule('ti.csl.Settings');
-Csl.deviceType = devType;
+var Csl = xdc.loadPackage('ti.csl');
+Csl.Settings.deviceType = socType;
 
 Program.stack = 0x3000; /* main() runs from this stack */
 Program.sectMap[".dstBufSec"] = "L2SRAM";
index 415a5d434181b65a1c4707f866a01a48635cc872..965b15b78a8976196a567d363f732a1f985f282e 100644 (file)
@@ -1,5 +1,3 @@
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/soc/am572x/src/pcie_soc.c" 
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/uart/soc/am572x/UART_soc.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/src/pcie_sample.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/am57x/src/pcie_sample_board.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/am572x/armv7/bios/pcie_sample.cfg" 
index b1e1269e413b67ecfcbe4cba169dfd2df7df78b6..dff1411abf9fdb27fa296558928e38ffdbef9373 100644 (file)
@@ -98,16 +98,17 @@ System.SupportProxy = SysMin;
 var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
 
 /* Load and use the PCIE packages */
-var devType = "am572x";
+var socType = "am572x";
 var Pcie = xdc.loadPackage('ti.drv.pcie');
 /* Enable only if device-specific library should be used */ 
-/* Pcie.Settings.deviceType = devType; */
+Pcie.Settings.deviceType = socType; 
 
 /* Load the I2C package  - required by board */
 var I2c = xdc.loadPackage('ti.drv.i2c');
 
 /* Load the uart package -- required by board */
 var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
 
 /* Load the Board package and set the board name */
 var Board = xdc.loadPackage('ti.board');
@@ -115,12 +116,12 @@ Board.Settings.boardName = "idkAM572x";
 
 /* Load the osal package -- required by board & interrupt example */
 var osType = "tirtos"
-var Osal = xdc.useModule('ti.osal.Settings');
-Osal.osType = osType;
+var Osal = xdc.loadPackage('ti.osal');
+Osal.Settings.osType = osType;
 
 /*use CSL package*/
-var Csl = xdc.useModule('ti.csl.Settings');
-Csl.deviceType = devType;
+var Csl = xdc.loadPackage('ti.csl');
+Csl.Settings.deviceType = socType;
 
 var Cache = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
 var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
index 2ac37119df85137a6455a1cd91740798ff3b2fd3..99e99b32316667ea0fd1d00f984bbc56eacd059f 100644 (file)
@@ -1,4 +1,3 @@
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/soc/am572x/src/pcie_soc.c" 
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/src/pcie_sample.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/am57x/src/pcie_sample_board.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/pcie/example/sample/am572x/c66/bios/pcie_sample.cfg"
index f17f34f0207dfd0a58afd8e80959bb117a82a5f6..14501ef5df53c3123087f1988187a54f791bb863 100644 (file)
@@ -36,16 +36,17 @@ Memory.defaultHeapSize = 0x10000;
 Program.heap = 0x10000;
 
 /* Load and use the PCIE packages */
-var devType = "am572x";
+var socType = "am572x";
 var Pcie = xdc.loadPackage('ti.drv.pcie');
 /* Enable only if device-specific library should be used */ 
-/* Pcie.Settings.deviceType = devType; */
+Pcie.Settings.deviceType = socType; 
 
 /* Load the I2C package  - required by board */
 var I2c = xdc.loadPackage('ti.drv.i2c');
 
 /* Load the uart package -- required by board */
 var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.socType = socType;
 
 /* Load the Board package and set the board name */
 var Board = xdc.loadPackage('ti.board');
@@ -53,12 +54,12 @@ Board.Settings.boardName = "idkAM572x";
 
 /* Load the osal package -- required by board & interrupt example */
 var osType = "tirtos"
-var Osal = xdc.useModule('ti.osal.Settings');
-Osal.osType = osType;
+var Osal = xdc.loadPackage('ti.osal');
+Osal.Settings.osType = osType;
 
 /*use CSL package*/
-var Csl = xdc.useModule('ti.csl.Settings');
-Csl.deviceType = devType;
+var Csl = xdc.loadPackage('ti.csl');
+Csl.Settings.deviceType = socType;
 
 Program.stack = 0x3000; /* main() runs from this stack */
 Program.sectMap[".dstBufSec"] = "L2SRAM";
index 39a49fa00e7957cb1136216cfcfe7e18ededd96f..19044407c6f703ef98eba652c3a21ed3ec9d0bfd 100644 (file)
 /* List of all subdirectories that combine to make the PCIE LLD Package. */\r
 var subDirectories = [ "src", "docs", "example", "soc" ];\r
 \r
-var pcielldInstallType;\r
-\r
-/* Check if we need to create the Makefiles? */\r
-var miniBuild = java.lang.System.getenv("MINI_PACKAGE");\r
+var driverInstallType;\r
 \r
 /* Determine if we need to create the InstallJammer Application or not? \r
  * PCIE LLD Deliverables be either of the following formats:\r
@@ -33,31 +30,30 @@ var miniBuild = java.lang.System.getenv("MINI_PACKAGE");
  * DEFAULT is a SETUP Executable. */\r
 \r
 if ((arguments[0] != "TAR") && (arguments[0] != "SETUP"))\r
-    pcielldInstallType = "TAR";\r
+    driverInstallType = "TAR";\r
 else\r
-    pcielldInstallType = arguments[0];\r
+    driverInstallType = arguments[0];\r
 \r
 /* Irrespective of the InstallType we always create a TAR Ball Package as a part\r
  * of the RTSC Build. Here we determine the name of the TAR Ball Package\r
  *  Format is as follows:\r
  *      pcielld_<version> */\r
-var pcielldRTSCFileName = "pcielld" + "_" + pcielldPartNumber + "_" +\r
-                         pcielldReleaseVersion[0] + "_" +  pcielldReleaseVersion[1] + "_" + \r
-                         pcielldReleaseVersion[2]  + "_" + pcielldReleaseVersion[3];\r
+var pcielldRTSCFileName = "pcielld" + "_" +\r
+                         driverReleaseVersion[0] + "_" +  driverReleaseVersion[1] + "_" + \r
+                         driverReleaseVersion[2]  + "_" + driverReleaseVersion[3];\r
 \r
 /******************************************************************\r
  ************************ Release Banner **************************\r
  ******************************************************************/\r
 \r
 print ("************* PCIE LLD Build Information *************");\r
-print ("PCIE LLD Install             : " + pcielldInstallType);\r
-print ("PCIE LLD Version             : " + pcielldReleaseVersion);\r
+print ("PCIE LLD Install             : " + driverInstallType);\r
+print ("PCIE LLD Version             : " + driverReleaseVersion);\r
 print ("C66 Tools Directory          : " + c66ToolsBaseDir);\r
 print ("M4 Tools Directory           : " + m4ToolsBaseDir);\r
 print ("A15 Tools Directory          : " + a15ToolsBaseDir);\r
 print ("RTSC File Name               : " + pcielldRTSCFileName);\r
-print ("PCIE LLD Path                : " + pcielldPath);\r
-print ("Coverity Analysis            : " + (coverityAnalysis == "ON" ? "ON" : "OFF"));\r
+print ("PCIE LLD Path                : " + driverPath);\r
 print ("C66 LE opts                  : " + C66LE.ccOpts.prefix);\r
 print ("C66 BE opts                  : " + C66BE.ccOpts.prefix);\r
 print ("M4 LE opts                   : " + M4LE.ccOpts.prefix);\r
@@ -107,85 +103,14 @@ Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";
 \r
 /* Generate Users Manual Doxyfile */\r
 var tplt = xdc.loadTemplate("./docs/doxyfile.xdt");\r
-tplt.genFile("./docs/Doxyfile",pcielldReleaseVersion); \r
+tplt.genFile("./docs/Doxyfile",driverReleaseVersion); \r
 \r
 /* Generate Settings.xdc */\r
 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");\r
-tplt.genFile("./Settings.xdc",pcielldReleaseVersion); \r
+tplt.genFile("./Settings.xdc",driverReleaseVersion); \r
 \r
 /* Generate paver.h */\r
 var tplt = xdc.loadTemplate("./pciever.h.xdt");\r
-tplt.genFile("./pciever.h",pcielldReleaseVersion);      \r
-\r
-/********************************************************************* \r
- *********************** INSTALL-JAMMER Support **********************\r
- * In order to create the InstallJammer Application; we need to UNTAR\r
- * the package into a temporary directory. This is required because \r
- * currently the InstallJammer does not support the TAR Files and thus\r
- * creating an UNTAR of the file. So to work-around the problem we will\r
- * do the following in the EPILOGUE Section:-\r
- *  (a) Create a temporary directory called 'tmp'\r
- *  (b) UNTAR the package into 'tmp'\r
- *  (c) Run the INSTALL Jammer on 'tmp'\r
- *  (d) Remove the 'tmp' directory.\r
- *\r
- * This can be done only after the 'release' package has been created.\r
- * Thus all of this work is being done in the EPILOGUE.\r
- *********************************************************************/\r
-if (pcielldInstallType == "SETUP")\r
-{\r
-    /* Create the Install Jammer Version Variable. This is used inside the \r
-     * MPI File to create the Final executable. \r
-     *  The format supported is as follows:-\r
-     *   - setupwin32_pcielld-<part_number>-<version>.exe \r
-     */\r
-    var InstallJammerVersion = "-DVersion " + pcielldPartNumber + "_" + \r
-                               pcielldReleaseVersion[0] + "_" + pcielldReleaseVersion[1] + "_" +  \r
-                               pcielldReleaseVersion[2]  + "_" + pcielldReleaseVersion[3];\r
-\r
-    /* This is the location where the tmp directory is located; this is used as \r
-     * the input directory for the Install Jammer. */ \r
-    var PackageBaseDir = " -DPackageBaseDir " + pcielldPath + "./tmp";\r
-\r
-    /* This is the location where the PCIE LLD will be installed by default. */\r
-    var WinInstallDir = " -DWinInstallDir C:/Program Files/Texas Instruments/pcielld" + "_" + \r
-                            pcielldPartNumber + "_" + \r
-                            pcielldReleaseVersion[0] + "_" +  pcielldReleaseVersion[1] + "_" +  \r
-                            pcielldReleaseVersion[2]  + "_" + pcielldReleaseVersion[3]; \r
-\r
-    /* Create the actual EPILOGUE Section for the INSTALLER */\r
-    Pkg.makeEpilogue += "release: install_application\n";\r
-    Pkg.makeEpilogue += "install_application: firmware\n";\r
-    Pkg.makeEpilogue += "\t @echo -------------------------------------------------------\n";\r
-    Pkg.makeEpilogue += "\t @echo Creating the Install\n";\r
-    Pkg.makeEpilogue += "\t @echo -------------------------------------------------------\n";\r
-    Pkg.makeEpilogue += "\t -$(MKDIR) tmp\n";\r
-    Pkg.makeEpilogue += "\t -$(MKDIR) tmp/packages\n";\r
-    Pkg.makeEpilogue += "\t -$(MKDIR) tmp/eclipse\n";\r
-    Pkg.makeEpilogue += "\t -$(CP) -R eclipse tmp\n";\r
-    Pkg.makeEpilogue += "\t tar -xf ./packages/" + pcielldRTSCFileName + ".tar" + " -Ctmp/packages \n";\r
-    Pkg.makeEpilogue += "\t installjammer " + InstallJammerVersion + PackageBaseDir + WinInstallDir + \r
-                        " --output-dir packages/ --build install/pcielld.mpi\n";\r
-    Pkg.makeEpilogue += "\t -$(RMDIR) /S /Q tmp\n\n";\r
-\r
-    /* We need to clean after ourselves; extend the 'clean' target to take care of this. */\r
-    Pkg.makeEpilogue += "clean::\n";\r
-    Pkg.makeEpilogue += "\t $(RM) packages/*.exe\n";\r
-    Pkg.makeEpilogue += "\t $(RM) packages/*.bin\n";\r
-    Pkg.makeEpilogue += "\t $(RMDIR) /S /Q eclipse\n";\r
-    Pkg.makeEpilogue += "\t $(RMDIR) /S /Q tmp\n";\r
-}\r
+tplt.genFile("./pciever.h",driverReleaseVersion);      \r
 \r
-if (miniBuild == "ON")\r
-{\r
-    /***************************************************************************\r
-    ********************************* MINI Package ****************************\r
-    ***************************************************************************/\r
-    /* Create the MINI RTSC Package */\r
-    var additionalFiles = [];\r
-\r
-    var libUtility = xdc.loadCapsule ("build/buildlib.xs");\r
-    libUtility.createMiniPkg(pcielldRTSCFileName, additionalFiles);\r
-}\r
\r
     \r
index 360bffe5e2e5d1ab0edf3d0c7d3830d009380e6b..a1c7fd15fa8e040fb20bb477469df9dc1a58fab7 100644 (file)
@@ -16,6 +16,22 @@ function getLibs(prog)
     var suffix = prog.build.target.suffix;\r
 \r
     var name = this.$name + ".a" + suffix;\r
+    var socType = this.Settings.socType;\r
+    var devType = this.Settings.deviceType;\r
+\r
+    if ((! socType) && devType)\r
+    {\r
+        /* Backward compatibilty with keystone .cfg */\r
+        socType = devType;\r
+    }\r
+\r
+    socType = socType.toLowerCase();\r
+    /* Replace the last charecter in SoC am#### to am###x */\r
+    if (socType.substring(0, 2) == "am")\r
+    {\r
+        socType = socType.substring(0, socType.length - 1);\r
+        socType = socType.concat("x");\r
+    }\r
 \r
     /* Read LIBDIR variable */\r
     var lib = java.lang.System.getenv("LIBDIR");\r
@@ -29,22 +45,23 @@ function getLibs(prog)
     }\r
 \r
     /* Device types supported */\r
-    var deviceTypes = [\r
-                        'k2k',\r
-                        'k2h',\r
-                        'k2l',\r
-                        'k2e',\r
-                        'k2g',\r
-                        'am571x',\r
-                        'am572x'\r
-                      ];\r
+    var socTypes = [\r
+                       'k2k',\r
+                       'k2h',\r
+                       'k2l',\r
+                       'k2e',\r
+                       'k2g',\r
+                       'am571x',\r
+                       'am572x'\r
+                   ];\r
 \r
-    /* Search for the supported devices (defined in config.bld) */\r
-    for each(var device in deviceTypes)\r
+    /* Search for the supported socs (defined in config.bld) */\r
+    for each(var soc in socTypes)\r
     {\r
-        if (this.Settings.deviceType.equals(device))\r
+        if (socType.equals(soc))\r
         {\r
-            lib = lib + "/" + device;\r
+            lib = lib + "/" + soc;\r
+            name = this.$name + "." + soc + ".a" + suffix;      \r
             break;\r
         }\r
     }\r
@@ -56,6 +73,8 @@ function getLibs(prog)
         lib = lib + "/armv7";\r
     else if (java.lang.String(suffix).contains('m4') )\r
         lib = lib + "/m4";\r
+    else\r
+        throw new Error("\tUnknown target for: " + this.packageBase + lib);\r
 \r
     /* Get library name with path */\r
     lib = lib + "/" + name;\r
index 2f064afbc29045bc3e8e107a382262a7a7faa685..7aaa00d29fefc7dbb28d1a0dffaac74ed869a049 100644 (file)
@@ -6,7 +6,7 @@
  * DESCRIPTION: \r
  *  This file contains the module specification for the PCIE source directory.\r
  *\r
- * Copyright (C) 2009-2014, Texas Instruments, Inc.\r
+ * Copyright (C) 2009-2015, Texas Instruments, Inc.\r
  *****************************************************************************/\r
 \r
 /* Load the library utility. */\r
@@ -35,35 +35,49 @@ var pcielldFile = [
  **************************************************************************/\r
 function modBuild() \r
 {\r
-    for (var soc=0; soc < socs.length; soc++) \r
+    /* Build the device independent libraries for all the targets specified. */\r
+    for (var targets=0; targets < socs["all"].targets.length; targets++)\r
     {\r
         var targetFiles = pcielldFile.slice(); /* make copy */\r
-        /* extract device */\r
-        var dev=socs[soc];\r
+        var libOptions = {\r
+            copts: socs["all"].copts,\r
+            incs:  lldIncludePath, \r
+        };\r
+        libUtility.buildLibrary ("",  "false", "false", libOptions, Pkg.name, socs["all"].targets[targets], targetFiles);\r
+    }\r
+    \r
+    /* Build library targets for device dependent SoCs */\r
+    for (var soc=0; soc < soc_names.length; soc++) \r
+    {\r
+        var dev = socs[soc_names[soc]];\r
         \r
-        if (soc != 0)\r
-        {\r
-           targetFiles.push (deviceConstruct[0]+dev.name.toString()+deviceConstruct[1]);\r
-        }\r
-        /* Build the libraries for all the targets specified. */\r
-        for (var targets=0; targets < dev.targets.length; targets++)\r
-        {\r
-            var libOptions = {\r
-                copts: dev.copts,\r
-                incs: pcielldIncPath, \r
-            };\r
-       \r
-            libUtility.buildLibrary (dev.name, libOptions, "ti.drv.pcie", dev.targets[targets], targetFiles);\r
-        }\r
+        /* do not proceed if this SoC is not configured to be built */\r
+        if (dev.build == "false")\r
+           continue;\r
+\r
+        if (dev.socDevLib == "true")\r
+        { \r
+            var targetFiles_soc = pcielldFile.slice(); /* make copy */\r
+            targetFiles_soc.push (deviceConstruct[0]+soc_names[soc]+deviceConstruct[1]);\r
+            /* Build the libraries for all the targets specified. */\r
+            for (var targets=0; targets < dev.targets.length; targets++)\r
+            {\r
+                var libOptions = {\r
+                    copts: dev.copts,\r
+                    incs:  lldIncludePath, \r
+                };\r
+                libUtility.buildLibrary (soc_names[soc], "false", "true", libOptions, Pkg.name, dev.targets[targets], targetFiles_soc);\r
+            }\r
+         }\r
     }\r
 \r
     /* Add all the .c files to the release package. */\r
-    var testFiles = libUtility.listAllFiles (".c", "src");\r
+    var testFiles = libUtility.listAllFiles (".c", "src", true);\r
     for (var k = 0 ; k < testFiles.length; k++)\r
         Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];\r
 \r
     /* Add all the .h files to the release package. */\r
-    var testFiles = libUtility.listAllFiles (".h", "src");\r
+    var testFiles = libUtility.listAllFiles (".h", "src", true);\r
     for (var k = 0 ; k < testFiles.length; k++)\r
         Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];\r
 }\r