@@ -936,11 +936,11 @@ ifndef ARDUINO_LIBS
936
936
endif
937
937
938
938
# #######################################################################
939
- # Serial monitor (just a screen wrapper)
939
+ # Serial monitor
940
940
941
- # Quite how to construct the monitor command seems intimately tied
942
- # to the command we're using (here screen). So, read the screen docs
943
- # for more information (search for 'character special device') .
941
+ # In order to construct a monitor command, we need to use either `less`,
942
+ # `screen` or `cat`. With `less`, as the default fallback, we will use
943
+ # `-f` flag. Read it's man page to get a better understanding .
944
944
945
945
ifeq ($(strip $(NO_CORE ) ) ,)
946
946
ifndef MONITOR_BAUDRATE
@@ -958,9 +958,8 @@ ifeq ($(strip $(NO_CORE)),)
958
958
else
959
959
$(call show_config_variable,MONITOR_BAUDRATE, [USER])
960
960
endif
961
-
962
961
ifndef MONITOR_CMD
963
- MONITOR_CMD = screen
962
+ MONITOR_CMD = less
964
963
endif
965
964
endif
966
965
@@ -1763,6 +1762,10 @@ else ifeq ($(notdir $(MONITOR_CMD)), picocom)
1763
1762
$(MONITOR_CMD) -b $(MONITOR_BAUDRATE) $(MONITOR_PARAMS) $(call get_monitor_port)
1764
1763
else ifeq ($(notdir $(MONITOR_CMD)), cu)
1765
1764
$(MONITOR_CMD) -l $(call get_monitor_port) -s $(MONITOR_BAUDRATE)
1765
+ else ifeq ($(MONITOR_CMD), less)
1766
+ $(MONITOR_CMD) -f $(call get_monitor_port)
1767
+ else ifeq ($(MONITOR_CMD), cat)
1768
+ $(MONITOR_CMD) $(call get_monitor_port)
1766
1769
else
1767
1770
$(MONITOR_CMD) $(call get_monitor_port) $(MONITOR_BAUDRATE)
1768
1771
endif
0 commit comments