Skip to content

Commit 4d3e9e0

Browse files
author
jantje
committed
#1339 env var build.system.path not properly set
due to removal of referenced.core.path which is actually the same as runtime.platform.path While investigating I also found code that was only partially updated
1 parent 1e173fc commit 4d3e9e0

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

io.sloeber.core/config/pre_processing_platform_default.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ recipe.objcopy.hex.pattern=${recipe.objcopy.bin.pattern}
44
archive_file=arduino.ar
55
archive_file_path=${build.path}/${archive_file}
66
runtime.ide.version=10812
7-
build.system.path=${referenced.core.path}${DirectoryDelimiter}system
7+
build.system.path=${runtime.platform.path}${DirectoryDelimiter}system
88
serial.port=${com_port}
99
build.project_name=${ProjName}
1010

io.sloeber.core/src/io/sloeber/core/api/BoardsManager.java

+2-21
Original file line numberDiff line numberDiff line change
@@ -569,27 +569,8 @@ public static Map<String, String> getEnvironmentVariables() {
569569
}
570570
myWorkbenchEnvironmentVariables.clear();
571571
ArduinoPlatformVersion latestAvrPlatform = getNewestInstalledPlatform(Const.ARDUINO, Const.AVR);
572-
ArduinoPlatformVersion latestSamdPlatform = null;
573-
ArduinoPlatformVersion latestSamPlatform = null;
574-
for (ArduinoPlatformVersion curPlatform : getInstalledPlatforms()) {
575-
ArduinoPackage pkg = curPlatform.getParent().getParent();
576-
if (pkg != null) {
577-
myWorkbenchEnvironmentVariables.putAll(Helpers.getEnvVarPlatformFileTools(curPlatform, false));
578-
if (Const.ARDUINO.equalsIgnoreCase(pkg.getMaintainer())) {
579-
switch (curPlatform.getArchitecture()) {
580-
case Const.AVR:
581-
latestAvrPlatform = curPlatform;
582-
break;
583-
case Const.SAM:
584-
latestSamPlatform = curPlatform;
585-
break;
586-
case Const.SAMD:
587-
latestSamdPlatform = curPlatform;
588-
break;
589-
}
590-
}
591-
}
592-
}
572+
ArduinoPlatformVersion latestSamdPlatform = getNewestInstalledPlatform(Const.ARDUINO, Const.SAMD);
573+
ArduinoPlatformVersion latestSamPlatform = getNewestInstalledPlatform(Const.ARDUINO, Const.SAM);
593574

594575
if (latestSamdPlatform != null) {
595576
myWorkbenchEnvironmentVariables.putAll(Helpers.getEnvVarPlatformFileTools(latestSamdPlatform, false));

0 commit comments

Comments
 (0)