mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Now passing config file path to avrdude.
This commit is contained in:
@ -118,24 +118,37 @@ public class AvrdudeUploader extends Uploader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean uisp(Collection params) throws RunnerException {
|
public boolean uisp(Collection params) throws RunnerException {
|
||||||
flushSerialBuffer();
|
flushSerialBuffer();
|
||||||
|
|
||||||
List commandDownloader = new ArrayList();
|
String userdir = System.getProperty("user.dir") + File.separator;
|
||||||
commandDownloader.add("avrdude");
|
String avrBasePath;
|
||||||
if (Preferences.getBoolean("upload.verbose")) {
|
if(Base.isMacOS()) {
|
||||||
commandDownloader.add("-v");
|
avrBasePath = new String("tools/avr/etc/");
|
||||||
commandDownloader.add("-v");
|
}
|
||||||
commandDownloader.add("-v");
|
else if(Base.isLinux()) {
|
||||||
commandDownloader.add("-v");
|
avrBasePath = new String("");
|
||||||
} else {
|
}
|
||||||
commandDownloader.add("-q");
|
else {
|
||||||
commandDownloader.add("-q");
|
avrBasePath = new String(userdir + "tools/avr/etc/");
|
||||||
}
|
}
|
||||||
// XXX: quick hack to chop the "atmega" off of "atmega8" and "atmega168",
|
|
||||||
// then shove an "m" at the beginning. won't work for attiny's, etc.
|
|
||||||
commandDownloader.add("-pm" + Preferences.get("build.mcu").substring(6));
|
|
||||||
commandDownloader.addAll(params);
|
|
||||||
|
|
||||||
return executeUploadCommand(commandDownloader);
|
List commandDownloader = new ArrayList();
|
||||||
|
commandDownloader.add("avrdude");
|
||||||
|
commandDownloader.add("-C" + avrBasePath + File.separator + "avrdude.conf");
|
||||||
|
if (Preferences.getBoolean("upload.verbose")) {
|
||||||
|
commandDownloader.add("-v");
|
||||||
|
commandDownloader.add("-v");
|
||||||
|
commandDownloader.add("-v");
|
||||||
|
commandDownloader.add("-v");
|
||||||
|
} else {
|
||||||
|
commandDownloader.add("-q");
|
||||||
|
commandDownloader.add("-q");
|
||||||
|
}
|
||||||
|
// XXX: quick hack to chop the "atmega" off of "atmega8" and "atmega168",
|
||||||
|
// then shove an "m" at the beginning. won't work for attiny's, etc.
|
||||||
|
commandDownloader.add("-pm" + Preferences.get("build.mcu").substring(6));
|
||||||
|
commandDownloader.addAll(params);
|
||||||
|
|
||||||
|
return executeUploadCommand(commandDownloader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user