mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-01 23:29:28 +01:00
Another update on the way burnBootloader builds its configuration.
See #1038 #1176
This commit is contained in:
parent
8ef2fe3faf
commit
a6bf2bb567
@ -270,12 +270,25 @@ public class BasicUploader extends Uploader {
|
|||||||
prefs.putAll(Base.getBoardPreferences());
|
prefs.putAll(Base.getBoardPreferences());
|
||||||
prefs.putAll(programmerPrefs);
|
prefs.putAll(programmerPrefs);
|
||||||
|
|
||||||
// Add configuration for bootloader tool
|
// Create configuration for bootloader tool
|
||||||
String toolName = prefs.get("bootloader.tool");
|
PreferencesMap toolPrefs = new PreferencesMap();
|
||||||
PreferencesMap toolPrefs = targetPlatform.getTool(toolName);
|
String tool = prefs.get("bootloader.tool");
|
||||||
|
if (tool.contains(":")) {
|
||||||
|
String[] split = tool.split(":", 2);
|
||||||
|
TargetPlatform platform = Base.getCurrentTargetPlatformFromPackage(split[0]);
|
||||||
|
tool = split[1];
|
||||||
|
toolPrefs.putAll(platform.getTool(tool));
|
||||||
|
if (toolPrefs.size() == 0)
|
||||||
|
throw new RunnerException(
|
||||||
|
I18n.format(_("Could not find tool {0} from package {1}"), tool,
|
||||||
|
split[0]));
|
||||||
|
}
|
||||||
|
toolPrefs.putAll(targetPlatform.getTool(tool));
|
||||||
if (toolPrefs.size() == 0)
|
if (toolPrefs.size() == 0)
|
||||||
throw new RunnerException(I18n.format(_("Could not find tool {0}"),
|
throw new RunnerException(I18n.format(_("Could not find tool {0}"),
|
||||||
toolName));
|
tool));
|
||||||
|
|
||||||
|
// Merge tool with global configuration
|
||||||
prefs.putAll(toolPrefs);
|
prefs.putAll(toolPrefs);
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
prefs.put("erase.verbose", prefs.get("erase.params.verbose"));
|
prefs.put("erase.verbose", prefs.get("erase.params.verbose"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user