From b01a373adbe70a012f65bdc7640501648370f46a Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Mon, 28 Mar 2016 11:28:16 +0300
Subject: [PATCH] esp8266: deploy: Use --flash_size=8m option to esptool.py.

Most esp8266 modules have at least 1MB (8Mbit) of flash. If not set, vendor
functions allow to access only first 512K.
---
 esp8266/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/esp8266/Makefile b/esp8266/Makefile
index 9a15c547b..50862623d 100644
--- a/esp8266/Makefile
+++ b/esp8266/Makefile
@@ -148,7 +148,7 @@ $(BUILD)/frozen.c: $(wildcard $(SCRIPTDIR)/*) $(CONFVARS_FILE)
 deploy: $(BUILD)/firmware-combined.bin
 	$(ECHO) "Writing $< to the board"
 	#$(Q)esptool.py --port $(PORT) write_flash 0 $<
-	$(Q)esptool.py --port $(PORT) --baud $(BAUD) write_flash 0 $(BUILD)/firmware.elf-0x00000.bin 0x10000 $(BUILD)/firmware.elf-0x10000.bin
+	$(Q)esptool.py --port $(PORT) --baud $(BAUD) write_flash --flash_size=8m 0 $(BUILD)/firmware.elf-0x00000.bin 0x10000 $(BUILD)/firmware.elf-0x10000.bin
 
 reset:
 	echo -e "\r\nimport pyb; pyb.hard_reset()\r\n" >$(PORT)
-- 
GitLab