Skip to content

Commit

Permalink
#1339 env var build.system.path not properly set
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jantje committed Nov 25, 2021
1 parent 1e173fc commit 4d3e9e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion io.sloeber.core/config/pre_processing_platform_default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ recipe.objcopy.hex.pattern=${recipe.objcopy.bin.pattern}
archive_file=arduino.ar
archive_file_path=${build.path}/${archive_file}
runtime.ide.version=10812
build.system.path=${referenced.core.path}${DirectoryDelimiter}system
build.system.path=${runtime.platform.path}${DirectoryDelimiter}system
serial.port=${com_port}
build.project_name=${ProjName}

Expand Down
23 changes: 2 additions & 21 deletions io.sloeber.core/src/io/sloeber/core/api/BoardsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -569,27 +569,8 @@ public static Map<String, String> getEnvironmentVariables() {
}
myWorkbenchEnvironmentVariables.clear();
ArduinoPlatformVersion latestAvrPlatform = getNewestInstalledPlatform(Const.ARDUINO, Const.AVR);
ArduinoPlatformVersion latestSamdPlatform = null;
ArduinoPlatformVersion latestSamPlatform = null;
for (ArduinoPlatformVersion curPlatform : getInstalledPlatforms()) {
ArduinoPackage pkg = curPlatform.getParent().getParent();
if (pkg != null) {
myWorkbenchEnvironmentVariables.putAll(Helpers.getEnvVarPlatformFileTools(curPlatform, false));
if (Const.ARDUINO.equalsIgnoreCase(pkg.getMaintainer())) {
switch (curPlatform.getArchitecture()) {
case Const.AVR:
latestAvrPlatform = curPlatform;
break;
case Const.SAM:
latestSamPlatform = curPlatform;
break;
case Const.SAMD:
latestSamdPlatform = curPlatform;
break;
}
}
}
}
ArduinoPlatformVersion latestSamdPlatform = getNewestInstalledPlatform(Const.ARDUINO, Const.SAMD);
ArduinoPlatformVersion latestSamPlatform = getNewestInstalledPlatform(Const.ARDUINO, Const.SAM);

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

0 comments on commit 4d3e9e0

Please sign in to comment.