Skip to content

Commit 8595d14

Browse files
committed
Merge pull request #1790 from cmaglie/platform-paths
Fixed "runtime.hardware.path" and "runtime.platform.path" values
2 parents 572592a + 4dc21ce commit 8595d14

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

app/src/processing/app/Base.java

+4
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,10 @@ private void selectBoard(TargetBoard targetBoard) {
15541554
Preferences.set("target_platform", targetPlatform.getId());
15551555
Preferences.set("board", targetBoard.getId());
15561556

1557+
File platformFolder = targetPlatform.getFolder();
1558+
Preferences.set("runtime.platform.path", platformFolder.getAbsolutePath());
1559+
Preferences.set("runtime.hardware.path", platformFolder.getParentFile().getAbsolutePath());
1560+
15571561
filterVisibilityOfSubsequentBoardMenus(targetBoard, 1);
15581562

15591563
onBoardOrPortChange();

app/src/processing/app/Preferences.java

-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ static protected void init(String commandLinePrefs) {
231231

232232
// set some runtime constants (not saved on preferences file)
233233
File hardwareFolder = Base.getHardwareFolder();
234-
table.put("runtime.hardware.path", hardwareFolder.getAbsolutePath());
235234
table.put("runtime.ide.path", hardwareFolder.getParentFile().getAbsolutePath());
236235
table.put("runtime.ide.version", "" + Base.REVISION);
237236

hardware/arduino/avr/platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{bu
8484

8585
tools.avrdude.bootloader.params.verbose=-v -v -v -v
8686
tools.avrdude.bootloader.params.quiet=-q -q
87-
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
87+
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
8888

8989

9090
# USB Default Flags

0 commit comments

Comments
 (0)