Error out if no Arduino TTY device is detected when uploading.
This commit is contained in:
parent
f437ea63eb
commit
e92c5371ad
1 changed files with 3 additions and 0 deletions
|
@ -478,6 +478,9 @@ raw_upload: $(TARGET_HEX)
|
|||
# stdin/out appears to work but generates a spurious error on MacOS at
|
||||
# least. Perhaps it would be better to just do it in perl ?
|
||||
reset:
|
||||
@if [ -z "$(ARD_PORT)" ]; then \
|
||||
echo "No Arduino-compatible TTY device found -- exiting"; exit 2; \
|
||||
fi
|
||||
for STTYF in 'stty -F' 'stty --file' 'stty -f' 'stty <' ; \
|
||||
do $$STTYF /dev/tty >/dev/null 2>/dev/null && break ; \
|
||||
done ;\
|
||||
|
|
Loading…
Add table
Reference in a new issue