Removed previous changes DEV.BIOS.MCSDK.02.01.01.04
authorCasey Smith <c-smith@ti.com>
Mon, 24 Sep 2012 19:00:10 +0000 (15:00 -0400)
committerCasey Smith <c-smith@ti.com>
Mon, 24 Sep 2012 19:00:10 +0000 (15:00 -0400)
program_evm/program_evm.js
program_evm/program_evm_userguide.doc
program_evm/program_evm_userguide.pdf

index b7412422e5cf13071470f7596c2d24a827121489..b5d6d52d11f8bd287b922cec02c58c4b6ec33e57 100644 (file)
@@ -78,7 +78,6 @@ function getErrorCode(exception)
        }
        return 0;
 }
-
 function fileCopy(source,destination)
 {
        inputFile = new File(source);
@@ -105,63 +104,6 @@ function pausecomp(millis)
   }
 }
 
-function getFilesizeinBytes(file)
-{
-  inputFile = new File(file);
-  return inputFile.length();
-}
-
-function fileCompare(file1,file2,bytes)
-{
-    a = new File(file1);
-    b = new File(file2);
-    infile1 = new  java.io.FileReader(a);
-    infile2 = new java.io.FileReader(b);
-    var c;
-    while(bytes) {
-        c = infile1.read();
-        d = infile2.read();
-        if (c != d)
-            return 1;
-        bytes--;
-    }
-    infile1.close();
-    infile2.close();
-    return 0
-}
-
-// Check the content loaded into DDR against the original file
-function checkDdrContent(nPage, nAddress, nSize, nTypeSize, sFilename, saveByteSwap)
-{
-    script.traceWrite("Comparing DDR content with " + sFilename + " ...");
-    file = new File(sFilename);
-    cfile = file.getParent() + "\\ddr-out";
-    script.traceWrite("cfile is " + cfile);
-    debugSession.memory.saveRaw(nPage, nAddress, cfile, nSize/4, nTypeSize, saveByteSwap); // Get content from DDR and load it into file at ../ddr-out
-    script.traceWrite("File size is eeprom " + getFilesizeinBytes(sFilename));
-    script.traceWrite("File size is " + cfile + " " + getFilesizeinBytes(cfile));
-    var cmp = fileCompare(sFilename, cfile, nSize)
-    script.traceWrite("Compare returns " + cmp);
-    delete(cfile);
-    return cmp;
-}
-
-function cleanup()
-{
-       if (testEnv.cioFile != null)
-       {
-         // Stop CIO logging.
-         debugSession.endCIOLogging();
-       }
-
-       debugSession.terminate();
-       debugServer.stop()
-
-       // Stop logging and exit.
-       script.traceEnd();
-       java.lang.System.exit(0);
-}
-
 //*******************************************
 // Declarations and Inititalizations
 var nandwriter_dir    = java.lang.System.getProperty("user.dir");
@@ -179,8 +121,6 @@ var targetConfig = "unknown";
 var emul560 = false;
 var xds200 = false;
 var emulation_spec = "onboard XDS100";
-var verifyDdr = false;
-
 testEnv.cioFile = null;
 
 if (java.lang.System.getProperty("os.name").match(/Linux/i))
@@ -189,7 +129,7 @@ if (java.lang.System.getProperty("os.name").match(/Linux/i))
 }
 
 // Parse the arguments
-if (arguments.length > 0 && arguments.length < 4)
+if (arguments.length > 0 && arguments.length < 3)
 {
     // parse the board spec
     var board_spec = arguments[0].toLowerCase();
@@ -249,17 +189,14 @@ if (arguments.length > 0 && arguments.length < 4)
     }
     
     if(arguments[1])
-        verifyDdr = (arguments[1] == 1) ? true : false;
-    
-    if(arguments[2])
-        writerImages = arguments[2];
+        writerImages = arguments[1];
     else
         writeAll = true;   
 }
 else
 {
   print("Syntax error in command line");
-       print("Syntax: program_evm.js [tmdx|tmds]evm[c](<device>)l[x][e][-le|-be] [1|0] [images_to_write]")
+       print("Syntax: program_evm.js [tmdx|tmds]evm[c](<device>)l[x][e][-le|-be] [images_to_write]")
   
        print("    tmdx: TMDX type EVM")
        print("    tmds: TMDS type EVM")
@@ -271,8 +208,7 @@ else
        print("    le: Little Endian")
        print("    be: Big Endian")
 
-       print("    example: TMDXEVM6678L-le")
-       print("    [1|0] OPTIONAL. If 1, ddr contents are verified against file to be written else ddr contents are not verified. Recommended to set to 1 for use with 560 Mezzanine Emulator daughter card only ")     
+       print("    example: TMDXEVM6678L-le")   
        print("    [images_to_write] OPTIONAL is a list of the images to be written")
        print("    example: eeprom50,nor")
        print("    If not specified all (eeprom50,eeprom51,nand,nor) will be written")
@@ -383,7 +319,6 @@ if(writeAll || writerImages.match(/eeprom50/))
                var sFilename = eeprom50 ;
                var nTypeSize = 32;
                var bByteSwap = false;
-               var nSize = getFilesizeinBytes(sFilename);
                try
                {
                        debugSession.memory.loadRaw(nPage, nAddress, sFilename, nTypeSize, bByteSwap);
@@ -395,12 +330,6 @@ if(writeAll || writerImages.match(/eeprom50/))
                                        " to target memory!");
                }
                debugSession.target.run()
-               if (verifyDdr){
-                       if(checkDdrContent(nPage, nAddress, nSize, nTypeSize, sFilename, bByteSwap) == 1) {
-                               script.traceWrite("Programming eeprom50 has failed. Please retry programming \n");
-                               cleanup();
-                       }
-               }
                end = localTime();
        }
        else
@@ -427,7 +356,6 @@ if(writeAll || writerImages.match(/eeprom51/))
                var sFilename = eeprom51;
                var nTypeSize = 32;
                var bByteSwap = iblByteSwap;
-               var nSize = getFilesizeinBytes(sFilename);
                try
                {
                        debugSession.memory.loadRaw(nPage, nAddress, sFilename, nTypeSize, bByteSwap);
@@ -440,12 +368,6 @@ if(writeAll || writerImages.match(/eeprom51/))
                }
 
                debugSession.target.run()
-               if (verifyDdr){
-                       if(checkDdrContent(nPage, nAddress, nSize, nTypeSize, sFilename, bByteSwap) == 1) {
-                               script.traceWrite("Programming eeprom51 has failed. Please retry programming \n");
-                               cleanup();
-                       }
-               }
                end = localTime();
        }
        else
@@ -476,7 +398,6 @@ if(writeAll || writerImages.match(/nand/))
                var sFilename = nand;
                var nTypeSize = 32;
                var bByteSwap = false;
-               var nSize = getFilesizeinBytes(sFilename);
     
                try
                {   
@@ -492,12 +413,6 @@ if(writeAll || writerImages.match(/nand/))
                }
                script.traceWrite("Start programming NAND");
                debugSession.target.run()
-               if (verifyDdr){
-                       if(checkDdrContent(nPage, nandNorAddress, nSize, nTypeSize, sFilename, bByteSwap) == 1) {
-                               script.traceWrite("Programming nand has failed. Please retry programming \n");
-                               cleanup();
-                       }
-               }
                script.traceWrite("End programming NAND");
                end_nand = localTime();
        }
@@ -583,7 +498,6 @@ if(writeAll || writerImages.match(/nor/))
                var sFilename = nor ;
                var nTypeSize = 32;
                var bByteSwap = false;
-               var nSize = getFilesizeinBytes(sFilename);
                try
                {   
                        script.traceWrite("Start loading nor.bin");
@@ -599,12 +513,6 @@ if(writeAll || writerImages.match(/nor/))
                script.traceWrite("Start programming NOR");
                script.traceWrite(localTime());
                debugSession.target.run()
-               if (verifyDdr){
-                       if(checkDdrContent(nPage, nandNorAddress, nSize, nTypeSize, sFilename, bByteSwap) == 1) {
-                               script.traceWrite("Programming nor has failed. Please retry programming \n");
-                               cleanup();
-                       }
-               }
                script.traceWrite("End programming NOR");
                end_nor = localTime();
     }
index 3013fc49b7168e512e72d06ba1645aee4a421893..edf1cc8e26bef08943be3fb732723cfb60b5a575 100644 (file)
Binary files a/program_evm/program_evm_userguide.doc and b/program_evm/program_evm_userguide.doc differ
index 5e87d68ab88634771e97cd014eac5769ce067706..f37a6755cc741d3f0d97662e9265dae30a7f313f 100755 (executable)
Binary files a/program_evm/program_evm_userguide.pdf and b/program_evm/program_evm_userguide.pdf differ