"C:...mdb.bat" < pgm.txtThis works fine. In my pgm.txt I use the following commands:
device PIC32MX795F512LHowever I was trying to make a general .bat that would work for any hex file. This lead to the following:
hwtool ICD3 -p
program "./myFile.hex"
quit
(This works as expected with one caveat. After programming the device the "quit" command never executes and I'm left with an exception:
echo device PIC32MX795F512L
echo hwtool ICD3 -p
echo program %1
echo quit
) | "C:...mdb.bat"
>This same exception will occur if I omit the "quit" command in the pgm.txt version of the file. If I put "quit" as the first command in the .bat program, MDB will simply show an empty ">" indicating that the input was accepted, but it won't quit. The rest of the commands still execute.
>Exception in thread "main" java.util.NoSuchElementException: No line found
at java.util.Scanner.nextLine(Scanner.java:1540)
at com.microchip.mplab.mdb.debugcommands.Main.run(Main.java:163)
at com.microchip.mplab.mdb.debugcommands.Main.main(Main.java:136)
更多回帖