Skip to content

Commit

Permalink
esp8266/Makefile: Produce OTA firmware as firmware-ota.bin.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfalcon committed Jan 2, 2017
1 parent 86d2109 commit f5750e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions esp8266/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ FROZEN_MPY_DIR = modules
# include py core make definitions
include ../py/py.mk

FWBIN = $(BUILD)/firmware-combined.bin
PORT ?= /dev/ttyACM0
BAUD ?= 115200
FLASH_MODE ?= qio
Expand Down Expand Up @@ -159,7 +160,7 @@ SRC_QSTR += $(SRC_C) $(STM_SRC_C) $(EXTMOD_SRC_C) $(DRIVERS_SRC_C)
# Append any auto-generated sources that are needed by sources listed in SRC_QSTR
SRC_QSTR_AUTO_DEPS +=

all: $(BUILD)/libaxtls.a $(BUILD)/firmware-combined.bin
all: $(BUILD)/libaxtls.a $(FWBIN)

CONFVARS_FILE = $(BUILD)/confvars

Expand Down Expand Up @@ -187,7 +188,7 @@ erase:
reset:
echo -e "\r\nimport machine; machine.reset()\r\n" >$(PORT)

$(BUILD)/firmware-combined.bin: $(BUILD)/firmware.elf
$(FWBIN): $(BUILD)/firmware.elf
$(ECHO) "Create $@"
$(Q)esptool.py elf2image $^
$(Q)$(PYTHON) makeimg.py $(BUILD)/firmware.elf-0x00000.bin $(BUILD)/firmware.elf-0x[0-5][1-f]000.bin $@
Expand All @@ -202,7 +203,7 @@ $(BUILD)/firmware.elf: $(OBJ)

ota:
rm -f $(BUILD)/firmware.elf $(BUILD)/firmware.elf*.bin
$(MAKE) LDSCRIPT=esp8266_ota.ld
$(MAKE) LDSCRIPT=esp8266_ota.ld FWBIN=firmware-ota.bin

#MAKE_PINS = boards/make-pins.py
#BOARD_PINS = boards/$(BOARD)/pins.csv
Expand Down

0 comments on commit f5750e8

Please sign in to comment.