mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-17 11:54:33 +01:00
Switched to new burn bootloader menu system, dynamically generated from the programmers.txt file.
This commit is contained in:
parent
adeff81ceb
commit
63280151de
@ -36,100 +36,79 @@ public class AvrdudeUploader extends Uploader {
|
||||
public AvrdudeUploader() {
|
||||
}
|
||||
|
||||
// XXX: add support for uploading sketches using a programmer
|
||||
public boolean uploadUsingPreferences(String buildPath, String className)
|
||||
throws RunnerException {
|
||||
throws RunnerException {
|
||||
List commandDownloader = new ArrayList();
|
||||
|
||||
// avrdude doesn't want to read device signatures (it always gets
|
||||
// 0x000000); force it to continue uploading anyway
|
||||
//commandDownloader.add("-F");
|
||||
|
||||
String protocol = Preferences.get("boards." + Preferences.get("board") + ".upload.protocol");
|
||||
|
||||
// avrdude wants "stk500v1" to distinguish it from stk500v2
|
||||
if (protocol.equals("stk500"))
|
||||
protocol = "stk500v1";
|
||||
commandDownloader.add("-c" + protocol);
|
||||
if (protocol.equals("dapa")) {
|
||||
// avrdude doesn't need to be told the address of the parallel port
|
||||
//commandDownloader.add("-dlpt=" + Preferences.get("parallel.port"));
|
||||
} else {
|
||||
commandDownloader.add("-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port"));
|
||||
commandDownloader.add(
|
||||
"-b" + Preferences.getInteger("boards." + Preferences.get("board") + ".upload.speed"));
|
||||
}
|
||||
if (Preferences.getBoolean("upload.erase"))
|
||||
commandDownloader.add("-e");
|
||||
else
|
||||
commandDownloader.add("-D");
|
||||
if (!Preferences.getBoolean("upload.verify"))
|
||||
commandDownloader.add("-V");
|
||||
commandDownloader.add("-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port"));
|
||||
commandDownloader.add(
|
||||
"-b" + Preferences.getInteger("boards." + Preferences.get("board") + ".upload.speed"));
|
||||
commandDownloader.add("-D"); // don't erase
|
||||
commandDownloader.add("-Uflash:w:" + buildPath + File.separator + className + ".hex:i");
|
||||
|
||||
flushSerialBuffer();
|
||||
|
||||
return uisp(commandDownloader);
|
||||
return avrdude(commandDownloader);
|
||||
}
|
||||
|
||||
public boolean burnBootloaderAVRISP(String target) throws RunnerException {
|
||||
List commandDownloader = new ArrayList();
|
||||
commandDownloader.add("-c" +
|
||||
Preferences.get("bootloader." + target + ".programmer"));
|
||||
|
||||
if (Preferences.get("bootloader." + target + ".communication").equals("usb")) {
|
||||
commandDownloader.add("-Pusb");
|
||||
} else {
|
||||
commandDownloader.add(
|
||||
"-P" + (Base.isWindows() ?
|
||||
"/dev/" + Preferences.get("serial.port").toLowerCase() :
|
||||
Preferences.get("serial.port")));
|
||||
|
||||
public boolean burnBootloader(String programmer) throws RunnerException {
|
||||
List params = new ArrayList();
|
||||
params.add("-c" + Preferences.get("programmers." + programmer + ".protocol"));
|
||||
|
||||
if ("usb".equals(Preferences.get("programmers." + programmer + ".communication"))) {
|
||||
params.add("-Pusb");
|
||||
} else if ("serial".equals(Preferences.get("programmers." + programmer + ".communication"))) {
|
||||
params.add("-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port"));
|
||||
// XXX: add support for specifying the baud rate for serial programmers.
|
||||
}
|
||||
commandDownloader.add("-b" + Preferences.get("serial.burn_rate"));
|
||||
return burnBootloader(target, commandDownloader);
|
||||
// XXX: add support for specifying the port address for parallel
|
||||
// programmers, although avrdude has a default that works in most cases.
|
||||
|
||||
if (Preferences.get("programmers." + programmer + ".delay") != null)
|
||||
params.add("-i" + Preferences.get("programmers." + programmer + ".delay"));
|
||||
|
||||
return burnBootloader(params);
|
||||
}
|
||||
|
||||
public boolean burnBootloaderParallel(String target) throws RunnerException {
|
||||
List commandDownloader = new ArrayList();
|
||||
commandDownloader.add("-dprog=dapa");
|
||||
commandDownloader.add("-dlpt=" + Preferences.get("parallel.port"));
|
||||
return burnBootloader(target, commandDownloader);
|
||||
protected boolean burnBootloader(Collection params)
|
||||
throws RunnerException {
|
||||
List fuses = new ArrayList();
|
||||
fuses.add("-e"); // erase the chip
|
||||
fuses.add("-Ulock:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.unlock_bits") + ":m");
|
||||
if (Preferences.get("boards." + Preferences.get("board") + ".bootloader.extended_fuses") != null)
|
||||
fuses.add("-Uefuse:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.extended_fuses") + ":m");
|
||||
fuses.add("-Uhfuse:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.high_fuses") + ":m");
|
||||
fuses.add("-Ulfuse:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.low_fuses") + ":m");
|
||||
|
||||
if (!avrdude(params, fuses))
|
||||
return false;
|
||||
|
||||
List bootloader = new ArrayList();
|
||||
bootloader.add("-Uflash:w:" + "hardware" + File.separator + "bootloaders" + File.separator +
|
||||
Preferences.get("boards." + Preferences.get("board") + ".bootloader.path") +
|
||||
File.separator + Preferences.get("boards." + Preferences.get("board") + ".bootloader.file") + ":i");
|
||||
bootloader.add("-Ulock:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.lock_bits") + ":m");
|
||||
|
||||
return avrdude(params, bootloader);
|
||||
}
|
||||
|
||||
protected boolean burnBootloader(String target, Collection params)
|
||||
throws RunnerException
|
||||
{
|
||||
return
|
||||
// unlock bootloader segment of flash memory and write fuses
|
||||
uisp(params, Arrays.asList(new String[] {
|
||||
"-e",
|
||||
"-Ulock:w:" + Preferences.get("bootloader." + target + ".unlock_bits") + ":m",
|
||||
"-Uefuse:w:" + Preferences.get("bootloader." + target + ".extended_fuses") + ":m",
|
||||
"-Uhfuse:w:" + Preferences.get("bootloader." + target + ".high_fuses") + ":m",
|
||||
"-Ulfuse:w:" + Preferences.get("bootloader." + target + ".low_fuses") + ":m",
|
||||
})) &&
|
||||
// upload bootloader and lock bootloader segment
|
||||
uisp(params, Arrays.asList(new String[] {
|
||||
"-Uflash:w:" + Preferences.get("bootloader." + target + ".path") +
|
||||
File.separator + Preferences.get("bootloader." + target + ".file") + ":i",
|
||||
"-Ulock:w:" + Preferences.get("bootloader." + target + ".lock_bits") + ":m"
|
||||
}));
|
||||
}
|
||||
|
||||
public boolean uisp(Collection p1, Collection p2) throws RunnerException {
|
||||
public boolean avrdude(Collection p1, Collection p2) throws RunnerException {
|
||||
ArrayList p = new ArrayList(p1);
|
||||
p.addAll(p2);
|
||||
return uisp(p);
|
||||
return avrdude(p);
|
||||
}
|
||||
|
||||
public boolean uisp(Collection params) throws RunnerException {
|
||||
public boolean avrdude(Collection params) throws RunnerException {
|
||||
List commandDownloader = new ArrayList();
|
||||
commandDownloader.add("avrdude");
|
||||
|
||||
// On Windows and the Mac, we need to point avrdude at its config file
|
||||
// since it's getting installed in an unexpected location (i.e. a
|
||||
// sub-directory of wherever the user happens to stick Arduino). On Linux,
|
||||
// avrdude will have been properly installed by the distribution's package
|
||||
// manager and should be able to find its config file.
|
||||
// Point avrdude at its config file since it's in a non-standard location.
|
||||
if(Base.isMacOS()) {
|
||||
commandDownloader.add("-C" + "hardware/tools/avr/etc/avrdude.conf");
|
||||
}
|
||||
@ -137,6 +116,8 @@ public class AvrdudeUploader extends Uploader {
|
||||
String userdir = System.getProperty("user.dir") + File.separator;
|
||||
commandDownloader.add("-C" + userdir + "hardware/tools/avr/etc/avrdude.conf");
|
||||
} else {
|
||||
// ???: is it better to have Linux users install avrdude themselves, in
|
||||
// a way that it can find its own configuration file?
|
||||
commandDownloader.add("-C" + "hardware/tools/avrdude.conf");
|
||||
}
|
||||
|
||||
|
136
app/Editor.java
136
app/Editor.java
@ -802,64 +802,73 @@ public class Editor extends JFrame
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
burnBootloader8Item = new JMenuItem("Burn Bootloader");
|
||||
burnBootloader8Item.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleBurnBootloader("atmega8", false);
|
||||
}
|
||||
});
|
||||
menu.add(burnBootloader8Item);
|
||||
|
||||
if (!Base.isMacOS()) {
|
||||
burnBootloader8ParallelItem =
|
||||
new JMenuItem("Burn Bootloader (parallel port)");
|
||||
burnBootloader8ParallelItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleBurnBootloader("atmega8", true);
|
||||
}
|
||||
});
|
||||
menu.add(burnBootloader8ParallelItem);
|
||||
JMenu bootloaderMenu = new JMenu("Burn Bootloader");
|
||||
for (Iterator i = Preferences.getSubKeys("programmers"); i.hasNext(); ) {
|
||||
String programmer = (String) i.next();
|
||||
Action action = new BootloaderMenuAction(programmer);
|
||||
item = new JMenuItem(action);
|
||||
bootloaderMenu.add(item);
|
||||
}
|
||||
menu.add(bootloaderMenu);
|
||||
|
||||
burnBootloader168DiecimilaItem = new JMenuItem("Burn Diecimila Bootloader");
|
||||
burnBootloader168DiecimilaItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleBurnBootloader("atmega168-diecimila", false);
|
||||
}
|
||||
});
|
||||
menu.add(burnBootloader168DiecimilaItem);
|
||||
|
||||
// burnBootloader8Item = new JMenuItem("Burn Bootloader");
|
||||
// burnBootloader8Item.addActionListener(new ActionListener() {
|
||||
// public void actionPerformed(ActionEvent e) {
|
||||
// handleBurnBootloader("atmega8", false);
|
||||
// }
|
||||
// });
|
||||
// menu.add(burnBootloader8Item);
|
||||
//
|
||||
// if (!Base.isMacOS()) {
|
||||
// burnBootloader168DiecimilaParallelItem =
|
||||
// new JMenuItem("Burn Diecimila Bootloader (parallel port)");
|
||||
// burnBootloader168DiecimilaParallelItem.addActionListener(new ActionListener() {
|
||||
// burnBootloader8ParallelItem =
|
||||
// new JMenuItem("Burn Bootloader (parallel port)");
|
||||
// burnBootloader8ParallelItem.addActionListener(new ActionListener() {
|
||||
// public void actionPerformed(ActionEvent e) {
|
||||
// handleBurnBootloader("atmega168-diecimila", true);
|
||||
// handleBurnBootloader("atmega8", true);
|
||||
// }
|
||||
// });
|
||||
// menu.add(burnBootloader168DiecimilaParallelItem);
|
||||
// menu.add(burnBootloader8ParallelItem);
|
||||
// }
|
||||
|
||||
burnBootloader168NGItem = new JMenuItem("Burn NG/Mini Bootloader");
|
||||
burnBootloader168NGItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleBurnBootloader("atmega168-ng", false);
|
||||
}
|
||||
});
|
||||
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);
|
||||
// }
|
||||
|
||||
showBootloaderMenuItemsForCurrentMCU();
|
||||
//
|
||||
// burnBootloader168DiecimilaItem = new JMenuItem("Burn Diecimila Bootloader");
|
||||
// burnBootloader168DiecimilaItem.addActionListener(new ActionListener() {
|
||||
// public void actionPerformed(ActionEvent e) {
|
||||
// handleBurnBootloader("atmega168-diecimila", false);
|
||||
// }
|
||||
// });
|
||||
// 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);
|
||||
//// }
|
||||
//
|
||||
// burnBootloader168NGItem = new JMenuItem("Burn NG/Mini Bootloader");
|
||||
// burnBootloader168NGItem.addActionListener(new ActionListener() {
|
||||
// public void actionPerformed(ActionEvent e) {
|
||||
// handleBurnBootloader("atmega168-ng", false);
|
||||
// }
|
||||
// });
|
||||
// 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);
|
||||
//// }
|
||||
//
|
||||
// showBootloaderMenuItemsForCurrentMCU();
|
||||
|
||||
menu.addMenuListener(new MenuListener() {
|
||||
public void menuCanceled(MenuEvent e) {}
|
||||
@ -943,6 +952,17 @@ public class Editor extends JFrame
|
||||
}
|
||||
}
|
||||
|
||||
class BootloaderMenuAction extends AbstractAction {
|
||||
private String programmer;
|
||||
public BootloaderMenuAction(String programmer) {
|
||||
super("w/ " + Preferences.get("programmers." + programmer + ".name"));
|
||||
this.programmer = programmer;
|
||||
}
|
||||
public void actionPerformed(ActionEvent actionevent) {
|
||||
handleBurnBootloader(programmer);
|
||||
}
|
||||
}
|
||||
|
||||
protected void populateSerialMenu() {
|
||||
// getting list of ports
|
||||
|
||||
@ -2240,25 +2260,16 @@ public class Editor extends JFrame
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void handleBurnBootloader(final String target, final boolean parallel) {
|
||||
protected void handleBurnBootloader(final String programmer) {
|
||||
if(debugging)
|
||||
doStop();
|
||||
console.clear();
|
||||
//String what = sketch.isLibrary() ? "Applet" : "Library";
|
||||
//message("Exporting " + what + "...");
|
||||
message("Burning bootloader to I/O Board (this may take a minute)...");
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
//boolean success = sketch.isLibrary() ?
|
||||
//sketch.exportLibrary() : sketch.exportApplet();
|
||||
Uploader uploader = new AvrdudeUploader();
|
||||
boolean success = parallel ?
|
||||
uploader.burnBootloaderParallel(target) :
|
||||
uploader.burnBootloaderAVRISP(target);
|
||||
|
||||
if (success) {
|
||||
if (uploader.burnBootloader(programmer)) {
|
||||
message("Done burning bootloader.");
|
||||
} else {
|
||||
// error message will already be visible
|
||||
@ -2274,7 +2285,6 @@ public class Editor extends JFrame
|
||||
}});
|
||||
}
|
||||
|
||||
|
||||
public void highlightLine(int lnum) {
|
||||
if (lnum < 0) {
|
||||
textarea.select(0, 0);
|
||||
|
@ -220,6 +220,18 @@ public class Preferences {
|
||||
"Error reading the board definitions file. " +
|
||||
"Please re-download or re-unzip Arduino.\n", ex);
|
||||
}
|
||||
|
||||
try {
|
||||
load(new FileInputStream(new File(
|
||||
System.getProperty("user.dir") +
|
||||
File.separator + "hardware" +
|
||||
File.separator + "programmers.txt")),
|
||||
"programmers");
|
||||
} catch (Exception ex) {
|
||||
Base.showError("Error reading programmers definitions",
|
||||
"Error reading the programmers definitions file. " +
|
||||
"Please re-download or re-unzip Arduino.\n", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,135 +0,0 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Uploader - default downloader class that connects to uisp
|
||||
Part of the Arduino project - http://www.arduino.cc/
|
||||
|
||||
Copyright (c) 2004-05
|
||||
Hernando Barragan
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
package processing.app;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.zip.*;
|
||||
import javax.swing.*;
|
||||
//#ifndef RXTX
|
||||
//import javax.comm.*;
|
||||
//#else
|
||||
// rxtx uses package gnu.io, but all the class names
|
||||
// are the same as those used by javax.comm
|
||||
import gnu.io.*;
|
||||
//#endif
|
||||
|
||||
|
||||
public class UispUploader extends Uploader {
|
||||
//PdePreferences preferences;
|
||||
|
||||
//Serial serialPort;
|
||||
static InputStream serialInput;
|
||||
static OutputStream serialOutput;
|
||||
//int serial; // last byte of data received
|
||||
|
||||
public UispUploader() {
|
||||
}
|
||||
|
||||
public boolean uploadUsingPreferences(String buildPath, String className)
|
||||
throws RunnerException {
|
||||
List commandDownloader = new ArrayList();
|
||||
commandDownloader.add("-dprog=" + Preferences.get("upload.programmer"));
|
||||
if (Preferences.get("upload.programmer").equals("dapa"))
|
||||
commandDownloader.add("-dlpt=" + Preferences.get("parallel.port"));
|
||||
else {
|
||||
commandDownloader.add(
|
||||
"-dserial=" + (Base.isWindows() ?
|
||||
"/dev/" + Preferences.get("serial.port").toLowerCase() :
|
||||
Preferences.get("serial.port")));
|
||||
commandDownloader.add(
|
||||
"-dspeed=" + Preferences.getInteger("serial.download_rate"));
|
||||
}
|
||||
if (Preferences.getBoolean("upload.erase"))
|
||||
commandDownloader.add("--erase");
|
||||
commandDownloader.add("--upload");
|
||||
if (Preferences.getBoolean("upload.verify"))
|
||||
commandDownloader.add("--verify");
|
||||
commandDownloader.add("if=" + buildPath + File.separator + className + ".hex");
|
||||
|
||||
flushSerialBuffer();
|
||||
|
||||
return uisp(commandDownloader);
|
||||
}
|
||||
|
||||
public boolean burnBootloaderAVRISP(String target) throws RunnerException {
|
||||
List commandDownloader = new ArrayList();
|
||||
commandDownloader.add("-dprog=" + Preferences.get("bootloader.programmer"));
|
||||
commandDownloader.add(
|
||||
"-dserial=" + (Base.isWindows() ?
|
||||
"/dev/" + Preferences.get("serial.port").toLowerCase() :
|
||||
Preferences.get("serial.port")));
|
||||
commandDownloader.add("-dspeed=" + Preferences.get("serial.burn_rate"));
|
||||
return burnBootloader(commandDownloader);
|
||||
}
|
||||
|
||||
public boolean burnBootloaderParallel(String target) throws RunnerException {
|
||||
List commandDownloader = new ArrayList();
|
||||
commandDownloader.add("-dprog=dapa");
|
||||
commandDownloader.add("-dlpt=" + Preferences.get("parallel.port"));
|
||||
return burnBootloader(commandDownloader);
|
||||
}
|
||||
|
||||
protected boolean burnBootloader(Collection params) throws RunnerException {
|
||||
// I know this is ugly; apologies - that's what happens when you try to
|
||||
// write Lisp-style code in Java.
|
||||
return
|
||||
// unlock bootloader segment of flash memory
|
||||
uisp(params, Arrays.asList(new String[] {
|
||||
"--wr_lock=" + Preferences.get("bootloader.unlock_bits") })) &&
|
||||
// write fuses:
|
||||
// bootloader size of 512 words; from 0xE00-0xFFF
|
||||
// clock speed of 16 MHz, external quartz
|
||||
uisp(params, Arrays.asList(new String[] {
|
||||
"--wr_fuse_l=" + Preferences.get("bootloader.low_fuses"),
|
||||
"--wr_fuse_h=" + Preferences.get("bootloader.high_fuses") })) &&
|
||||
// upload bootloader
|
||||
uisp(params, Arrays.asList(new String[] {
|
||||
"--erase", "--upload", "--verify",
|
||||
"if=" + Preferences.get("bootloader.path") + File.separator +
|
||||
Preferences.get("bootloader.file") })) &&
|
||||
// lock bootloader segment
|
||||
uisp(params, Arrays.asList(new String[] {
|
||||
"--wr_lock=" + Preferences.get("bootloader.lock_bits") }));
|
||||
}
|
||||
|
||||
public boolean uisp(Collection p1, Collection p2) throws RunnerException {
|
||||
ArrayList p = new ArrayList(p1);
|
||||
p.addAll(p2);
|
||||
return uisp(p);
|
||||
}
|
||||
|
||||
public boolean uisp(Collection params) throws RunnerException {
|
||||
List commandDownloader = new ArrayList();
|
||||
commandDownloader.add("uisp");
|
||||
if (Preferences.getBoolean("upload.verbose"))
|
||||
commandDownloader.add("-v=4");
|
||||
commandDownloader.add("-dpart=" + Preferences.get("build.mcu"));
|
||||
commandDownloader.addAll(params);
|
||||
|
||||
return executeUploadCommand(commandDownloader);
|
||||
}
|
||||
}
|
@ -57,10 +57,8 @@ public abstract class Uploader implements MessageConsumer {
|
||||
|
||||
public abstract boolean uploadUsingPreferences(String buildPath, String className)
|
||||
throws RunnerException;
|
||||
|
||||
public abstract boolean burnBootloaderAVRISP(String target) throws RunnerException;
|
||||
|
||||
public abstract boolean burnBootloaderParallel(String target) throws RunnerException;
|
||||
public abstract boolean burnBootloader(String programmer) throws RunnerException;
|
||||
|
||||
protected void flushSerialBuffer() throws RunnerException {
|
||||
// Cleanup the serial buffer
|
||||
|
@ -267,7 +267,6 @@
|
||||
33CF03CE09662DC000F2C9A9 /* antlr.jar in CopyFiles */ = {isa = PBXBuildFile; fileRef = 33AF620A0965D67800B514A9 /* antlr.jar */; settings = {JAVA_ARCHIVE_SUBDIR = ../shared/lib; }; };
|
||||
33CF03CF09662DC000F2C9A9 /* registry.jar in CopyFiles */ = {isa = PBXBuildFile; fileRef = 33AF620E0965D67A00B514A9 /* registry.jar */; settings = {JAVA_ARCHIVE_SUBDIR = ../shared/lib; }; };
|
||||
33CF03D009662DC000F2C9A9 /* oro.jar in CopyFiles */ = {isa = PBXBuildFile; fileRef = 33AF620D0965D67900B514A9 /* oro.jar */; settings = {JAVA_ARCHIVE_SUBDIR = ../shared/lib; }; };
|
||||
33F9446D0C2B2F6F0093EB9C /* UispUploader.java in Sources */ = {isa = PBXBuildFile; fileRef = 33F9446B0C2B2F6F0093EB9C /* UispUploader.java */; };
|
||||
33F944E10C2B33560093EB9C /* AvrdudeUploader.java in Sources */ = {isa = PBXBuildFile; fileRef = 33F944E00C2B33560093EB9C /* AvrdudeUploader.java */; };
|
||||
33FF07100965BF8A0016AC38 /* burn.command in CopyFiles */ = {isa = PBXBuildFile; fileRef = 33FFFEAF0965BD110016AC38 /* burn.command */; };
|
||||
33FF071F0965C1E30016AC38 /* about.jpg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 33FF01DE0965BD160016AC38 /* about.jpg */; };
|
||||
@ -477,7 +476,6 @@
|
||||
33BEE0CD09D7446100430D5B /* Library.java */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.java; path = Library.java; sourceTree = "<group>"; };
|
||||
33CF03B009662CA800F2C9A9 /* arduino.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = arduino.icns; path = dist/arduino.icns; sourceTree = "<group>"; };
|
||||
33DD8FB6096AC8DA0013AF8F /* Arduino.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Arduino.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33F9446B0C2B2F6F0093EB9C /* UispUploader.java */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.java; path = UispUploader.java; sourceTree = "<group>"; };
|
||||
33F944E00C2B33560093EB9C /* AvrdudeUploader.java */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.java; path = AvrdudeUploader.java; sourceTree = "<group>"; };
|
||||
33FF01DE0965BD160016AC38 /* about.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = about.jpg; sourceTree = "<group>"; };
|
||||
33FF02770965BD160016AC38 /* buttons.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = buttons.gif; sourceTree = "<group>"; };
|
||||
@ -706,7 +704,6 @@
|
||||
children = (
|
||||
33055EFE0CB8187600824CD9 /* SerialException.java */,
|
||||
33F944E00C2B33560093EB9C /* AvrdudeUploader.java */,
|
||||
33F9446B0C2B2F6F0093EB9C /* UispUploader.java */,
|
||||
33BEE0CD09D7446100430D5B /* Library.java */,
|
||||
33BEDDB009D6DC1300430D5B /* LibraryManager.java */,
|
||||
33FFFE240965BD100016AC38 /* Base.java */,
|
||||
@ -1085,7 +1082,6 @@
|
||||
33BEDDD509D6E8D800430D5B /* Archiver.java in Sources */,
|
||||
33BEDDD609D6E8D800430D5B /* ExportFolder.java in Sources */,
|
||||
33BEE0CE09D7446100430D5B /* Library.java in Sources */,
|
||||
33F9446D0C2B2F6F0093EB9C /* UispUploader.java in Sources */,
|
||||
33F944E10C2B33560093EB9C /* AvrdudeUploader.java in Sources */,
|
||||
335A29140C8CCC0900D8A7F4 /* PApplet.java in Sources */,
|
||||
335A29150C8CCC0900D8A7F4 /* PConstants.java in Sources */,
|
||||
|
@ -10,8 +10,8 @@ atmega8.bootloader.low_fuses=0xdf
|
||||
atmega8.bootloader.high_fuses=0xca
|
||||
atmega8.bootloader.path=atmega8
|
||||
atmega8.bootloader.file=ATmegaBOOT.hex
|
||||
atmega8.bootloader.unlock_bits=0xFF
|
||||
atmega8.bootloader.lock_bits=0xCF
|
||||
atmega8.bootloader.unlock_bits=0x3F
|
||||
atmega8.bootloader.lock_bits=0x0F
|
||||
|
||||
atmega8.build.mcu=atmega8
|
||||
atmega8.build.f_cpu=16000000L
|
||||
@ -30,8 +30,8 @@ atmega168.bootloader.high_fuses=0xdd
|
||||
atmega168.bootloader.extended_fuses=0x00
|
||||
atmega168.bootloader.path=atmega168
|
||||
atmega168.bootloader.file=ATmegaBOOT_168_ng.hex
|
||||
atmega168.bootloader.unlock_bits=0xFF
|
||||
atmega168.bootloader.lock_bits=0xCF
|
||||
atmega168.bootloader.unlock_bits=0x3F
|
||||
atmega168.bootloader.lock_bits=0x0F
|
||||
|
||||
atmega168.build.mcu=atmega168
|
||||
atmega168.build.f_cpu=16000000L
|
||||
@ -50,8 +50,8 @@ diecimila.bootloader.high_fuses=0xdd
|
||||
diecimila.bootloader.extended_fuses=0x00
|
||||
diecimila.bootloader.path=atmega168
|
||||
diecimila.bootloader.file=ATmegaBOOT_168_diecimila.hex
|
||||
diecimila.bootloader.unlock_bits=0xFF
|
||||
diecimila.bootloader.lock_bits=0xCF
|
||||
diecimila.bootloader.unlock_bits=0x3F
|
||||
diecimila.bootloader.lock_bits=0x0F
|
||||
|
||||
diecimila.build.mcu=atmega168
|
||||
diecimila.build.f_cpu=16000000L
|
||||
|
14
hardware/programmers.txt
Normal file
14
hardware/programmers.txt
Normal file
@ -0,0 +1,14 @@
|
||||
avrisp.name=AVR ISP
|
||||
avrisp.communication=serial
|
||||
avrisp.protocol=stk500
|
||||
|
||||
avrispmkii.name=AVRISP mkII
|
||||
avrispmkii.communication=usb
|
||||
avrispmkii.protocol=stk500v2
|
||||
|
||||
usbtinyisp.name=USBtinyISP
|
||||
usbtinyisp.protocol=usbtiny
|
||||
|
||||
parallel.name=Parallel Programmer
|
||||
parallel.protocol=dapa
|
||||
parallel.delay=800
|
Loading…
x
Reference in New Issue
Block a user