mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-06 15:51:25 +00:00
Improved Makefile to be able to flash
subtle mod in main.c comment
This commit is contained in:
1 parent
01390fe540
commit
dd59296be9
3 files changed
+24
-5
No files matched your search
@@ -1,13 +1,28 @@
|
||||
THISDIR = $(realpath $(CURDIR))
|
||||
ROOTDIR = $(realpath $(CURDIR)/../..)
|
||||
DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) docker.io/mdashnet/8266
|
||||
CMD ?= make -C src defconfig app
|
||||
PORT ?= /dev/ttyUSB0
|
||||
|
||||
all: example
|
||||
|
||||
example:
|
||||
true
|
||||
|
||||
build: src/main/main.c src/main/wifi.c Makefile
|
||||
docker run --rm -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) docker.io/mdashnet/8266 make -C src defconfig app
|
||||
build: Makefile $(wildcard src/main/*)
|
||||
$(DOCKER) $(CMD)
|
||||
|
||||
flash:
|
||||
flash: CMD = python /esp/components/esptool_py/esptool/esptool.py \
|
||||
--chip esp8266 --port $(PORT) --baud 115200 --before default_reset \
|
||||
--after hard_reset write_flash -z --flash_mode dio --flash_freq 40m \
|
||||
--flash_size 2MB 0x10000 $(THISDIR)/src/build/mongoose-example.bin
|
||||
flash: DA = --device $(PORT)
|
||||
flash: build
|
||||
|
||||
.PHONY: build
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
clean: CMD = rm -rf src/build
|
||||
clean: build
|
||||
|
||||
Reference in new issue
Block a user