OpenCores
URL https://opencores.org/ocsvn/usb_fpga_1_2/usb_fpga_1_2/trunk

Subversion Repositories usb_fpga_1_2

[/] [usb_fpga_1_2/] [trunk/] [java/] [FWLoader.java] - Diff between revs 2 and 3

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 3
Line 39... Line 39...
                        "    -v <VID> <PID>   Scan for devices with ZTEX firmware and the given Vendor ID and Product ID\n"+
                        "    -v <VID> <PID>   Scan for devices with ZTEX firmware and the given Vendor ID and Product ID\n"+
                        "    -vc              Equal to -v 0x4b4 0x8613\n"+
                        "    -vc              Equal to -v 0x4b4 0x8613\n"+
                        "    -d <number>      Device Number (default: 0)\n"+
                        "    -d <number>      Device Number (default: 0)\n"+
                        "    -f               Force uploads\n"+
                        "    -f               Force uploads\n"+
                        "    -p               Print bus info\n"+
                        "    -p               Print bus info\n"+
                        "    -w                Enable certain workaraounds which may be required for vmware + windows\n"+
                        "    -w               Enable certain workaraounds\n"+
                        "    -h               This help \n\n"+
                        "    -h               This help \n\n"+
                        "Ordered parameters:\n"+
                        "Ordered parameters:\n"+
                        "    -i               Info\n"+
                        "    -i               Info\n"+
                        "    -ii              Info + capabilities\n"+
                        "    -ii              Info + capabilities\n"+
                        "    -ru              Reset EZ-USB Microcontroller\n"+
                        "    -ru              Reset EZ-USB Microcontroller\n"+
                        "    -uu <ihx file>   Upload EZ-USB Firmware\n"+
                        "    -uu <ihx file>   Upload EZ-USB Firmware\n"+
                        "    -rf              Reset FPGA\n"+
                        "    -rf              Reset FPGA\n"+
                        "    -uf <bitstream>  Upload <bitstream>\n"+
                        "    -uf <bitstream>  Upload <bitstream>\n"+
                        "    -re              Reset EEPROM Firmware\n"+
                        "    -re              Reset EEPROM Firmware\n"+
                        "    -ue <ihx file>   Upload Firmware to EEPROM" );
                        "    -ue <ihx file>   Upload Firmware to EEPROM\n"+
 
                        "    -rm              Reset FLASH bitstream\n"+
 
                        "    -um <bitstream>  Upload Firmware to FLASH");
 
 
 
 
// process global parameters
// process global parameters
        try {
        try {
 
 
Line 121... Line 123...
                }
                }
                else if ( args[i].equals("-h") ) {
                else if ( args[i].equals("-h") ) {
                        System.err.println(helpMsg);
                        System.err.println(helpMsg);
                        System.exit(0);
                        System.exit(0);
                }
                }
                else if ( args[i].equals("-i") || args[i].equals("-ii") || args[i].equals("-ru") || args[i].equals("-rf") || args[i].equals("-re")) {
                else if ( args[i].equals("-i") || args[i].equals("-ii") || args[i].equals("-ru") || args[i].equals("-rf") || args[i].equals("-re") || args[i].equals("-rm") ) {
                }
                }
                else if ( args[i].equals("-uu") || args[i].equals("-uf") || args[i].equals("-ue") ) {
                else if ( args[i].equals("-uu") || args[i].equals("-uf") || args[i].equals("-ue") || args[i].equals("-um") ) {
                    i+=1;
                    i+=1;
                }
                }
                else {
                else {
                    System.err.println("Error: Invalid Parameter: "+args[i]);
                    System.err.println("Error: Invalid Parameter: "+args[i]);
                    System.err.println(helpMsg);
                    System.err.println(helpMsg);
Line 151... Line 153...
                if ( args[i].equals("-i") ) {
                if ( args[i].equals("-i") ) {
                    System.out.println( ztex );
                    System.out.println( ztex );
                }
                }
                if ( args[i].equals("-ii") ) {
                if ( args[i].equals("-ii") ) {
                    System.out.println( ztex );
                    System.out.println( ztex );
                    String str = ztex.capabilityInfo("      ");
                    String str = ztex.capabilityInfo("\n      ");
                    if ( str.equals("") ) {
                    if ( str.equals("") ) {
                        System.out.println( "   No capabilities");
                        System.out.println( "   No capabilities");
                    }
                    }
                    else {
                    else {
                        System.out.println( "   Capabilities:\n"+str);
                        System.out.println( "   Capabilities:\n"+str);
Line 195... Line 197...
                        System.err.println(helpMsg);
                        System.err.println(helpMsg);
                        System.exit(1);
                        System.exit(1);
                    }
                    }
                    System.out.println("FPGA configuration time: " + ztex.configureFpga( args[i], forceUpload ) + " ms");
                    System.out.println("FPGA configuration time: " + ztex.configureFpga( args[i], forceUpload ) + " ms");
                }
                }
 
                else if ( args[i].equals("-rm") ) {
 
                    System.out.println("First free sector: " + ztex.flashFirstFreeSector() );
 
                    ztex.flashResetBitstream();
 
                    System.out.println("First free sector: " + ztex.flashFirstFreeSector() );
 
                }
 
                else if ( args[i].equals("-um") ) {
 
                    i++;
 
                    if ( i >= args.length ) {
 
                        System.err.println("Error: Filename expected after -uf");
 
                        System.err.println(helpMsg);
 
                        System.exit(1);
 
                    }
 
                    System.out.println("First free sector: " + ztex.flashFirstFreeSector() );
 
                    System.out.println("FPGA configuration time: " + ztex.flashUploadBitstream( args[i] ) + " ms");
 
                    System.out.println("First free sector: " + ztex.flashFirstFreeSector() );
 
                }
            }
            }
        }
        }
        catch (Exception e) {
        catch (Exception e) {
            System.out.println("Error: "+e.getLocalizedMessage() );
            System.out.println("Error: "+e.getLocalizedMessage() );
        }
        }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.