The Arduino toolchain needs some help to know which UART to use when running on a 96Board. This file adds two environmental variables to configure both the IDE and command line Arduino tools.
JAVA_TOOL_OPTIONS adds the correct UART to the GUI IDE MONITOR_PORT sets the correct UART for the Arduino.mk Makefile tools
Signed-off-by: Grant Likely firstname.lastname@example.org --- This works on my platform, but it is only part of a patch. The debian package needs to be updated to install this file as a configuration file.
Slightly off topic, I think that we need to move to this approach for selecting the correct serial port and get rid of the /etc/udev/rules.d rule. The udev rule approach is fragile, and a shell script can make intelligent decisions about how the UART is mapped to the 96Boards LS connector.
96boards-sensors.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 96boards-sensors.sh
diff --git a/96boards-sensors.sh b/96boards-sensors.sh new file mode 100644 index 000000000000..efb1c4a8c1e8 --- /dev/null +++ b/96boards-sensors.sh @@ -0,0 +1,5 @@ +# Environmental variables for working with the 96Boards Sensors adapter +# +# Copy this file into /etc/profile.d to set up the correct environment by default +export JAVA_TOOL_OPTIONS="-Dgnu.io.rxtx.SerialPorts=/dev/tty96B0" +export MONITOR_PORT=/dev/tty96B0