esp8266: Allow to override serial port.

This commit is contained in:
Paul Sokolovsky 2014-11-28 01:54:46 +02:00
parent 075d597464
commit 1bbc389d67

View File

@ -10,6 +10,7 @@ ifeq ($(ESP_SDK),)
$(error ESP_SDK must be set) $(error ESP_SDK must be set)
endif endif
PORT = /dev/ttyACM0
CROSS_COMPILE = xtensa-lx106-elf- CROSS_COMPILE = xtensa-lx106-elf-
INC = -I. INC = -I.
@ -72,9 +73,9 @@ all: $(BUILD)/firmware-combined.bin
deploy: $(BUILD)/firmware-combined.bin deploy: $(BUILD)/firmware-combined.bin
$(ECHO) "Writing $< to the board" $(ECHO) "Writing $< to the board"
$(Q)esptool.py --port /dev/ttyACM0 write_flash 0 $< $(Q)esptool.py --port $(PORT) write_flash 0 $<
#$(Q)esptool.py --port /dev/ttyACM0 write_flash 0 $(BUILD)/firmware.elf-0x00000.bin #$(Q)esptool.py --port $(PORT) write_flash 0 $(BUILD)/firmware.elf-0x00000.bin
#$(Q)esptool.py --port /dev/ttyACM0 write_flash 0x10000 $(BUILD)/firmware.elf-0x10000.bin #$(Q)esptool.py --port $(PORT) write_flash 0x10000 $(BUILD)/firmware.elf-0x10000.bin
$(BUILD)/firmware-combined.bin: $(BUILD)/firmware.elf $(BUILD)/firmware-combined.bin: $(BUILD)/firmware.elf
$(ECHO) "Create $@" $(ECHO) "Create $@"