feat(tools): Add time information to idf monitor

This commit is contained in:
Dong Heng
2018-08-03 13:45:59 +08:00
parent 1e1cf1eb49
commit f6db55c0e4
3 changed files with 37 additions and 4 deletions

View File

@ -205,4 +205,10 @@ config MONITOR_BAUD
default 2000000 if MONITOR_BAUD_2MB
default MONITOR_BAUD_OTHER_VAL if MONITOR_BAUD_OTHER
config ESPTOOLPY_ENABLE_TIME
bool "Enable monitor time information"
default n
help
Enable this option, time string will be added at the head of serial input data line.
endmenu

View File

@ -1,11 +1,18 @@
# Component support for esptool.py. Doesn't do much by itself,
# components have their own flash targets that can use these variables.
ESPPORT ?= $(CONFIG_ESPTOOLPY_PORT)
ESPBAUD ?= $(CONFIG_ESPTOOLPY_BAUD)
ESPFLASHMODE ?= $(CONFIG_ESPTOOLPY_FLASHMODE)
ESPFLASHFREQ ?= $(CONFIG_ESPTOOLPY_FLASHFREQ)
ESPFLASHSIZE ?= $(CONFIG_ESPTOOLPY_FLASHSIZE)
ifdef CONFIG_ESPTOOLPY_ENABLE_TIME
ENABLE_TIME := y
else
ENABLE_TIME := n
endif
CONFIG_ESPTOOLPY_COMPRESSED ?=
PYTHON ?= $(call dequote,$(CONFIG_PYTHON))
@ -92,7 +99,7 @@ endif
simple_monitor: $(call prereq_if_explicit,%flash)
$(MONITOR_PYTHON) -m serial.tools.miniterm --rts 0 --dtr 0 --raw $(ESPPORT) $(MONITORBAUD)
MONITOR_OPTS := --baud $(MONITORBAUD) --port $(ESPPORT) --toolchain-prefix $(CONFIG_TOOLPREFIX) --make "$(MAKE)"
MONITOR_OPTS := --baud $(MONITORBAUD) --port $(ESPPORT) --toolchain-prefix $(CONFIG_TOOLPREFIX) --make "$(MAKE)" --enable-time $(ENABLE_TIME)
monitor: $(call prereq_if_explicit,%flash)
$(summary) MONITOR