esp32/Makefile: Allow auto-port selection if not passed on cmdline.
Signed-off-by: Andrew Leech <andrew@alelec.net>
This commit is contained in:
committed by
Damien George
parent
5ae622ef7b
commit
386771e052
@@ -29,8 +29,12 @@ BUILD ?= build-$(BOARD)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Device serial settings.
|
# Device serial settings.
|
||||||
PORT ?= /dev/ttyUSB0
|
ifneq ($(PORT),)
|
||||||
BAUD ?= 460800
|
PORT_ARG := -p $(PORT)
|
||||||
|
endif
|
||||||
|
ifneq ($(BAUD),)
|
||||||
|
BAUD_ARG := -b $(BAUD)
|
||||||
|
endif
|
||||||
|
|
||||||
PYTHON ?= python3
|
PYTHON ?= python3
|
||||||
|
|
||||||
@@ -59,7 +63,7 @@ endif
|
|||||||
HELP_BUILD_ERROR ?= "See \033[1;31mhttps://github.com/micropython/micropython/wiki/Build-Troubleshooting\033[0m"
|
HELP_BUILD_ERROR ?= "See \033[1;31mhttps://github.com/micropython/micropython/wiki/Build-Troubleshooting\033[0m"
|
||||||
|
|
||||||
define RUN_IDF_PY
|
define RUN_IDF_PY
|
||||||
idf.py $(IDFPY_FLAGS) -B $(BUILD) -p $(PORT) -b $(BAUD) $(1)
|
idf.py $(IDFPY_FLAGS) -B $(BUILD) $(PORT_ARG) $(BAUD_ARG) $(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|||||||
Reference in New Issue
Block a user