aboutsummaryrefslogtreecommitdiff
path: root/esp8266/Makefile
diff options
context:
space:
mode:
authordmanso2016-09-26 22:22:39 +0200
committerDamien George2016-10-07 13:18:48 +1100
commit0363e1d7b5b80046b49b07d8fbb739315474b4b9 (patch)
tree62a5d5089de6b0707c3e1eec7a4ca6cefdcd610b /esp8266/Makefile
parent00c1fc6d77ede97f8bd9b486b0eed7afb2a3a9e0 (diff)
esp8266: Add FLASH_MODE,FLASH_SIZE options for make deploy target.
Added options to make deploy so it can be used for ESP8266 boards with other flash configurations. For example NodeMCU DEVKIT V1.0 can now use: $ make FLASH_MODE=dio FLASH_SIZE=32m deploy
Diffstat (limited to 'esp8266/Makefile')
-rw-r--r--esp8266/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/esp8266/Makefile b/esp8266/Makefile
index 9008f2036..d86fec180 100644
--- a/esp8266/Makefile
+++ b/esp8266/Makefile
@@ -18,6 +18,8 @@ FROZEN_DIR = scripts
FROZEN_MPY_DIR = modules
PORT ?= /dev/ttyACM0
BAUD ?= 115200
+FLASH_MODE ?= qio
+FLASH_SIZE ?= 8m
CROSS_COMPILE = xtensa-lx106-elf-
ESP_SDK = $(shell $(CC) -print-sysroot)/usr
@@ -189,7 +191,7 @@ $(BUILD)/frozen_mpy.c: $(FROZEN_MPY_MPY_FILES) $(BUILD)/genhdr/qstrdefs.generate
deploy: $(BUILD)/firmware-combined.bin
$(ECHO) "Writing $< to the board"
- $(Q)esptool.py --port $(PORT) --baud $(BAUD) write_flash --verify --flash_size=8m 0 $<
+ $(Q)esptool.py --port $(PORT) --baud $(BAUD) write_flash --verify --flash_size=$(FLASH_SIZE) --flash_mode=$(FLASH_MODE) 0 $<
#$(Q)esptool.py --port $(PORT) --baud $(BAUD) write_flash --flash_size=8m 0 $(BUILD)/firmware.elf-0x00000.bin 0x9000 $(BUILD)/firmware.elf-0x0[1-f]000.bin
reset: