Skip to content

Commit a7e6a39

Browse files
committed
programmer.txt has now priority over platforms.txt tools definitions
This allows properties defined in programmers.txt to override generic configurations in platform.txt where needed, for example in the following configuration: programmers.txt: myprog.name=My New Programmer [...] myprog.program.tool=avrdude myprog.config.path={runtime.platform.path}/myprog_avrdude.conf [...] platform.txt: tools.avrdude.path={runtime.tools.avrdude.path} tools.avrdude.cmd.path={path}/bin/avrdude tools.avrdude.config.path={path}/etc/avrdude.conf [...] tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i" the generic tools.avrdude.config.path value {path}/etc/avrdude.conf is replaced by the more specific myprog.config.path used in "myprog" programmer {runtime.plaform.path}/myprog_avrdude.conf
1 parent 5af390b commit a7e6a39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ public boolean uploadUsingProgrammer(String buildPath, String className) throws
253253
if (programmerPrefs == null)
254254
throw new RunnerException(
255255
_("Please select a programmer from Tools->Programmer menu"));
256+
prefs.putAll(targetPlatform.getTool(programmerPrefs.getOrExcept("program.tool")));
256257
prefs.putAll(programmerPrefs);
257-
prefs.putAll(targetPlatform.getTool(prefs.getOrExcept("program.tool")));
258258

259259
prefs.put("build.path", buildPath);
260260
prefs.put("build.project_name", className);

0 commit comments

Comments
 (0)