1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

Bug 484955 - Provide serial.port.file property, needed for SAM boards.

a6e36fac9d/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
a6e36fac9d/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java (L148)
.

Change-Id: I17b2556cab3ad7fba00e03171881f6459cf97826
Signed-off-by: Christian Walther <walther@indel.ch>
This commit is contained in:
Christian Walther 2015-12-28 21:57:07 +01:00 committed by Gerrit Code Review @ Eclipse.org
parent c29c9bc057
commit 8640070d4b

View file

@ -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$