Skip to content

Commit 8ff5b5d

Browse files
committed
Added ESPBAUD variable to set download speed
Some modules don't work at default speed
1 parent 132421c commit 8ff5b5d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

example.Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Changelog
33
# Changed the variables to include the header file directory
44
# Added global var for the XTENSA tool root
5+
# Added variable for esptool bauds. Some modules don't work with default speed.
56
#
67
# This make file still needs some work.
78
#
@@ -21,6 +22,7 @@ SDK_BASE ?= /opt/Espressif/ESP8266_SDK
2122
#Esptool.py path and port
2223
ESPTOOL ?= esptool.py
2324
ESPPORT ?= /dev/ttyUSB0
25+
ESPBAUD ?= 115200
2426

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

105-
.PHONY: all checkdirs clean
107+
.PHONY: all checkdirs flash clean
106108

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

@@ -131,7 +133,7 @@ firmware:
131133
$(Q) mkdir -p $@
132134

133135
flash: firmware/0x00000.bin firmware/0x40000.bin
134-
-$(ESPTOOL) --port $(ESPPORT) write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin
136+
-$(ESPTOOL) --baud $(ESPBAUD) --port $(ESPPORT) write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin
135137

136138
clean:
137139
$(Q) rm -f $(APP_AR)

0 commit comments

Comments
 (0)