diff --git a/boards/common/esp32/Makefile.include b/boards/common/esp32/Makefile.include index 5087328682df..4a005b0d3a43 100644 --- a/boards/common/esp32/Makefile.include +++ b/boards/common/esp32/Makefile.include @@ -8,4 +8,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) include $(RIOTMAKE)/tools/serial.inc.mk # reset tool configuration -RESET ?= esptool.py --before default_reset run +RESET ?= esptool.py +RESET_FLAGS ?= --port $(PORT) --before default_reset run diff --git a/boards/common/esp8266/Makefile.include b/boards/common/esp8266/Makefile.include index 44a141a366b3..bde04dbd4194 100644 --- a/boards/common/esp8266/Makefile.include +++ b/boards/common/esp8266/Makefile.include @@ -8,4 +8,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) include $(RIOTMAKE)/tools/serial.inc.mk # reset tool configuration -RESET ?= esptool.py --before default_reset run +RESET ?= esptool.py +RESET_FLAGS ?= --port $(PORT) --before default_reset run diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index b554ba56e746..645a83a9da63 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -159,7 +159,7 @@ PREFFLAGS += ls -l $(FLASHFILE).bin | awk '{ print $$5 }' >> $(BINDIR)/partition PREFFLAGS += python $(RIOTCPU)/$(CPU)/gen_esp32part.py --disable-sha256sum PREFFLAGS += --verify $(BINDIR)/partitions.csv $(BINDIR)/partitions.bin -FLASHDEPS = preflash +FLASHDEPS += preflash # flasher configuration ifeq ($(QEMU), 1) diff --git a/cpu/esp8266/Makefile.include b/cpu/esp8266/Makefile.include index f60655f46245..507949536ed0 100644 --- a/cpu/esp8266/Makefile.include +++ b/cpu/esp8266/Makefile.include @@ -132,10 +132,10 @@ LINKFLAGS += -Wl,--warn-unresolved-symbols FLASHFILE ?= $(ELFFILE) # configure preflasher to convert .elf to .bin before flashing -FLASH_SIZE = -fs 8m +FLASH_SIZE = -fs 1MB PREFLASHER ?= esptool.py PREFFLAGS ?= elf2image $(FLASH_SIZE) $(FLASHFILE) -FLASHDEPS ?= preflash +FLASHDEPS += preflash # flasher configuration ifeq ($(QEMU), 1)