File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
app/src/processing/app/debug Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -270,12 +270,25 @@ public boolean burnBootloader() throws RunnerException {
270270 prefs .putAll (Base .getBoardPreferences ());
271271 prefs .putAll (programmerPrefs );
272272
273- // Add configuration for bootloader tool
274- String toolName = prefs .get ("bootloader.tool" );
275- PreferencesMap toolPrefs = targetPlatform .getTool (toolName );
273+ // Create configuration for bootloader tool
274+ PreferencesMap toolPrefs = new PreferencesMap ();
275+ String tool = prefs .get ("bootloader.tool" );
276+ if (tool .contains (":" )) {
277+ String [] split = tool .split (":" , 2 );
278+ TargetPlatform platform = Base .getCurrentTargetPlatformFromPackage (split [0 ]);
279+ tool = split [1 ];
280+ toolPrefs .putAll (platform .getTool (tool ));
281+ if (toolPrefs .size () == 0 )
282+ throw new RunnerException (
283+ I18n .format (_ ("Could not find tool {0} from package {1}" ), tool ,
284+ split [0 ]));
285+ }
286+ toolPrefs .putAll (targetPlatform .getTool (tool ));
276287 if (toolPrefs .size () == 0 )
277288 throw new RunnerException (I18n .format (_ ("Could not find tool {0}" ),
278- toolName ));
289+ tool ));
290+
291+ // Merge tool with global configuration
279292 prefs .putAll (toolPrefs );
280293 if (verbose ) {
281294 prefs .put ("erase.verbose" , prefs .get ("erase.params.verbose" ));
You can’t perform that action at this time.
0 commit comments