Skip to content
Commit f54e1edd authored by George White's avatar George White Committed by Anas Nashif
Browse files

runners: bossac: Arduino bootloader reset on macOS



Fixes compatibility with the Arduino bootloader reset mechanism when
using `west flash` on Darwin hosts.

stty is used to set the serial port in the bossac runner to 1200 baud on
Arduino ATSAMD21 bootloaders. The `-F` argument to stty is a GNU
coreutils addition, and thus it is missing from Darwin's BSD stty, so
change the flag to `-f` when we're not running on Linux.

On Darwin, set DEFAULT_BOSSAC_PORT to None and ask the user to select
one from a list of IOCalloutDevices reported by ioreg, modelled on the
get_board_snr from the nrfjprog runner. This is because serial port TTYs
are generated by the device driver, and therefore there is no safe
default.

Tested with an Arduino Nano 33 IoT board.

Signed-off-by: default avatarGeorge White <me@galexite.uk>
parent 5e10e77b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment