@@ -860,11 +860,11 @@ ifndef ARDUINO_LIBS
860860endif
861861
862862# #######################################################################
863- # Serial monitor (just a screen wrapper)
863+ # Serial monitor
864864
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 .
868868
869869ifeq ($(strip $(NO_CORE ) ) ,)
870870 ifndef MONITOR_BAUDRATE
@@ -882,9 +882,8 @@ ifeq ($(strip $(NO_CORE)),)
882882 else
883883 $(call show_config_variable,MONITOR_BAUDRATE, [USER])
884884 endif
885-
886885 ifndef MONITOR_CMD
887- MONITOR_CMD = screen
886+ MONITOR_CMD = less
888887 endif
889888endif
890889
@@ -1598,6 +1597,10 @@ else ifeq ($(MONITOR_CMD), picocom)
15981597 $(MONITOR_CMD) -b $(MONITOR_BAUDRATE) $(MONITOR_PARAMS) $(call get_monitor_port)
15991598else ifeq ($(MONITOR_CMD), cu)
16001599 $(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)
16011604else
16021605 $(MONITOR_CMD) $(call get_monitor_port) $(MONITOR_BAUDRATE)
16031606endif
0 commit comments