RM LLD 2.0.0.x initial release for KeyStone-II DEV.RM_LLD.02.00.00.00
authorMurtaza Gaadiwala <murtaza@ti.com>
Wed, 17 Oct 2012 21:45:12 +0000 (17:45 -0400)
committerMurtaza Gaadiwala <murtaza@ti.com>
Wed, 17 Oct 2012 21:45:12 +0000 (17:45 -0400)
14 files changed:
build/buildlib.xs
config.bld
docs/ReleaseNotes_RM_LLD.doc
docs/ReleaseNotes_RM_LLD.pdf
include/Module.xs
package.xdc
package.xs
release.bat [new file with mode: 0644]
src/Module.xs
test/RM_K2Htestproject.txt [moved from test/rm_testproject.txt with 62% similarity]
test/RM_K2Ktestproject.txt [new file with mode: 0644]
test/pa_test/rm_test_pa.c
test/rm_test_K2H.cfg [moved from test/rm_test.cfg with 94% similarity]
test/rm_test_K2K.cfg [new file with mode: 0644]

index 53c5956e893eb7cf2aad9c8a983682c980e0aacd..22aba4df35cb07f3f0dc6c60ce5ef6f7967fd6a7 100644 (file)
@@ -294,7 +294,7 @@ function createLibMake(makelibname,targetname, objectPath)
     /* libmakefile.writeLine("INTERNALDEFS = -D"+stringname.replace(/\./g,"_")+" -Dxdc_target_types__=ti/targets/std.h -DMAKEFILE_BUILD -eo.$(OBJEXT) -ea.$(AOBJEXT) -fr=$(@D) -fs=$(@D) -ppa -ppd=$@.dep");*/\r
     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)");    \r
+    libmakefile.writeLine("OBJDIR =  $(LIBDIR)/obj"); \r
    \r
  return libmakefile;\r
 \r
@@ -383,16 +383,17 @@ function makeAddObjects(srcString, makefilename, srcfiles, flags,fileExt, target
 var makefilelocal;\r
 function buildLibrary (libOptions, libName, target, libFiles) \r
 {\r
-    var lldFullLibraryPath = "./lib/" + libName;\r
-    var lldFullLibraryPathMake = "$(LIBDIR)/" + libName;\r
+    var lldFullLibraryPath = "./lib/c66/" + libName;\r
+    var lldFullBuildPath = "./build/c66/" + libName;\r
+    var lldFullLibraryPathMake = "$(LIBDIR)/" + "c66/" + libName;\r
 \r
     /* Create Main make file in the root of package folder */\r
     makefilelocal = createMake(makefilelocal);\r
 \r
     /* Write the rule to make library in main makefile */\r
-    lib = lldFullLibraryPath+".a"+target.suffix;\r
+    lib = lldFullBuildPath+".a"+target.suffix;\r
     libMake = lldFullLibraryPathMake+".a"+target.suffix;\r
-    var objectPath= "./package/lib/"+lldFullLibraryPath;\r
+    var objectPath= "./package/"+lldFullBuildPath;\r
     makefilelocal.writeLine("\n\n# Make rule to create "+libMake+" library");\r
     makefilelocal.writeLine(".libraries: "+ libMake);\r
     makefilelocal.writeLine(libMake+": FORCE\n\t$(MAKE) -f "+lib+".mk $@");                                 \r
@@ -441,7 +442,7 @@ function buildLibrary (libOptions, libName, target, libFiles)
     if(afiles.length > 0)\r
     {                                                \r
       makeAddObjects("COMMONSRC",makefilelib,afiles,libOptions,"asm",target);\r
-      librule += " $(COMMONSRCSOBJS)";                   \r
+      librule += " $(COMMONSRCASMOBJS)";                   \r
     }\r
     if(safiles.length > 0)\r
     {                                                \r
@@ -451,14 +452,10 @@ function buildLibrary (libOptions, libName, target, libFiles)
 \r
     makefilelib.writeLine(librule);\r
     makefilelib.writeLine("\t@echo archiving $? into $@ ...");\r
+    makefilelib.writeLine("\tif [ ! -d $(LIBDIR)/c66 ]; then $(MKDIR) $(LIBDIR)/c66 ; fi;"); \r
                makefilelib.writeLine("\t$(ARIN) $@ $?");\r
                makefilelib.close();   \r
 \r
-    /* Create the library file and add all the objects to the file. */\r
-    var lib = Pkg.addLibrary(lldFullLibraryPath, target, libOptions);\r
-\r
-    lib.addObjects (libFiles);\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
@@ -468,11 +465,13 @@ function buildLibrary (libOptions, libName, target, libFiles)
     Pkg.makeEpilogue += "\n\t sectti.exe tmp.xml > " + lldFullLibraryPath + ".a" + target.suffix +  "_size.txt";\r
     Pkg.makeEpilogue += "\n\t $(RM) tmp.xml\n\n";\r
     Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix + "_size.txt";\r
-    Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix + ".mk";\r
+    Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullBuildPath + ".a" + target.suffix + ".mk";\r
+    Pkg.otherFiles[Pkg.otherFiles.length++] = lldFullLibraryPath + ".a" + target.suffix;\r
 \r
     /* We need to clean after ourselves; extend the 'clean' target to take care of this. */\r
-    Pkg.makeEpilogue += "clean::\n\t";\r
-    Pkg.makeEpilogue += "$(RM) " + lldFullLibraryPath + ".a" + target.suffix + "_size.txt\n\n";\r
+    Pkg.makeEpilogue += "clean::\n";\r
+    Pkg.makeEpilogue += "\t$(RM) " + lldFullBuildPath + ".a" + target.suffix + "_size.txt\n";    \r
+    Pkg.makeEpilogue += "\t$(RMDIR) " + "$(LIBDIR)/" + "c66/ \n\n";\r
 \r
     return lib;\r
 }\r
@@ -518,8 +517,14 @@ function createMiniPkg(pkgName)
         Pkg.makeEpilogue += "\t tar -C " + "\"" + newPkgRep + "\"" + " -rf packages/" + pkgName + "_mini.tar " + \r
                         packageName + includeFiles[k] + "\n";\r
 \r
-    /* Step4: Add the resource table files to the package */\r
-    includeFiles = libUtility.listAllFiles (".c", "resource_table", true);\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
index 796e82a3959e60d8902f2e122b5546395b06abb8..5b5c4bb2c26a936a1d2141bbb1fa76006c2bb495 100644 (file)
@@ -26,7 +26,8 @@ var lldPartNumber = java.lang.System.getenv("PARTNO");
 var lldIncludePath = " -i" + lldPath + "/src" + " -i" + lldPath  + " -i" + lldPath + "/test";\r
 \r
 /* Configure the RM LLD Release Version Information */\r
-var lldReleaseVersion = [01,00,00,11];\r
+/* 3 steps: remove SPACE and TAB, convert to string and split to make array */\r
+var lldReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');\r
 \r
 /* RM LLD Coverity Analysis: Check the environment variable to determine if Static\r
  * Analysis has to be done on the RM LLD Code base or not? */\r
index 1f30e9f4b2ce6cf023341459aced308ab11b7fe5..2279161e4cdf7dd7cab2b6a710c11c19a37cf00d 100644 (file)
Binary files a/docs/ReleaseNotes_RM_LLD.doc and b/docs/ReleaseNotes_RM_LLD.doc differ
index 76ac9920170b4364e9a9a49a6bed122c639c5cf9..af5e67477f6743617f2fe0f910943bf0b12cd3b0 100644 (file)
Binary files a/docs/ReleaseNotes_RM_LLD.pdf and b/docs/ReleaseNotes_RM_LLD.pdf differ
index 517a6021cfbb33e818747d0de10e493ecc8e5f05..41bb807f52d56970c89a08d10f1546a263b45178 100644 (file)
@@ -22,7 +22,7 @@ var libUtility = xdc.loadCapsule ("../build/buildlib.xs");
 function modBuild() 
 {
     /* Add all the .h files to the release package. */
-    var testFiles = libUtility.listAllFiles (".h", "include", true);
+    var testFiles = libUtility.listAllFiles (".h", "include");
     for (var k = 0 ; k < testFiles.length; k++)
         Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
 }
index e6810dfdf99505207f04dc91ee0755fef96008e3..34850af45f0f7664251b57c113bd3aa85e086cd6 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (C) 2012, Texas Instruments, Inc.\r
  *****************************************************************************/\r
 \r
-package ti.drv.rm[1, 0, 0, 11] {\r
+package ti.drv.rm[02, 00, 00, 00] {\r
     module Settings;\r
 }\r
 \r
index e488a957624b4f4c970356107b445249594d75df..37b1ffcf83c33839055f33b72e9c23a9c7fac7ad 100644 (file)
 \r
 function getLibs(prog)\r
 {\r
-    var suffix;\r
+    var suffix = prog.build.target.suffix;\r
 \r
-    /* find a compatible suffix */\r
-    if ("findSuffix" in prog.build.target) {\r
-        suffix = prog.build.target.findSuffix(this);\r
-    }\r
-    else {\r
-        suffix = prog.build.target.suffix;\r
+    var name = this.$name + ".a" + suffix;\r
+\r
+    /* Read LIBDIR variable */\r
+    var lib = java.lang.System.getenv("LIBDIR");\r
+\r
+    /* If NULL, default to "lib" folder */\r
+    if (lib == null)\r
+    {\r
+        lib = "./lib";\r
+    } else {\r
+        print ("\tSystem environment LIBDIR variable defined : " + lib);\r
     }\r
 \r
-    var name = this.$name + ".a" + suffix;\r
-    var lib = "";\r
+    /* Get target folder, if applicable */\r
+    if ( java.lang.String(suffix).contains('66') )\r
+        lib = lib + "/c66";\r
 \r
-    lib = "lib/" + name;\r
+    /* Get library name with path */\r
+    lib = lib + "/" + name;\r
     if (java.io.File(this.packageBase + lib).exists()) {\r
-        return lib;\r
+       return lib;\r
     }\r
 \r
-    /* could not find any library, throw exception */\r
-    throw Error("Library not found: " + name);\r
+    /* Could not find any library, throw exception */\r
+    throw new Error("\tLibrary not found: " + this.packageBase + lib);\r
 }\r
 \r
 /*\r
diff --git a/release.bat b/release.bat
new file mode 100644 (file)
index 0000000..3b92546
--- /dev/null
@@ -0,0 +1,3 @@
+xdc clean -PR .
+xdc -PR .
+xdc release
index a9b672f62a5e1899ee40f5517789a1d48a13498e..3965676d8bd43842a1381b74c813ba235b86ee29 100644 (file)
@@ -16,6 +16,8 @@ var rmlldFile = [
     "src/rm.c",
 ];
 
+var devicesCCOpt = [ " -DDEVICE_K2K" ];
+
 /**************************************************************************
  * FUNCTION NAME : modBuild
  **************************************************************************
@@ -28,10 +30,11 @@ function modBuild()
     for (var targets=0; targets < Build.targets.length; targets++)
     {
         var libOptions = {
+            copts: devicesCCOpt,
             incs: lldIncludePath, 
         };
         
-        libUtility.buildLibrary (libOptions, "ti.drv.rm", Build.targets[targets], rmlldFile);
+        libUtility.buildLibrary (libOptions, Pkg.name, Build.targets[targets], rmlldFile);
     }
 
     /* Add all the .c files to the release package. */
similarity index 62%
rename from test/rm_testproject.txt
rename to test/RM_K2Htestproject.txt
index 948e7006b9b77cb29a10a2eae1338a502f551bff..9babd151213c821d02f31f2161f3b71999dfeb77 100644 (file)
@@ -7,10 +7,10 @@
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/cppi_test/rm_test_cppi.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/qmss_test/rm_test_qmss.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/pa_test/rm_test_pa.c"
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/device/cppi_device.c" 
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/qmss/device/qmss_device.c" 
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/device/k2h/src/cppi_device.c" 
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/qmss/device/k2h/src/qmss_device.c" 
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_linker.cmd"
--ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_test.cfg"
--ccs.setCompilerOptions "-mv6600 -g --diag_warning=225 -I${PDK_INSTALL_PATH}/ti/drv/rm -I${PDK_INSTALL_PATH}/ti/drv/cppi -I${PDK_INSTALL_PATH}/ti/drv/qmss" 
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_test_K2H.cfg"
+-ccs.setCompilerOptions "-mv6600 -g -DDEVICE_K2H --diag_warning=225 -I${PDK_INSTALL_PATH}/ti/drv/rm -I${PDK_INSTALL_PATH}/ti/drv/cppi -I${PDK_INSTALL_PATH}/ti/drv/qmss" 
 -rtsc.enableRtsc
 
diff --git a/test/RM_K2Ktestproject.txt b/test/RM_K2Ktestproject.txt
new file mode 100644 (file)
index 0000000..c413c97
--- /dev/null
@@ -0,0 +1,16 @@
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/README.txt"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_test.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_test.h"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_osal.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_osal.h"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_test_resource.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/cppi_test/rm_test_cppi.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/qmss_test/rm_test_qmss.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/pa_test/rm_test_pa.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/device/k2k/src/cppi_device.c" 
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/qmss/device/k2k/src/qmss_device.c" 
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_linker.cmd"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_test_K2K.cfg"
+-ccs.setCompilerOptions "-mv6600 -g -DDEVICE_K2K --diag_warning=225 -I${PDK_INSTALL_PATH}/ti/drv/rm -I${PDK_INSTALL_PATH}/ti/drv/cppi -I${PDK_INSTALL_PATH}/ti/drv/qmss" 
+-rtsc.enableRtsc
+
index a1dcdb20b36b3aad6ce48acc3fcd6dd9df25dc22..83e8100c080bf3fa7451a9a6d0c52034b44e48c6 100644 (file)
@@ -124,7 +124,7 @@ void rm_test_pa(Rm_Handle rm_handle, rm_test_expect_e expect)
 
     paCfg.initTable = TRUE;
     paCfg.initDefaultRoute = TRUE;
-    paCfg.baseAddr = CSL_PA_SS_CFG_REGS;
+    paCfg.baseAddr = CSL_NETCP_CFG_REGS;
     paCfg.sizeCfg = &paSize;
 
     ret_val = Pa_create (&paCfg, bases, &paInst);
similarity index 94%
rename from test/rm_test.cfg
rename to test/rm_test_K2H.cfg
index c038c8b0deb4da8e36978266f69c66448e64c6e4..4f9a0a8d31db50847d0b2a527680d0a4f024607b 100644 (file)
@@ -17,7 +17,9 @@ var Log = xdc.useModule('xdc.runtime.Log');
 var Diags = xdc.useModule('xdc.runtime.Diags'); 
 
 /* Load and use the CSL package */
-var Csl = xdc.loadPackage('ti.csl');
+var devType = "k2h"
+var Csl = xdc.useModule('ti.csl.Settings');
+Csl.deviceType = devType;
 var Cppi = xdc.loadPackage('ti.drv.cppi'); 
 var Qmss = xdc.loadPackage('ti.drv.qmss'); 
 var Pa;
diff --git a/test/rm_test_K2K.cfg b/test/rm_test_K2K.cfg
new file mode 100644 (file)
index 0000000..f50ac5f
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ *  Copyright 2012 by Texas Instruments Incorporated.
+ *
+ *  All rights reserved. Property of Texas Instruments Incorporated.
+ *  Restricted rights to use, duplicate or disclose this code are
+ *  granted through contract.
+ *
+ */
+
+var Memory = xdc.useModule('xdc.runtime.Memory');
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
+var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
+var Task = xdc.useModule('ti.sysbios.knl.Task');
+var Idle = xdc.useModule('ti.sysbios.knl.Idle');
+var Log = xdc.useModule('xdc.runtime.Log');
+var Diags = xdc.useModule('xdc.runtime.Diags'); 
+
+/* Load and use the CSL package */
+var devType = "k2k"
+var Csl = xdc.useModule('ti.csl.Settings');
+Csl.deviceType = devType;
+var Cppi = xdc.loadPackage('ti.drv.cppi'); 
+var Qmss = xdc.loadPackage('ti.drv.qmss'); 
+var Pa;
+try {
+    Pa = xdc.loadPackage('ti.drv.pa');
+}
+catch(e) {
+    /* Nothing to be done.  PA may not be present for some devices */
+}
+
+var Rm = xdc.loadPackage('ti.drv.rm'); 
+
+var System = xdc.useModule('xdc.runtime.System');
+var SysStd  = xdc.useModule('xdc.runtime.SysStd');
+System.SupportProxy = SysStd;
+
+/* Create a default system heap using ti.bios.HeapMem. */
+var heapMemParams1         = new HeapMem.Params;
+heapMemParams1.size        = 12288;
+heapMemParams1.sectionName = "systemHeap";
+Program.global.heap0       = HeapMem.create(heapMemParams1);
+
+/* This is the default memory heap. */
+Memory.defaultHeapInstance = Program.global.heap0;
+
+Program.sectMap["systemHeap"] = Program.platform.stackMemory;
+
+