Commit f5750e88 authored by Paul Sokolovsky's avatar Paul Sokolovsky

esp8266/Makefile: Produce OTA firmware as firmware-ota.bin.

parent 86d21095
...@@ -14,6 +14,7 @@ FROZEN_MPY_DIR = modules ...@@ -14,6 +14,7 @@ FROZEN_MPY_DIR = modules
# include py core make definitions # include py core make definitions
include ../py/py.mk include ../py/py.mk
FWBIN = $(BUILD)/firmware-combined.bin
PORT ?= /dev/ttyACM0 PORT ?= /dev/ttyACM0
BAUD ?= 115200 BAUD ?= 115200
FLASH_MODE ?= qio FLASH_MODE ?= qio
...@@ -159,7 +160,7 @@ SRC_QSTR += $(SRC_C) $(STM_SRC_C) $(EXTMOD_SRC_C) $(DRIVERS_SRC_C) ...@@ -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 # Append any auto-generated sources that are needed by sources listed in SRC_QSTR
SRC_QSTR_AUTO_DEPS += SRC_QSTR_AUTO_DEPS +=
all: $(BUILD)/libaxtls.a $(BUILD)/firmware-combined.bin all: $(BUILD)/libaxtls.a $(FWBIN)
CONFVARS_FILE = $(BUILD)/confvars CONFVARS_FILE = $(BUILD)/confvars
...@@ -187,7 +188,7 @@ erase: ...@@ -187,7 +188,7 @@ erase:
reset: reset:
echo -e "\r\nimport machine; machine.reset()\r\n" >$(PORT) echo -e "\r\nimport machine; machine.reset()\r\n" >$(PORT)
$(BUILD)/firmware-combined.bin: $(BUILD)/firmware.elf $(FWBIN): $(BUILD)/firmware.elf
$(ECHO) "Create $@" $(ECHO) "Create $@"
$(Q)esptool.py elf2image $^ $(Q)esptool.py elf2image $^
$(Q)$(PYTHON) makeimg.py $(BUILD)/firmware.elf-0x00000.bin $(BUILD)/firmware.elf-0x[0-5][1-f]000.bin $@ $(Q)$(PYTHON) makeimg.py $(BUILD)/firmware.elf-0x00000.bin $(BUILD)/firmware.elf-0x[0-5][1-f]000.bin $@
...@@ -202,7 +203,7 @@ $(BUILD)/firmware.elf: $(OBJ) ...@@ -202,7 +203,7 @@ $(BUILD)/firmware.elf: $(OBJ)
ota: ota:
rm -f $(BUILD)/firmware.elf $(BUILD)/firmware.elf*.bin 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 #MAKE_PINS = boards/make-pins.py
#BOARD_PINS = boards/$(BOARD)/pins.csv #BOARD_PINS = boards/$(BOARD)/pins.csv
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment