2022-06-19 18:27:37 +01:00
|
|
|
CWD = $(realpath $(CURDIR))
|
|
|
|
MNT = $(realpath $(CURDIR)/../../..)
|
|
|
|
PORT ?= /dev/ttyUSB0
|
|
|
|
CMD ?= build
|
|
|
|
|
|
|
|
all: example
|
|
|
|
|
|
|
|
example:
|
|
|
|
true
|
|
|
|
|
|
|
|
build: Makefile $(wildcard main/*)
|
|
|
|
docker run --rm $(DA) -v $(MNT):$(MNT) -w $(CWD) espressif/idf idf.py $(CMD)
|
|
|
|
|
2022-07-22 14:01:32 -03:00
|
|
|
flash:
|
|
|
|
flash: CMD = flash
|
2022-06-19 18:27:37 +01:00
|
|
|
flash: DA = --device $(PORT)
|
2022-07-22 14:01:32 -03:00
|
|
|
flash: build
|
2022-06-19 18:27:37 +01:00
|
|
|
|
|
|
|
bridge.hex: build
|
|
|
|
esputil mkhex \
|
|
|
|
0x8000 build/partition_table/partition-table.bin \
|
|
|
|
0x1000 build/bootloader/bootloader.bin \
|
|
|
|
0x100000 build/mongoose-esp32-example.bin > $@
|
|
|
|
|
|
|
|
flash2: bridge.hex
|
|
|
|
esputil -b 921600 -fp 0x220 flash bridge.hex
|
|
|
|
esputil monitor
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf build
|