Skip to content

Commit 5f10065

Browse files
committed
esp8266: Provide sensible default ESP_SDK; deploy 2 the images together.
1 parent 1bbc389 commit 5f10065

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

esp8266/Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ QSTR_DEFS = qstrdefsport.h #$(BUILD)/pins_qstr.h
66
# include py core make definitions
77
include ../py/py.mk
88

9-
ifeq ($(ESP_SDK),)
10-
$(error ESP_SDK must be set)
11-
endif
12-
139
PORT = /dev/ttyACM0
1410
CROSS_COMPILE = xtensa-lx106-elf-
11+
ESP_SDK = $(shell $(CC) -print-sysroot)/..
1512

1613
INC = -I.
1714
INC += -I$(PY_SRC)
@@ -73,9 +70,8 @@ all: $(BUILD)/firmware-combined.bin
7370

7471
deploy: $(BUILD)/firmware-combined.bin
7572
$(ECHO) "Writing $< to the board"
76-
$(Q)esptool.py --port $(PORT) write_flash 0 $<
77-
#$(Q)esptool.py --port $(PORT) write_flash 0 $(BUILD)/firmware.elf-0x00000.bin
78-
#$(Q)esptool.py --port $(PORT) write_flash 0x10000 $(BUILD)/firmware.elf-0x10000.bin
73+
#$(Q)esptool.py --port $(PORT) write_flash 0 $<
74+
$(Q)esptool.py --port $(PORT) write_flash 0 $(BUILD)/firmware.elf-0x00000.bin 0x10000 $(BUILD)/firmware.elf-0x10000.bin
7975

8076
$(BUILD)/firmware-combined.bin: $(BUILD)/firmware.elf
8177
$(ECHO) "Create $@"

0 commit comments

Comments
 (0)