mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-21 09:05:59 +08:00
feat: add console save log
This commit is contained in:
@ -244,4 +244,12 @@ config ESPTOOLPY_ENABLE_TIME
|
||||
help
|
||||
Enable this option, time string will be added at the head of serial input data line.
|
||||
|
||||
config ESPTOOLPY_ENABLE_SAVELOG
|
||||
bool "Enable console log save"
|
||||
default n
|
||||
help
|
||||
Enable this option, all console output will auto-save to current 'log' directory which same level as the 'build` directory;
|
||||
if 'log' directory is not exist, will create it.
|
||||
All console output will be saved as a log filename, named PROJECT_NAME + timestamp.log, which PROJECT_NAME defined in your demo Makefile.
|
||||
|
||||
endmenu
|
||||
|
@ -13,6 +13,12 @@ else
|
||||
ENABLE_TIME := n
|
||||
endif
|
||||
|
||||
ifdef CONFIG_ESPTOOLPY_ENABLE_SAVELOG
|
||||
ENABLE_SAVELOG := y
|
||||
else
|
||||
ENABLE_SAVELOG := n
|
||||
endif
|
||||
|
||||
CONFIG_ESPTOOLPY_COMPRESSED ?=
|
||||
|
||||
PYTHON ?= $(call dequote,$(CONFIG_PYTHON))
|
||||
@ -99,7 +105,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)" --enable-time $(ENABLE_TIME)
|
||||
MONITOR_OPTS := --baud $(MONITORBAUD) --port $(ESPPORT) --toolchain-prefix $(CONFIG_TOOLPREFIX) --make "$(MAKE)" --enable-time $(ENABLE_TIME) --enable-savelog $(ENABLE_SAVELOG)
|
||||
|
||||
monitor: $(call prereq_if_explicit,%flash)
|
||||
$(summary) MONITOR
|
||||
|
Reference in New Issue
Block a user