mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Merge branch 'ide-1.5.x-thirdpartyboardprofiles' of github.com:projectgus/Arduino into projectgus-ide-1.5.x-thirdpartyboardprofiles
Conflicts: app/src/processing/app/debug/BasicUploader.java
This commit is contained in:
@ -51,7 +51,13 @@ public class BasicUploader 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.
|
||||||
|
@ -47,8 +47,16 @@ 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) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(platforms.size() == 0) {
|
||||||
|
throw new TargetPlatformException("No architecture directories with boards.txt files were found in hardware folder " + _folder.getName() + ". Is it pre-1.5?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user