From 430770886b3f398f2f086600a1c80f7b030a9334 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 22 Feb 2021 10:35:38 +0100 Subject: [PATCH] make/esptool: fix FFLAGS inclusion order for qemu --- cpu/esp32/Makefile.include | 6 ------ makefiles/tools/esptool.inc.mk | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index 3d14468e91..d269d72fff 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -79,9 +79,3 @@ endif ifneq (,$(filter cpp,$(FEATURES_USED))) ARCHIVES += -lstdc++ endif - -# additional flasher configuration for ESP32 QEMU -ifneq (,$(filter esp_qemu,$(USEMODULE))) - FFLAGS += cp $(RIOTCPU)/$(CPU)/bin/rom_0x3ff90000_0x00010000.bin $(BINDIR)/rom1.bin && - FFLAGS += cp $(RIOTCPU)/$(CPU)/bin/rom_0x40000000_0x000c2000.bin $(BINDIR)/rom.bin -endif diff --git a/makefiles/tools/esptool.inc.mk b/makefiles/tools/esptool.inc.mk index facec3c718..e27ae8c351 100644 --- a/makefiles/tools/esptool.inc.mk +++ b/makefiles/tools/esptool.inc.mk @@ -40,6 +40,10 @@ ifneq (,$(filter esp_qemu,$(USEMODULE))) FFLAGS += head -c $$((0x10000)) | FFLAGS += cat - $(FLASHFILE).bin tmp.bin | FFLAGS += head -c $(FLASH_SIZE)MB > $(BINDIR)/$(CPU)flash.bin && rm tmp.bin; + ifeq (esp32,$(CPU_FAM)) + FFLAGS += cp $(RIOTCPU)/$(CPU)/bin/rom_0x3ff90000_0x00010000.bin $(BINDIR)/rom1.bin && + FFLAGS += cp $(RIOTCPU)/$(CPU)/bin/rom_0x40000000_0x000c2000.bin $(BINDIR)/rom.bin + endif else PROGRAMMER_SPEED ?= 460800 FLASHER = $(ESPTOOL)