Skip to content

Commit 6008a09

Browse files
committed
Add stty_params target.
Make it run a command according to arch wiki article on Arduino #stty. Make `monitor` target depend on `stty_params`.
1 parent 9708e82 commit 6008a09

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

Arduino.mk

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,28 @@ reset_stty:
15301530
(sleep 0.1 2>/dev/null || sleep 1) ; \
15311531
$$STTYF $(call get_monitor_port) -hupcl
15321532

1533+
stty_params:
1534+
stty -F $(call get_monitor_port) \
1535+
cs8 \
1536+
$(MONITOR_BAUDRATE) \
1537+
ignbrk \
1538+
-brkint \
1539+
-icrnl \
1540+
-imaxbel \
1541+
-opost \
1542+
-onlcr \
1543+
-isig \
1544+
-icanon \
1545+
-iexten \
1546+
-echo \
1547+
-echoe \
1548+
-echok \
1549+
-echoctl \
1550+
-echoke \
1551+
noflsh \
1552+
-ixon \
1553+
-crtscts
1554+
15331555
ispload: $(TARGET_EEP) $(TARGET_HEX) verify_size
15341556
$(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) \
15351557
$(AVRDUDE_ISPLOAD_OPTS)
@@ -1565,7 +1587,7 @@ show_boards:
15651587
show_submenu:
15661588
@$(CAT) $(BOARDS_TXT) | grep -E '[a-zA-Z0-9_\-]+.menu.(cpu|chip).[a-zA-Z0-9_\-]+=' | sort -uf | sed 's/.menu.\(cpu\|chip\)./:/' | sed 's/=/:/' | column -s: -t
15671589

1568-
monitor:
1590+
monitor: stty_params
15691591
ifeq ($(MONITOR_CMD), 'putty')
15701592
ifneq ($(strip $(MONITOR_PARAMS)),)
15711593
$(MONITOR_CMD) -serial -sercfg $(MONITOR_BAUDRATE),$(MONITOR_PARAMS) $(call get_monitor_port)

0 commit comments

Comments
 (0)