mongoose/examples/esp32/device-dashboard/Makefile
2022-06-30 19:59:23 +01:00

21 lines
639 B
Makefile

THISDIR = $(realpath $(CURDIR))
ROOTDIR = $(realpath $(CURDIR)/../../..)
DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) espressif/idf
CMD ?= idf.py build
all: example
example:
true
build: main/main.c Makefile
$(DOCKER) $(CMD)
COMPORT ?= /dev/cu.SLAB_USBtoUART
ESPTOOL ?= esptool.py
flash:
cd build && $(ESPTOOL) --chip esp32 -p $(COMPORT) -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x100000 mongoose-esp32-example.bin
clean:
$(DOCKER) rm -rf build sdkconfig