Skip to content

Commit c80ed32

Browse files
committed
esp32/Makefile: Allow auto-port selection if not passed on cmdline.
Signed-off-by: Andrew Leech <andrew@alelec.net>
1 parent 2a395ef commit c80ed32

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ports/esp32/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ BUILD ?= build-$(BOARD)
2929
endif
3030

3131
# Device serial settings.
32-
PORT ?= /dev/ttyUSB0
33-
BAUD ?= 460800
32+
ifneq ($(PORT),)
33+
PORT_ARG := -p $(PORT)
34+
endif
35+
ifneq ($(BAUD),)
36+
BAUD_ARG := -b $(BAUD)
37+
endif
3438

3539
PYTHON ?= python3
3640

@@ -59,7 +63,7 @@ endif
5963
HELP_BUILD_ERROR ?= "See \033[1;31mhttps://github.com/micropython/micropython/wiki/Build-Troubleshooting\033[0m"
6064

6165
define RUN_IDF_PY
62-
idf.py $(IDFPY_FLAGS) -B $(BUILD) -p $(PORT) -b $(BAUD) $(1)
66+
idf.py $(IDFPY_FLAGS) -B $(BUILD) $(PORT_ARG) $(BAUD_ARG) $(1)
6367
endef
6468

6569
all:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy