From 276d63767dc5c2a31dabaa307fa9108b31b0b160 Mon Sep 17 00:00:00 2001 From: Erik Kunze Date: Sat, 6 Aug 2016 21:46:42 +0200 Subject: [PATCH] Replaced default flash rule with 4m/32m rules(#1442) --- Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8fd2c36f..9070d705 100644 --- a/Makefile +++ b/Makefile @@ -231,11 +231,22 @@ clobber: $(SPECIAL_CLOBBER) $(foreach d, $(SUBDIRS), $(MAKE) -C $(d) clobber;) $(RM) -r $(ODIR) -flash: +flash: + @echo "use one of the following targets to flash the firmware" + @echo " make flash512k - for ESP with 512kB flash size" + @echo " make flash4m - for ESP with 4MB flash size" + +flash512k: + $(MAKE) -e FLASHOPTIONS="-fm qio -fs 4m -ff 40m" flashinternal + +flash4m: + $(MAKE) -e FLASHOPTIONS="-fm dio -fs 32m -ff 40m" flashinternal + +flashinternal: ifndef PDIR - $(MAKE) -C ./app flash + $(MAKE) -C ./app flashinternal else - $(ESPTOOL) --port $(ESPPORT) write_flash 0x00000 $(FIRMWAREDIR)0x00000.bin 0x10000 $(FIRMWAREDIR)0x10000.bin + $(ESPTOOL) --port $(ESPPORT) write_flash $(FLASHOPTIONS) 0x00000 $(FIRMWAREDIR)0x00000.bin 0x10000 $(FIRMWAREDIR)0x10000.bin endif .subdirs: