@@ -890,6 +890,7 @@ public Map<String, String> getEnvVars() {
890
890
allVars .put (ENV_KEY_REFERENCED_VARIANT_PLATFORM_PATH , getReferencedVariantPlatformPath ().toOSString ());
891
891
allVars .put (ENV_KEY_REFERENCED_UPLOAD_PLATFORM_PATH , getReferencedUploadPlatformPath ().toOSString ());
892
892
893
+
893
894
PlatformTxtFile referencedPlatfromFile = getreferencedPlatformFile ();
894
895
// process the platform file referenced by the boards.txt
895
896
if (referencedPlatfromFile != null ) {
@@ -901,8 +902,11 @@ public Map<String, String> getEnvVars() {
901
902
allVars .putAll (referencingPlatfromFile .getAllEnvironVars ());
902
903
}
903
904
905
+ // put in the installed tools info
904
906
allVars .putAll (getEnVarPlatformInfo ());
905
907
908
+
909
+
906
910
Programmers localProgrammers [] = Programmers .fromBoards (this );
907
911
String programmer = getProgrammer ();
908
912
for (Programmers curProgrammer : localProgrammers ) {
@@ -937,15 +941,16 @@ public Map<String, String> getEnvVars() {
937
941
}
938
942
939
943
private Map <String , String > getEnVarPlatformInfo () {
940
- if ((getReferencingPlatformFile () == null ) || (getreferencedPlatformFile () == null )) {
944
+ IPath referencingPlatformPath = getreferencingPlatformPath ();
945
+ IPath referencedPlatformPath = getReferencedCorePlatformPath ();
946
+
947
+ if ((referencingPlatformPath == null ) || (referencedPlatformPath == null )) {
941
948
// something is seriously wrong -->shoot
942
949
return new HashMap <>();
943
950
}
944
- File referencingPlatformFile = getReferencingPlatformFile ().getTxtFile ();
945
- ArduinoPlatform referencingPlatform = InternalPackageManager .getPlatform (referencingPlatformFile );
946
- File referencedPlatformFile = getreferencedPlatformFile ().getTxtFile ();
947
951
948
- ArduinoPlatform referencedPlatform = InternalPackageManager .getPlatform (referencedPlatformFile );
952
+ ArduinoPlatform referencingPlatform = InternalPackageManager .getPlatform (referencingPlatformPath );
953
+ ArduinoPlatform referencedPlatform = InternalPackageManager .getPlatform (referencedPlatformPath );
949
954
950
955
boolean jsonBasedPlatformManagement = !Preferences .getUseArduinoToolSelection ();
951
956
if (jsonBasedPlatformManagement ) {
0 commit comments