mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-01 03:47:23 +03: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:
@ -65,6 +65,9 @@ public class AvrdudeUploader extends Uploader {
|
|||||||
if (!Preferences.getBoolean("upload.verify"))
|
if (!Preferences.getBoolean("upload.verify"))
|
||||||
commandDownloader.add("-V");
|
commandDownloader.add("-V");
|
||||||
commandDownloader.add("-Uflash:w:" + buildPath + File.separator + className + ".hex:i");
|
commandDownloader.add("-Uflash:w:" + buildPath + File.separator + className + ".hex:i");
|
||||||
|
|
||||||
|
flushSerialBuffer();
|
||||||
|
|
||||||
return uisp(commandDownloader);
|
return uisp(commandDownloader);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,8 +122,6 @@ public class AvrdudeUploader extends Uploader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean uisp(Collection params) throws RunnerException {
|
public boolean uisp(Collection params) throws RunnerException {
|
||||||
flushSerialBuffer();
|
|
||||||
|
|
||||||
List commandDownloader = new ArrayList();
|
List commandDownloader = new ArrayList();
|
||||||
commandDownloader.add("avrdude");
|
commandDownloader.add("avrdude");
|
||||||
|
|
||||||
|
@ -764,16 +764,16 @@ public class Editor extends JFrame
|
|||||||
});
|
});
|
||||||
menu.add(burnBootloader168DiecimilaItem);
|
menu.add(burnBootloader168DiecimilaItem);
|
||||||
|
|
||||||
if (!Base.isMacOS()) {
|
// if (!Base.isMacOS()) {
|
||||||
burnBootloader168DiecimilaParallelItem =
|
// burnBootloader168DiecimilaParallelItem =
|
||||||
new JMenuItem("Burn Diecimila Bootloader (parallel port)");
|
// new JMenuItem("Burn Diecimila Bootloader (parallel port)");
|
||||||
burnBootloader168DiecimilaParallelItem.addActionListener(new ActionListener() {
|
// burnBootloader168DiecimilaParallelItem.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
// public void actionPerformed(ActionEvent e) {
|
||||||
handleBurnBootloader("atmega168-diecimila", true);
|
// handleBurnBootloader("atmega168-diecimila", true);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
menu.add(burnBootloader168DiecimilaParallelItem);
|
// menu.add(burnBootloader168DiecimilaParallelItem);
|
||||||
}
|
// }
|
||||||
|
|
||||||
burnBootloader168NGItem = new JMenuItem("Burn NG/Mini Bootloader");
|
burnBootloader168NGItem = new JMenuItem("Burn NG/Mini Bootloader");
|
||||||
burnBootloader168NGItem.addActionListener(new ActionListener() {
|
burnBootloader168NGItem.addActionListener(new ActionListener() {
|
||||||
@ -783,16 +783,16 @@ public class Editor extends JFrame
|
|||||||
});
|
});
|
||||||
menu.add(burnBootloader168NGItem);
|
menu.add(burnBootloader168NGItem);
|
||||||
|
|
||||||
if (!Base.isMacOS()) {
|
// if (!Base.isMacOS()) {
|
||||||
burnBootloader168NGParallelItem =
|
// burnBootloader168NGParallelItem =
|
||||||
new JMenuItem("Burn NG/Mini Bootloader (parallel port)");
|
// new JMenuItem("Burn NG/Mini Bootloader (parallel port)");
|
||||||
burnBootloader168NGParallelItem.addActionListener(new ActionListener() {
|
// burnBootloader168NGParallelItem.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
// public void actionPerformed(ActionEvent e) {
|
||||||
handleBurnBootloader("atmega168-ng", true);
|
// handleBurnBootloader("atmega168-ng", true);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
menu.add(burnBootloader168NGParallelItem);
|
// menu.add(burnBootloader168NGParallelItem);
|
||||||
}
|
// }
|
||||||
|
|
||||||
showBootloaderMenuItemsForCurrentMCU();
|
showBootloaderMenuItemsForCurrentMCU();
|
||||||
|
|
||||||
|
@ -1673,9 +1673,15 @@ public class Sketch {
|
|||||||
protected String upload(String buildPath, String suggestedClassName)
|
protected String upload(String buildPath, String suggestedClassName)
|
||||||
throws RunnerException {
|
throws RunnerException {
|
||||||
|
|
||||||
|
Uploader uploader;
|
||||||
|
|
||||||
// download the program
|
// 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
|
// macos9 now officially broken.. see PdeCompilerJavac
|
||||||
//PdeCompiler compiler =
|
//PdeCompiler compiler =
|
||||||
// ((PdeBase.platform == PdeBase.MACOS9) ?
|
// ((PdeBase.platform == PdeBase.MACOS9) ?
|
||||||
|
@ -69,6 +69,9 @@ public class UispUploader extends Uploader {
|
|||||||
if (Preferences.getBoolean("upload.verify"))
|
if (Preferences.getBoolean("upload.verify"))
|
||||||
commandDownloader.add("--verify");
|
commandDownloader.add("--verify");
|
||||||
commandDownloader.add("if=" + buildPath + File.separator + className + ".hex");
|
commandDownloader.add("if=" + buildPath + File.separator + className + ".hex");
|
||||||
|
|
||||||
|
flushSerialBuffer();
|
||||||
|
|
||||||
return uisp(commandDownloader);
|
return uisp(commandDownloader);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,8 +123,6 @@ public class UispUploader extends Uploader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean uisp(Collection params) throws RunnerException {
|
public boolean uisp(Collection params) throws RunnerException {
|
||||||
flushSerialBuffer();
|
|
||||||
|
|
||||||
List commandDownloader = new ArrayList();
|
List commandDownloader = new ArrayList();
|
||||||
commandDownloader.add("uisp");
|
commandDownloader.add("uisp");
|
||||||
if (Preferences.getBoolean("upload.verbose"))
|
if (Preferences.getBoolean("upload.verbose"))
|
||||||
|
Reference in New Issue
Block a user