Added factory images directory
authorHao Zhang <hzhang@ti.com>
Tue, 7 Jun 2011 13:39:06 +0000 (09:39 -0400)
committerHao Zhang <hzhang@ti.com>
Tue, 7 Jun 2011 13:39:06 +0000 (09:39 -0400)
factory_images/configs/evm6670l/evm6670l-linuxhost.ccxml [new file with mode: 0644]
factory_images/configs/evm6670l/evm6670l.ccxml [new file with mode: 0644]
factory_images/configs/evm6670l/evm6670le-linuxhost.ccxml [new file with mode: 0644]
factory_images/configs/evm6670l/evm6670le.ccxml [new file with mode: 0644]
factory_images/configs/evm6678l/evm6678l-linuxhost.ccxml [new file with mode: 0644]
factory_images/configs/evm6678l/evm6678l.ccxml [new file with mode: 0644]
factory_images/configs/evm6678l/evm6678le-linuxhost.ccxml [new file with mode: 0644]
factory_images/configs/evm6678l/evm6678le.ccxml [new file with mode: 0644]
factory_images/program_evm.js [new file with mode: 0644]
factory_images/program_evm_userguide.doc [new file with mode: 0644]
factory_images/program_evm_userguide.pdf [new file with mode: 0644]

diff --git a/factory_images/configs/evm6670l/evm6670l-linuxhost.ccxml b/factory_images/configs/evm6670l/evm6670l-linuxhost.ccxml
new file mode 100644 (file)
index 0000000..4e2929d
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+<configuration XML_version="1.2" id="Texas Instruments XDS100v1.5 USB Emulator_0">
+        <instance XML_version="1.2" desc="Texas Instruments XDS100v1.5 USB Emulator_0" href="connections/TIXDS100v15_Connection.xml" id="Texas Instruments XDS100v1.5 USB Emulator_0" xml="TIXDS100v15_Connection.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Texas Instruments XDS100v1.5 USB Emulator_0">
+            <instance XML_version="1.2" href="drivers/tixds100icepick_d.xml" id="drivers" xml="tixds100icepick_d.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds100c66xx.xml" id="drivers" xml="tixds100c66xx.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds100cs_dap.xml" id="drivers" xml="tixds100cs_dap.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="TMS320C6670_0" href="devices/C6670.xml" id="TMS320C6670_0" xml="C6670.xml" xmlpath="devices"/>
+                <device HW_revision="1" XML_version="1.2" description="C66x core" id="TMS320C6670_0" partnum="TMS320C6670" simulation="no">
+                    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
+                        <subpath id="subpath_3">
+                            <cpu HW_revision="1.0" XML_version="1.2" description="C66xx CGEM+FP CPU" deviceSim="false" id="C66xx_3" isa="TMS320C66XX">
+                                <property Type="choicelist" Value="0" id="bypass"/>
+                                <property Type="choicelist" Value="0" id="Slave Processor"/>
+                            </cpu>
+                        </subpath>
+                    <subpath id="subpath_0">
+                            <cpu HW_revision="1.0" XML_version="1.2" description="C66xx CGEM+FP CPU" id="C66xx_0" isa="TMS320C66XX">
+                                <property Type="filepathfield" Value="../../emulation/boards/evmc6670l/gel/evmc6670l.gel" id="GEL File"/>
+                            </cpu>
+                        </subpath>
+                    </router>
+                </device>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>
diff --git a/factory_images/configs/evm6670l/evm6670l.ccxml b/factory_images/configs/evm6670l/evm6670l.ccxml
new file mode 100644 (file)
index 0000000..4dec39e
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+<configuration XML_version="1.2" id="Texas Instruments XDS100v1 USB Emulator_0">
+        <instance XML_version="1.2" desc="Texas Instruments XDS100v1 USB Emulator_0" href="connections/TIXDS100usb_Connection.xml" id="Texas Instruments XDS100v1 USB Emulator_0" xml="TIXDS100usb_Connection.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Texas Instruments XDS100v1 USB Emulator_0">
+            <instance XML_version="1.2" href="drivers/tixds100icepick_d.xml" id="drivers" xml="tixds100icepick_d.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds100c66xx.xml" id="drivers" xml="tixds100c66xx.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds100cs_dap.xml" id="drivers" xml="tixds100cs_dap.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="TMS320C6670_0" href="devices/C6670.xml" id="TMS320C6670_0" xml="C6670.xml" xmlpath="devices"/>
+            <device HW_revision="1" XML_version="1.2" description="C66x core" id="TMS320C6670_0" partnum="TMS320C6670">
+                    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
+                        <subpath id="subpath_0">
+                            <cpu HW_revision="1.0" XML_version="1.2" desc="C66xx_0" description="C66xx CGEM+FP CPU" id="C66xx_0" isa="TMS320C66XX">
+                                <property Type="filepathfield" Value="..\..\emulation\boards\evmc6670l\gel\evmc6670l.gel" id="GEL File"/>
+                            </cpu>
+                        </subpath>
+                    </router>
+                </device>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>
diff --git a/factory_images/configs/evm6670l/evm6670le-linuxhost.ccxml b/factory_images/configs/evm6670l/evm6670le-linuxhost.ccxml
new file mode 100644 (file)
index 0000000..06e4eb0
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+<configuration XML_version="1.2" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0">
+        <instance XML_version="1.2" desc="Blackhawk XDS560v2-USB Mezzanine Emulator_0" href="connections/BH-XDS560v2-USB_Mezzanine.xml" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0" xml="BH-XDS560v2-USB_Mezzanine.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0">
+            <instance XML_version="1.2" href="drivers/tixds560icepick_d.xml" id="drivers" xml="tixds560icepick_d.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds560c66xx.xml" id="drivers" xml="tixds560c66xx.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds560cs_dap.xml" id="drivers" xml="tixds560cs_dap.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="TMS320C6670_0" href="devices/C6670.xml" id="TMS320C6670_0" xml="C6670.xml" xmlpath="devices"/>
+            <device HW_revision="1" XML_version="1.2" description="C66x core" id="TMS320C6670_0" partnum="TMS320C6670" simulation="no">
+                    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
+                        <subpath id="subpath_0">
+                            <cpu HW_revision="1.0" XML_version="1.2" description="C66xx CGEM+FP CPU" deviceSim="false" id="C66xx_0" isa="TMS320C66XX">
+                                <property Type="filepathfield" Value="../../emulation/boards/evmc6670l/gel/evmc6670l.gel" id="GEL File"/>
+                            </cpu>
+                        </subpath>
+                    </router>
+                </device>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>
diff --git a/factory_images/configs/evm6670l/evm6670le.ccxml b/factory_images/configs/evm6670l/evm6670le.ccxml
new file mode 100644 (file)
index 0000000..06e4eb0
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+<configuration XML_version="1.2" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0">
+        <instance XML_version="1.2" desc="Blackhawk XDS560v2-USB Mezzanine Emulator_0" href="connections/BH-XDS560v2-USB_Mezzanine.xml" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0" xml="BH-XDS560v2-USB_Mezzanine.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0">
+            <instance XML_version="1.2" href="drivers/tixds560icepick_d.xml" id="drivers" xml="tixds560icepick_d.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds560c66xx.xml" id="drivers" xml="tixds560c66xx.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds560cs_dap.xml" id="drivers" xml="tixds560cs_dap.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="TMS320C6670_0" href="devices/C6670.xml" id="TMS320C6670_0" xml="C6670.xml" xmlpath="devices"/>
+            <device HW_revision="1" XML_version="1.2" description="C66x core" id="TMS320C6670_0" partnum="TMS320C6670" simulation="no">
+                    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
+                        <subpath id="subpath_0">
+                            <cpu HW_revision="1.0" XML_version="1.2" description="C66xx CGEM+FP CPU" deviceSim="false" id="C66xx_0" isa="TMS320C66XX">
+                                <property Type="filepathfield" Value="../../emulation/boards/evmc6670l/gel/evmc6670l.gel" id="GEL File"/>
+                            </cpu>
+                        </subpath>
+                    </router>
+                </device>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>
diff --git a/factory_images/configs/evm6678l/evm6678l-linuxhost.ccxml b/factory_images/configs/evm6678l/evm6678l-linuxhost.ccxml
new file mode 100644 (file)
index 0000000..4e18ccd
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+<configuration XML_version="1.2" id="Texas Instruments XDS100v1.5 USB Emulator_0">
+        <instance XML_version="1.2" desc="Texas Instruments XDS100v1.5 USB Emulator_0" href="connections/TIXDS100v15_Connection.xml" id="Texas Instruments XDS100v1.5 USB Emulator_0" xml="TIXDS100v15_Connection.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Texas Instruments XDS100v1.5 USB Emulator_0">
+            <instance XML_version="1.2" href="drivers/tixds100icepick_d.xml" id="drivers" xml="tixds100icepick_d.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds100c66xx.xml" id="drivers" xml="tixds100c66xx.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds100cs_dap.xml" id="drivers" xml="tixds100cs_dap.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="TMS320C6678_0" href="devices/C6678.xml" id="TMS320C6678_0" xml="C6678.xml" xmlpath="devices"/>
+            <device HW_revision="1" XML_version="1.2" description="C66x core" id="TMS320C6678_0" partnum="TMS320C6678">
+                    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
+                        <subpath id="subpath_0">
+                            <cpu HW_revision="1.0" XML_version="1.2" description="C66xx CGEM+FP CPU" id="C66xx_0" isa="TMS320C66XX">
+                                <property Type="filepathfield" Value="../../emulation/boards/evmc6678l/gel/evmc6678l.gel" id="GEL File"/>
+                            </cpu>
+                        </subpath>
+                    </router>
+                </device>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>
diff --git a/factory_images/configs/evm6678l/evm6678l.ccxml b/factory_images/configs/evm6678l/evm6678l.ccxml
new file mode 100644 (file)
index 0000000..7e009d6
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+
+
+<configuration XML_version="1.2" id="Texas Instruments XDS100v1 USB Emulator_0">
+        <instance XML_version="1.2" desc="Texas Instruments XDS100v1 USB Emulator_0" href="connections/TIXDS100usb_Connection.xml" id="Texas Instruments XDS100v1 USB Emulator_0" xml="TIXDS100usb_Connection.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Texas Instruments XDS100v1 USB Emulator_0">
+            <instance XML_version="1.2" href="drivers/tixds100icepick_d.xml" id="drivers" xml="tixds100icepick_d.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds100c66xx.xml" id="drivers" xml="tixds100c66xx.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds100cs_dap.xml" id="drivers" xml="tixds100cs_dap.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="TMS320C6678_0" href="Devices/C6678.xml" id="TMS320C6678_0" xml="C6678.xml" xmlpath="Devices"/>
+                <device HW_revision="1" XML_version="1.2" description="C66x core" id="TMS320C6678_0" partnum="TMS320C6678">
+                    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
+                        <subpath id="subpath_0">
+                            <cpu HW_revision="1.0" XML_version="1.2" description="C66xx CGEM+FP CPU" id="C66xx_0" isa="TMS320C66XX">
+                                <property Type="filepathfield" Value="..\..\emulation\boards\evmc6678l\gel\evmc6678l.gel" id="GEL File"/>
+                            </cpu>
+                        </subpath>
+                    </router>
+                </device>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>
diff --git a/factory_images/configs/evm6678l/evm6678le-linuxhost.ccxml b/factory_images/configs/evm6678l/evm6678le-linuxhost.ccxml
new file mode 100644 (file)
index 0000000..3dc3152
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+<configuration XML_version="1.2" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0">
+        <instance XML_version="1.2" desc="Blackhawk XDS560v2-USB Mezzanine Emulator_0" href="connections/BH-XDS560v2-USB_Mezzanine.xml" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0" xml="BH-XDS560v2-USB_Mezzanine.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Blackhawk XDS560v2-USB Mezzanine Emulator_0">
+            <instance XML_version="1.2" href="drivers/tixds560icepick_d.xml" id="drivers" xml="tixds560icepick_d.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds560c66xx.xml" id="drivers" xml="tixds560c66xx.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds560cs_dap.xml" id="drivers" xml="tixds560cs_dap.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="TMS320C6678_0" href="devices/C6678.xml" id="TMS320C6678_0" xml="C6678.xml" xmlpath="devices"/>
+                <device HW_revision="1" XML_version="1.2" description="C66x core" id="TMS320C6678_0" partnum="TMS320C6678" simulation="no">
+                    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
+                        <subpath id="subpath_0">
+                            <cpu HW_revision="1.0" XML_version="1.2" description="C66xx CGEM+FP CPU" deviceSim="false" id="C66xx_0" isa="TMS320C66XX">
+                                <property Type="filepathfield" Value="../../emulation/boards/evmc6678l/gel/evmc6678l.gel" id="GEL File"/>
+                            </cpu>
+                        </subpath>
+                    </router>
+                </device>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>
diff --git a/factory_images/configs/evm6678l/evm6678le.ccxml b/factory_images/configs/evm6678l/evm6678le.ccxml
new file mode 100644 (file)
index 0000000..b8ea037
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+
+
+
+<configuration XML_version="1.2" id="Blackhawk XDS560v2-USB System Trace Emulator_0">
+        <instance XML_version="1.2" desc="Blackhawk XDS560v2-USB System Trace Emulator_0" href="connections/BH-XDS560v2-USB_Connection.xml" id="Blackhawk XDS560v2-USB System Trace Emulator_0" xml="BH-XDS560v2-USB_Connection.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Blackhawk XDS560v2-USB System Trace Emulator_0">
+            <instance XML_version="1.2" href="drivers/tixds560icepick_d.xml" id="drivers" xml="tixds560icepick_d.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds560c66xx.xml" id="drivers" xml="tixds560c66xx.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/tixds560cs_dap.xml" id="drivers" xml="tixds560cs_dap.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="TMS320C6678_0" href="Devices/C6678.xml" id="TMS320C6678_0" xml="C6678.xml" xmlpath="Devices"/>
+                <device HW_revision="1" XML_version="1.2" description="C66x core" id="TMS320C6678_0" partnum="TMS320C6678">
+                    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
+                        <subpath id="subpath_0">
+                            <cpu HW_revision="1.0" XML_version="1.2" description="C66xx CGEM+FP CPU" id="C66xx_0" isa="TMS320C66XX">
+                                <property Type="filepathfield" Value="..\..\emulation\boards\evmc6678l\gel\evmc6678l.gel" id="GEL File"/>
+                            </cpu>
+                        </subpath>
+                    </router>
+                </device>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>
diff --git a/factory_images/program_evm.js b/factory_images/program_evm.js
new file mode 100644 (file)
index 0000000..f050b87
--- /dev/null
@@ -0,0 +1,356 @@
+// factory_defaults dss script
+// Import the DSS packages into our namespace to save on typing
+importPackage(Packages.com.ti.debug.engine.scripting);
+importPackage(Packages.com.ti.ccstudio.scripting.environment);
+importPackage(Packages.java.lang);
+importPackage(Packages.java.io);
+importPackage(Packages.java.util);
+
+// Create our scripting environment object - which is the main entry point into
+// any script and the factory for creating other Scriptable ervers and Sessions
+var script = ScriptingEnvironment.instance()
+
+var debugScriptEnv = ScriptingEnvironment.instance();
+
+// Get the Debug Server and start a Debug Session
+var debugServer = script.getServer("DebugServer.1");
+
+// Create a log file in the current directory to log script execution
+script.traceBegin("BFTRunLog.xml", "DefaultStylesheet.xsl")
+
+//***************Functions define***************************
+//****************Open file to write***********************
+// if attr is true, bytes will be written to the end of the file rather than the beginning
+function fileWriterOpen(path, attr)
+{
+       if (attr)
+       {
+               file = new java.io.FileWriter(path, true);
+               return file;
+       }
+       else
+       {
+               file = new java.io.FileWriter(path, false);
+               return file;
+       }
+}
+
+//****************Write to file***********************
+function fileWrite(file, string)
+{            
+       file.write(string);
+}
+
+//**************** Close file*************************
+function fileClose(file)
+{            
+       file.close();
+}
+
+//****************Get New Time Stamp***********************
+function localTime()
+{
+       // get time stamp
+       var currentTime = new Date();
+       var year = currentTime.getFullYear();
+       var month = currentTime.getMonth() + 1;
+       month = month + "";
+       if (month.length == 1)
+       {
+               month = "0" + month;
+       }
+       var day = currentTime.getDate();
+       var hour = currentTime.getHours();
+       var minute = currentTime.getMinutes();
+       minute = minute + "";
+       if (minute.length == 1)
+       {
+               minute = "0" + minute;
+       }
+       var second = currentTime.getSeconds();
+       second = second + "";
+       if (second.length == 1)
+       {
+               second = "0" + second;
+       }
+    
+       return (year+"_"+month+"_"+day+"_"+hour+minute+second);
+}
+
+/**
+ * Get error code from the given exception.
+ * @param {exception} The exception from which to get the error code.
+ */
+function getErrorCode(exception)
+{
+       var ex2 = exception.javaException;
+       if (ex2 instanceof Packages.com.ti.ccstudio.scripting.environment.ScriptingException) {
+               return ex2.getErrorID();
+       }
+       return 0;
+}
+function fileCopy(source,destination)
+{
+       inputFile = new File(source);
+    outputFile = new File(destination);
+    infile = new  java.io.FileReader(inputFile);
+    out = new java.io.FileWriter(outputFile);
+    var c;
+
+    while ((c = infile.read()) != -1)
+      out.write(c);
+
+    infile.close();
+    out.close();
+}
+
+//*******************************************
+// Declarations and Inititalizations
+var nandwriter_dir    = java.lang.System.getProperty("user.dir");
+var dss_script_dir    = java.lang.System.getenv("DSS_SCRIPT_DIR");
+var host_os           = "";
+var script_logs    = nandwriter_dir+"/logs/";
+var script_configs = nandwriter_dir+"/configs/";
+var script_binaries = nandwriter_dir+"/binaries/";
+var targetConfig = "";
+var writeAll = false;
+var big_endian = false;
+var targetFlag = "unknown";
+var targetConfig = "unknown";
+var emul560 = false;
+
+if (java.lang.System.getProperty("os.name").match(/Linux/i))
+{
+        host_os = "-linuxhost";
+}
+
+// Parse the arguments
+if (arguments.length > 0 && arguments.length < 3)
+{
+    // parse the board spec
+    var board_spec = arguments[0].toLowerCase();
+    board_spec = board_spec.replace(/^tmd(x|s)/, "");
+    board_spec = board_spec.replace(/^evmc/, "evm");
+    
+    // find endian, user wants
+    if (board_spec.match(/-be$/))
+    {
+        big_endian = true;
+        board_spec = board_spec.replace(/-be$/, "");
+    }
+    else
+        board_spec = board_spec.replace(/-le$/, "");
+        
+    // find onboard emulation option for this board 
+    if (board_spec.match(/lx?e$/))
+    {
+        emul560 = true;
+        board_spec = board_spec.replace(/e$/, "");
+    }
+        
+    // for now, use the same software for lx and l variants
+    board_spec = board_spec.replace(/lx$/, "l");
+    
+    // for now, treat evm6618l as an alias for evm6670l
+    board_spec = board_spec.replace(/evm6618/, "evm6670");
+        
+    targetFlag = board_spec;
+    
+    endian_spec = (big_endian ? "-be" : "");
+    
+    board_binaries = script_binaries + targetFlag + endian_spec + "/";
+    targetConfig = java.lang.System.getenv("PROGRAM_EVM_TARGET_CONFIG_FILE");
+    if (!targetConfig)    
+        targetConfig = script_configs + targetFlag + "/" + targetFlag + (emul560 ? "e" : "") + host_os + ".ccxml";
+
+    print("board: " + targetFlag);
+    print("endian: " + (big_endian ? "Big" : "Little"));
+    print("emulation: " + (emul560 ? "XDS560 mezzanine" : "onboard XDS100"));
+    print("binaries: " + board_binaries);
+    print("ccxml: " + targetConfig);
+    
+    var dir = new File(board_binaries);
+    if (!dir.exists())
+    {
+        print("board binaries directory not found");
+        java.lang.System.exit(2);
+    }
+    
+    if(arguments[1])
+        var writerImages = arguments[1];
+    else
+        writeAll = true;   
+}
+else
+{
+        script.traceWrite("syntax error in command line");
+       print("Syntax: program_evm.js <device> [images_to_write]")
+       print("  <device> is the board name with optional -le (little endian, default) or -be (big endian)")
+       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")
+       script.traceEnd()
+       java.lang.System.exit(1);
+}
+
+var i2cwriterbinary = board_binaries + "eepromwriter_" + targetFlag + ".out";
+var nandwriterbinary = board_binaries + "nandwriter_" + targetFlag + ".out";
+var norwriterbinary = board_binaries + "norwriter_" + targetFlag + ".out";
+var eepromwriter_input51 = board_binaries + "eepromwriter_input51.txt";
+var eepromwriter_input50 = board_binaries + "eepromwriter_input50.txt";
+var eepromwriter_input = board_binaries + "eepromwriter_input.txt";
+var eeprom50 = board_binaries + "eeprom50.bin";
+var eeprom51 = board_binaries + "eeprom51.bin";
+var nand = board_binaries + "nand.bin";
+var nor = board_binaries + "nor.bin";
+
+start = localTime();
+var logFile = fileWriterOpen(script_logs+targetFlag+"_"+start+".txt", 1);
+
+// Configure target
+debugServer.setConfig(targetConfig);
+debugSession = debugServer.openSession("*","C66xx_0");
+debugSession.target.connect();
+debugSession.target.reset();
+
+//POST
+if(writeAll || writerImages.match(/eeprom50/))
+{
+       //Write EEPROM
+       start = localTime();
+       fileWrite(logFile, "Start POST write @ "+start+"\r\n");
+       script.traceWrite("Start writing POST");
+       script.traceWrite("Writer:" + i2cwriterbinary + "\r\n");
+       script.traceWrite("POST:" + eeprom50 + "\r\n");
+
+       fileCopy(eepromwriter_input50,eepromwriter_input);
+       debugSession.memory.loadProgram(i2cwriterbinary);
+       var nPage = 0x0;
+       var nAddress = 0x80000000;
+       var sFilename = eeprom50 ;
+       var nTypeSize = 32;
+       var bByteSwap = false;
+       try
+       {
+               debugSession.memory.loadRaw(nPage, nAddress, sFilename, nTypeSize, bByteSwap);
+       }
+       catch (ex)
+       {
+          errCode = getErrorCode(ex);
+          script.traceWrite("Error code #" + errCode + ", could not load file " + sFilename +
+                               " to target memory!");
+       }
+       debugSession.target.run()
+       end = localTime();
+       fileWrite(logFile, "\nEnd POST write @ " + end + "\n\n");
+}
+
+//IBL 
+if(writeAll || writerImages.match(/eeprom51/))
+{
+       start = localTime();
+       fileWrite(logFile, "Start IBL write @ "+start+"\r\n");
+       script.traceWrite("Start writing IBL");
+       script.traceWrite("Writer:" + i2cwriterbinary + "\r\n");
+       script.traceWrite("IBL:" + eeprom51 + "\r\n");
+       
+       fileCopy(eepromwriter_input51,eepromwriter_input);
+       debugSession.memory.loadProgram(i2cwriterbinary);
+       var nPage = 0x0;
+       var nAddress = 0x80000000;
+       var sFilename = eeprom51;
+       var nTypeSize = 32;
+       var bByteSwap = false;
+       try
+       {
+               debugSession.memory.loadRaw(nPage, nAddress, sFilename, nTypeSize, bByteSwap);
+       }
+       catch (ex)
+       {
+          errCode = getErrorCode(ex);
+          script.traceWrite("Error code #" + errCode + ", could not load file " + sFilename +
+                               " to target memory!");
+       }
+
+       debugSession.target.run()
+       end = localTime();
+       fileWrite(logFile, "\nEnd IBL write @ " + end + "\n\n");
+}
+
+//NAND
+if(writeAll || writerImages.match(/nand/))
+{
+       start_nand = localTime();
+       fileWrite(logFile, "\nStart NAND write @ " + start_nand + "\n\n");
+       script.traceWrite("Writer:" + nandwriterbinary + "\r\n");
+       script.traceWrite("NAND:" + nand + "\r\n");
+       debugSession.memory.loadProgram(nandwriterbinary);
+       var nPage = 0x0;
+       var nAddress = 0x80000000;
+       var sFilename = nand;
+       var nTypeSize = 32;
+       var bByteSwap = true;
+
+       try
+       {   
+               script.traceWrite("Start loading nand.bin");
+               debugSession.memory.loadRaw(nPage, nAddress, sFilename, nTypeSize, bByteSwap);
+
+       }
+       catch (ex)
+       {
+          errCode = getErrorCode(ex);
+          script.traceWrite("Error code #" + errCode + ", could not load file " + sFilename +
+                               " to target memory!");
+       }
+       script.traceWrite("Start programming NAND");
+       debugSession.target.run()
+       script.traceWrite("End programming NAND");
+       end_nand = localTime();
+       fileWrite(logFile, "\nEnd NAND write @ " + end_nand + "\n\n");
+}
+
+//NOR
+if(writeAll || writerImages.match(/nor/))
+{
+       start_nor = localTime();
+       fileWrite(logFile, "\nStart NOR write @ " + start_nor + "\n\n");
+       script.traceWrite("Writer:" + norwriterbinary + "\r\n");
+       script.traceWrite("NOR:" + nor + "\r\n");
+       debugSession.memory.loadProgram(norwriterbinary);
+       var nPage = 0x0;
+       var nAddress = 0x80000000;
+       var sFilename = nor ;
+       var nTypeSize = 32;
+       var bByteSwap = true;
+       try
+       {   
+               script.traceWrite("Start loading nor.bin");
+               debugSession.memory.loadRaw(nPage, nAddress, sFilename, nTypeSize, bByteSwap);
+
+       }
+       catch (ex)
+       {
+          errCode = getErrorCode(ex);
+          script.traceWrite("Error code #" + errCode + ", could not load file " + sFilename +
+                               " to target memory!");
+       }
+       script.traceWrite("Start programming NOR");
+       script.traceWrite(localTime());
+       debugSession.target.run()
+       script.traceWrite("End programming NOR");
+       end_nor = localTime();
+       fileWrite(logFile, "\nEnd NOR write @ " + end_nor + "\n\n");
+}
+
+// Close log file
+fileWrite(logFile, "\n\n\n");
+fileClose(logFile);
+
+debugSession.terminate();
+debugServer.stop()
+
+// Stop logging and exit.
+script.traceEnd();
+java.lang.System.exit(0);
diff --git a/factory_images/program_evm_userguide.doc b/factory_images/program_evm_userguide.doc
new file mode 100644 (file)
index 0000000..da0ec26
Binary files /dev/null and b/factory_images/program_evm_userguide.doc differ
diff --git a/factory_images/program_evm_userguide.pdf b/factory_images/program_evm_userguide.pdf
new file mode 100644 (file)
index 0000000..f12ba80
Binary files /dev/null and b/factory_images/program_evm_userguide.pdf differ