mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Merge remote-tracking branch 'arduino/ide-1.5.x' into dev-ide-1.5.x-discovery
This commit is contained in:
commit
dec06c0423
@ -49,7 +49,13 @@ public class SerialUploader extends Uploader {
|
|||||||
TargetPlatform targetPlatform = Base.getTargetPlatform();
|
TargetPlatform targetPlatform = Base.getTargetPlatform();
|
||||||
PreferencesMap prefs = Preferences.getMap();
|
PreferencesMap prefs = Preferences.getMap();
|
||||||
prefs.putAll(Base.getBoardPreferences());
|
prefs.putAll(Base.getBoardPreferences());
|
||||||
prefs.putAll(targetPlatform.getTool(prefs.getOrExcept("upload.tool")));
|
String tool = prefs.getOrExcept("upload.tool");
|
||||||
|
if (tool.contains(":")) {
|
||||||
|
String[] split = tool.split(":", 2);
|
||||||
|
targetPlatform = Base.getCurrentTargetPlatformFromPackage(split[0]);
|
||||||
|
tool = split[1];
|
||||||
|
}
|
||||||
|
prefs.putAll(targetPlatform.getTool(tool));
|
||||||
|
|
||||||
// if no protocol is specified for this board, assume it lacks a
|
// if no protocol is specified for this board, assume it lacks a
|
||||||
// bootloader and upload using the selected programmer.
|
// bootloader and upload using the selected programmer.
|
||||||
|
@ -23,11 +23,14 @@
|
|||||||
*/
|
*/
|
||||||
package processing.app.debug;
|
package processing.app.debug;
|
||||||
|
|
||||||
|
import static processing.app.I18n._;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import processing.app.I18n;
|
||||||
import processing.app.helpers.filefilters.OnlyDirs;
|
import processing.app.helpers.filefilters.OnlyDirs;
|
||||||
|
|
||||||
public class TargetPackage {
|
public class TargetPackage {
|
||||||
@ -47,8 +50,18 @@ public class TargetPackage {
|
|||||||
if (!subFolder.exists() || !subFolder.canRead())
|
if (!subFolder.exists() || !subFolder.canRead())
|
||||||
continue;
|
continue;
|
||||||
String arch = subFolder.getName();
|
String arch = subFolder.getName();
|
||||||
TargetPlatform platform = new TargetPlatform(arch, subFolder, this);
|
try {
|
||||||
platforms.put(arch, platform);
|
TargetPlatform platform = new TargetPlatform(arch, subFolder, this);
|
||||||
|
platforms.put(arch, platform);
|
||||||
|
} catch (TargetPlatformException e) {
|
||||||
|
System.out.println(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (platforms.size() == 0) {
|
||||||
|
throw new TargetPlatformException(I18n
|
||||||
|
.format(_("No valid hardware definitions found in folder {0}."),
|
||||||
|
_folder.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user