Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2016-08-26 01:10:08 +0000
committerGerrit Code Review @ Eclipse.org2016-08-26 14:43:37 +0000
commit32bc90f8bfcbcd2af10bb1af006bf2d2ddc12c24 (patch)
treec65e5bf95a741d034e158bd75d550ec590beadd4
parentdbd2b70814f822e5e2eea79bab2f9c89a964b8a2 (diff)
downloadorg.eclipse.cdt-32bc90f8bfcbcd2af10bb1af006bf2d2ddc12c24.tar.gz
org.eclipse.cdt-32bc90f8bfcbcd2af10bb1af006bf2d2ddc12c24.tar.xz
org.eclipse.cdt-32bc90f8bfcbcd2af10bb1af006bf2d2ddc12c24.zip
Bug 500237 - Use specific version of tool for uploads.
Arduino rolled back the version of avrdude that they used but we were always using the latest version. Show the arduino package first in the list of Platforms to Add. Turn on the Arduino Neon site for future updates. Conflicts: toolchains/arduino/org.eclipse.cdt.arduino-feature/p2.inf Change-Id: I0392594d7e9d30daeb6c9e4ca7090a92dde8b19f
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino-feature/p2.inf3
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoManager.java14
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/build/ArduinoBuildConfiguration.java2
3 files changed, 17 insertions, 2 deletions
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino-feature/p2.inf b/toolchains/arduino/org.eclipse.cdt.arduino-feature/p2.inf
new file mode 100644
index 00000000000..fee4c603ea7
--- /dev/null
+++ b/toolchains/arduino/org.eclipse.cdt.arduino-feature/p2.inf
@@ -0,0 +1,3 @@
+instructions.configure=\
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/tools/cdt/arduino/neon/,type:0,name:Arduino Neon,enabled:true); \
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/tools/cdt/arduino/neon/,type:1,name:Arduino Neon,enabled:true);
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoManager.java b/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoManager.java
index 6fe12c5d5c9..3f43f9c2de9 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoManager.java
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/ArduinoManager.java
@@ -272,7 +272,19 @@ public class ArduinoManager {
public static List<ArduinoPlatform> getSortedPlatforms(Collection<ArduinoPlatform> platforms) {
List<ArduinoPlatform> result = new ArrayList<>(platforms);
Collections.sort(result, (plat1, plat2) -> {
- int c1 = plat1.getPackage().getName().compareToIgnoreCase(plat2.getPackage().getName());
+ int c1;
+ String p1 = plat1.getPackage().getName();
+ String p2 = plat2.getPackage().getName();
+ if (p1.equals(p2)) {
+ c1 = 0;
+ } else if (p1.equals("arduino")) {
+ c1 = -1;
+ } else if (p2.equals("arduino")) {
+ c1 = 1;
+ } else {
+ c1 = plat1.getPackage().getName().compareToIgnoreCase(plat2.getPackage().getName());
+ }
+
if (c1 > 0) {
return 1;
} else if (c1 < 0) {
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/build/ArduinoBuildConfiguration.java b/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/build/ArduinoBuildConfiguration.java
index f307fcc4117..cd057f489fa 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/build/ArduinoBuildConfiguration.java
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/build/ArduinoBuildConfiguration.java
@@ -498,7 +498,7 @@ public class ArduinoBuildConfiguration extends CBuildConfiguration
}
}
- ArduinoTool uploadTool = platform.getPackage().getLatestTool(toolName);
+ ArduinoTool uploadTool = platform.getTool(toolName);
if (uploadTool != null) {
properties.putAll(uploadTool.getToolProperties());
}

Back to the top