@@ -860,11 +860,11 @@ ifndef ARDUINO_LIBS
860
860
endif
861
861
862
862
# #######################################################################
863
- # Serial monitor (just a screen wrapper)
863
+ # Serial monitor
864
864
865
- # Quite how to construct the monitor command seems intimately tied
866
- # to the command we're using (here screen). So, read the screen docs
867
- # for more information (search for 'character special device') .
865
+ # In order to construct a monitor command, we need to use either `less`,
866
+ # `screen` or `cat`. With `less`, as the default fallback, we will use
867
+ # `-f` flag. Read it's man page to get a better understanding .
868
868
869
869
ifeq ($(strip $(NO_CORE ) ) ,)
870
870
ifndef MONITOR_BAUDRATE
@@ -882,9 +882,8 @@ ifeq ($(strip $(NO_CORE)),)
882
882
else
883
883
$(call show_config_variable,MONITOR_BAUDRATE, [USER])
884
884
endif
885
-
886
885
ifndef MONITOR_CMD
887
- MONITOR_CMD = screen
886
+ MONITOR_CMD = less
888
887
endif
889
888
endif
890
889
@@ -1598,6 +1597,10 @@ else ifeq ($(MONITOR_CMD), picocom)
1598
1597
$(MONITOR_CMD) -b $(MONITOR_BAUDRATE) $(MONITOR_PARAMS) $(call get_monitor_port)
1599
1598
else ifeq ($(MONITOR_CMD), cu)
1600
1599
$(MONITOR_CMD) -l $(call get_monitor_port) -s $(MONITOR_BAUDRATE)
1600
+ else ifeq ($(MONITOR_CMD), less)
1601
+ $(MONITOR_CMD) -f $(call get_monitor_port)
1602
+ else ifeq ($(MONITOR_CMD), cat)
1603
+ $(MONITOR_CMD) $(call get_monitor_port)
1601
1604
else
1602
1605
$(MONITOR_CMD) $(call get_monitor_port) $(MONITOR_BAUDRATE)
1603
1606
endif
0 commit comments