1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-18 07:52:14 +01:00

Removing parallel programming bootloader options, adding a upload.application preference to force use of uisp. Not flushing the serial port on bootloader burn.

This commit is contained in:
David A. Mellis 2007-07-25 23:46:55 +00:00
parent 2383b4647c
commit ec36805374
4 changed files with 33 additions and 25 deletions

View File

@ -65,6 +65,9 @@ public class AvrdudeUploader extends Uploader {
if (!Preferences.getBoolean("upload.verify"))
commandDownloader.add("-V");
commandDownloader.add("-Uflash:w:" + buildPath + File.separator + className + ".hex:i");
flushSerialBuffer();
return uisp(commandDownloader);
}
@ -119,8 +122,6 @@ public class AvrdudeUploader extends Uploader {
}
public boolean uisp(Collection params) throws RunnerException {
flushSerialBuffer();
List commandDownloader = new ArrayList();
commandDownloader.add("avrdude");

View File

@ -764,16 +764,16 @@ public class Editor extends JFrame
});
menu.add(burnBootloader168DiecimilaItem);
if (!Base.isMacOS()) {
burnBootloader168DiecimilaParallelItem =
new JMenuItem("Burn Diecimila Bootloader (parallel port)");
burnBootloader168DiecimilaParallelItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
handleBurnBootloader("atmega168-diecimila", true);
}
});
menu.add(burnBootloader168DiecimilaParallelItem);
}
// if (!Base.isMacOS()) {
// burnBootloader168DiecimilaParallelItem =
// new JMenuItem("Burn Diecimila Bootloader (parallel port)");
// burnBootloader168DiecimilaParallelItem.addActionListener(new ActionListener() {
// public void actionPerformed(ActionEvent e) {
// handleBurnBootloader("atmega168-diecimila", true);
// }
// });
// menu.add(burnBootloader168DiecimilaParallelItem);
// }
burnBootloader168NGItem = new JMenuItem("Burn NG/Mini Bootloader");
burnBootloader168NGItem.addActionListener(new ActionListener() {
@ -783,16 +783,16 @@ public class Editor extends JFrame
});
menu.add(burnBootloader168NGItem);
if (!Base.isMacOS()) {
burnBootloader168NGParallelItem =
new JMenuItem("Burn NG/Mini Bootloader (parallel port)");
burnBootloader168NGParallelItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
handleBurnBootloader("atmega168-ng", true);
}
});
menu.add(burnBootloader168NGParallelItem);
}
// if (!Base.isMacOS()) {
// burnBootloader168NGParallelItem =
// new JMenuItem("Burn NG/Mini Bootloader (parallel port)");
// burnBootloader168NGParallelItem.addActionListener(new ActionListener() {
// public void actionPerformed(ActionEvent e) {
// handleBurnBootloader("atmega168-ng", true);
// }
// });
// menu.add(burnBootloader168NGParallelItem);
// }
showBootloaderMenuItemsForCurrentMCU();

View File

@ -1672,10 +1672,16 @@ public class Sketch {
protected String upload(String buildPath, String suggestedClassName)
throws RunnerException {
Uploader uploader;
// download the program
//
Uploader uploader = new AvrdudeUploader();
if ("uisp".equals(Preferences.get("upload.application"))) {
uploader = new UispUploader();
} else {
uploader = new AvrdudeUploader();
}
// macos9 now officially broken.. see PdeCompilerJavac
//PdeCompiler compiler =
// ((PdeBase.platform == PdeBase.MACOS9) ?

View File

@ -69,6 +69,9 @@ public class UispUploader extends Uploader {
if (Preferences.getBoolean("upload.verify"))
commandDownloader.add("--verify");
commandDownloader.add("if=" + buildPath + File.separator + className + ".hex");
flushSerialBuffer();
return uisp(commandDownloader);
}
@ -120,8 +123,6 @@ public class UispUploader extends Uploader {
}
public boolean uisp(Collection params) throws RunnerException {
flushSerialBuffer();
List commandDownloader = new ArrayList();
commandDownloader.add("uisp");
if (Preferences.getBoolean("upload.verbose"))