diff --git a/arduino-core/src/cc/arduino/Compiler.java b/arduino-core/src/cc/arduino/Compiler.java index 858bd1586..29ca80dad 100644 --- a/arduino-core/src/cc/arduino/Compiler.java +++ b/arduino-core/src/cc/arduino/Compiler.java @@ -51,6 +51,7 @@ import java.nio.file.StandardCopyOption; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Map; import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -235,6 +236,12 @@ public class Compiler implements MessageConsumer { commandLine.addArgument("-prefs=build.warn_data_percentage=" + PreferencesData.get("build.warn_data_percentage")); + for (Map.Entry entry : BaseNoGui.getBoardPreferences().entrySet()) { + if (entry.getKey().startsWith("runtime.tools")) { + commandLine.addArgument("-prefs=" + entry.getKey() + "=" + entry.getValue()); + } + } + //commandLine.addArgument("-debug-level=10", false); if (verbose) { diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index d6137e7db..bfe808332 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -169,6 +169,7 @@ public class BaseNoGui { for (ContributedTool tool : platform.getResolvedTools()) { File folder = tool.getDownloadableContribution(getPlatform()).getInstalledFolder(); String toolPath = folder.getAbsolutePath(); + prefs.put(prefix + tool.getName() + ".path", toolPath); PreferencesData.set(prefix + tool.getName() + ".path", toolPath); PreferencesData.set(prefix + tool.getName() + "-" + tool.getVersion() + ".path", toolPath); }