Move MONITOR_BAUDRATE detection further down
No changes are made to the code, it is only moved. This allows it to use LOCAL_INO_SRCS and LOCAL_INO_PDE_SRCS in the next commit.
This commit is contained in:
parent
cb5ce2c9af
commit
14fd6e7126
1 changed files with 26 additions and 26 deletions
|
@ -503,32 +503,6 @@ else
|
|||
$(call show_config_variable,USER_LIB_PATH)
|
||||
endif
|
||||
|
||||
########################################################################
|
||||
# Serial monitor (just a screen wrapper)
|
||||
#
|
||||
# Quite how to construct the monitor command seems intimately tied
|
||||
# to the command we're using (here screen). So, read the screen docs
|
||||
# for more information (search for 'character special device').
|
||||
#
|
||||
ifndef MONITOR_BAUDRATE
|
||||
#This works only in linux. TODO: Port it to MAC OS also
|
||||
SPEED = $(shell grep --max-count=1 --regexp="Serial.begin" $$(ls -1 *.ino) | sed -e 's/\t//g' -e 's/\/\/.*$$//g' -e 's/(/\t/' -e 's/)/\t/' | awk -F '\t' '{print $$2}' )
|
||||
MONITOR_BAUDRATE = $(findstring $(SPEED),300 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200)
|
||||
|
||||
ifeq ($(MONITOR_BAUDRATE),)
|
||||
MONITOR_BAUDRATE = 9600
|
||||
$(call show_config_variable,MONITOR_BAUDRATE,[ASSUMED])
|
||||
else
|
||||
$(call show_config_variable,MONITOR_BAUDRATE,[DETECTED], (in sketch))
|
||||
endif
|
||||
else
|
||||
$(call show_config_variable,MONITOR_BAUDRATE, [SPECIFIED])
|
||||
endif
|
||||
|
||||
ifndef MONITOR_CMD
|
||||
MONITOR_CMD = screen
|
||||
endif
|
||||
|
||||
########################################################################
|
||||
# Reset
|
||||
ifndef RESET_CMD
|
||||
|
@ -675,6 +649,32 @@ ifndef ARDUINO_LIBS
|
|||
$(shell sed -ne "s/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p" $(LOCAL_SRCS)))
|
||||
endif
|
||||
|
||||
########################################################################
|
||||
# Serial monitor (just a screen wrapper)
|
||||
#
|
||||
# Quite how to construct the monitor command seems intimately tied
|
||||
# to the command we're using (here screen). So, read the screen docs
|
||||
# for more information (search for 'character special device').
|
||||
#
|
||||
ifndef MONITOR_BAUDRATE
|
||||
#This works only in linux. TODO: Port it to MAC OS also
|
||||
SPEED = $(shell grep --max-count=1 --regexp="Serial.begin" $$(ls -1 *.ino) | sed -e 's/\t//g' -e 's/\/\/.*$$//g' -e 's/(/\t/' -e 's/)/\t/' | awk -F '\t' '{print $$2}' )
|
||||
MONITOR_BAUDRATE = $(findstring $(SPEED),300 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200)
|
||||
|
||||
ifeq ($(MONITOR_BAUDRATE),)
|
||||
MONITOR_BAUDRATE = 9600
|
||||
$(call show_config_variable,MONITOR_BAUDRATE,[ASSUMED])
|
||||
else
|
||||
$(call show_config_variable,MONITOR_BAUDRATE,[DETECTED], (in sketch))
|
||||
endif
|
||||
else
|
||||
$(call show_config_variable,MONITOR_BAUDRATE, [SPECIFIED])
|
||||
endif
|
||||
|
||||
ifndef MONITOR_CMD
|
||||
MONITOR_CMD = screen
|
||||
endif
|
||||
|
||||
########################################################################
|
||||
# Rules for making stuff
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue