Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Walther2015-12-28 20:57:07 +0000
committerGerrit Code Review @ Eclipse.org2015-12-29 03:12:40 +0000
commit8640070d4b8c8370f733f89ce436d33adbb7cd9e (patch)
treec231ef845189e5df685c1b8a19a9b2a74c47f584 /toolchains/arduino/org.eclipse.cdt.arduino.core
parentc29c9bc0579a955d20a98bc3b477ee53998e99d8 (diff)
downloadorg.eclipse.cdt-8640070d4b8c8370f733f89ce436d33adbb7cd9e.tar.gz
org.eclipse.cdt-8640070d4b8c8370f733f89ce436d33adbb7cd9e.tar.xz
org.eclipse.cdt-8640070d4b8c8370f733f89ce436d33adbb7cd9e.zip
Bug 484955 - Provide serial.port.file property, needed for SAM boards.
https://github.com/arduino/Arduino/blob/a6e36fac9da3f7d78a99fc5093e94875efac8762/hardware/arduino/sam/platform.txt#L102 uses this property because the bossac tool expects a serial port name without the leading "/dev/". Copied from how the Arduino IDE does this in https://github.com/arduino/Arduino/blob/a6e36fac9da3f7d78a99fc5093e94875efac8762/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java#L148 . Change-Id: I17b2556cab3ad7fba00e03171881f6459cf97826 Signed-off-by: Christian Walther <walther@indel.ch>
Diffstat (limited to 'toolchains/arduino/org.eclipse.cdt.arduino.core')
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/build/ArduinoBuildConfiguration.java5
1 files changed, 5 insertions, 0 deletions
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 7f1dc360eb6..044aa2065f8 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
@@ -416,6 +416,11 @@ public class ArduinoBuildConfiguration extends CBuildConfiguration {
Properties properties = getProperties();
properties.put("runtime.tools." + toolName + ".path", pathString(tool.getInstallPath())); //$NON-NLS-1$ //$NON-NLS-2$
properties.put("serial.port", serialPort); //$NON-NLS-1$
+ if (serialPort.startsWith("/dev/")) {
+ properties.put("serial.port.file", serialPort.substring(5)); //$NON-NLS-1$
+ } else {
+ properties.put("serial.port.file", serialPort); //$NON-NLS-1$
+ }
// to make up for some cheating in the platform.txt file
properties.put("path", "{tools." + toolName + ".path}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
properties.put("cmd.path", "{tools." + toolName + ".cmd.path}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

Back to the top