Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions example.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Changelog
# Changed the variables to include the header file directory
# Added global var for the XTENSA tool root
# Added variable for esptool bauds. Some modules don't work with default speed.
#
# This make file still needs some work.
#
Expand All @@ -21,6 +22,7 @@ SDK_BASE ?= /opt/Espressif/ESP8266_SDK
#Esptool.py path and port
ESPTOOL ?= esptool.py
ESPPORT ?= /dev/ttyUSB0
ESPBAUD ?= 115200

# name for the target project
TARGET = app
Expand Down Expand Up @@ -102,7 +104,7 @@ $1/%.o: %.c
$(Q) $(CC) $(INCDIR) $(MODULE_INCDIR) $(EXTRA_INCDIR) $(SDK_INCDIR) $(CFLAGS) -c $$< -o $$@
endef

.PHONY: all checkdirs clean
.PHONY: all checkdirs flash clean

all: checkdirs $(TARGET_OUT) $(FW_FILE_1) $(FW_FILE_2)

Expand Down Expand Up @@ -131,7 +133,7 @@ firmware:
$(Q) mkdir -p $@

flash: firmware/0x00000.bin firmware/0x40000.bin
-$(ESPTOOL) --port $(ESPPORT) write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin
-$(ESPTOOL) --baud $(ESPBAUD) --port $(ESPPORT) write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin

clean:
$(Q) rm -f $(APP_AR)
Expand Down