build: make runs build, flash and monitor; make flash only flashes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
06953028ab
commit
9989dd3062
1 file changed
+11
-6
@@ -1,8 +1,9 @@
|
||||
# Build, flash and monitor the ESP32-S3 controller (ESP-IDF in Docker).
|
||||
#
|
||||
# make list the targets
|
||||
# make build, flash, then monitor (same as: make all)
|
||||
# make help list the targets
|
||||
# make build minify the web UI, then build the firmware
|
||||
# make flash build if needed and flash the S3
|
||||
# make flash flash the last build to the S3 (does not build)
|
||||
# make monitor serial console (Ctrl-] to quit)
|
||||
# make flash-monitor
|
||||
#
|
||||
@@ -22,18 +23,22 @@ TTY := $(shell [ -t 0 ] && echo -it)
|
||||
OWNER := $(shell docker info --format '{{.SecurityOptions}}' 2>/dev/null | grep -q rootless && echo 0:0 || echo $$(id -u):$$(id -g))
|
||||
FIX_OWNER = chown -R $(OWNER) /project
|
||||
|
||||
.PHONY: help web build flash ota ota-drivers monitor flash-monitor log size menuconfig clean fullclean erase test test-driver test-envelope test-api test-browser
|
||||
.PHONY: all help web build flash ota ota-drivers monitor flash-monitor log size menuconfig clean fullclean erase test test-driver test-envelope test-api test-browser
|
||||
|
||||
# Default target: build, flash, then open the console (run in order, so not with make -j)
|
||||
all: build flash monitor
|
||||
|
||||
help:
|
||||
@echo "LED controller (ESP32-S3):"
|
||||
@echo " make [all] build, flash, then open the console"
|
||||
@echo " make build minify + gzip the web UI, then build the firmware"
|
||||
@echo " make flash flash firmware and web UI to PORT ($(PORT))"
|
||||
@echo " make flash flash the last build (firmware and web UI) to PORT ($(PORT)); does not build"
|
||||
@echo " make ota [HOST=ip] build, then upload the firmware (web UI included) over Ethernet (no USB);"
|
||||
@echo " HOST defaults to led-controller.local"
|
||||
@echo " make ota-drivers HOST=ip [MAC=aabbccddeeff] [BROADCAST=1]"
|
||||
@echo " push changed led-driver .py files over ESP-NOW (all drivers without MAC)"
|
||||
@echo " make monitor serial console on PORT (Ctrl-] to quit)"
|
||||
@echo " make flash-monitor flash, then open the console"
|
||||
@echo " make flash-monitor flash the last build, then open the console"
|
||||
@echo " make log [SECS=10] print the console for SECS seconds and exit (no terminal needed)"
|
||||
@echo " make web only rebuild the web UI (needs node/npx)"
|
||||
@echo " make size memory use of the last build"
|
||||
@@ -58,7 +63,7 @@ APP_DESC_OBJ = build/esp-idf/esp_app_format/CMakeFiles/__idf_esp_app_format.dir/
|
||||
build: web
|
||||
$(DOCKER_RUN) $(IDF_IMAGE) bash -c 'rm -f $(APP_DESC_OBJ); idf.py build; rc=$$?; $(FIX_OWNER); exit $$rc'
|
||||
|
||||
flash: build
|
||||
flash:
|
||||
$(DOCKER_RUN) $(DEVICE) $(IDF_IMAGE) bash -c 'idf.py -p $(PORT) flash; rc=$$?; $(FIX_OWNER); exit $$rc'
|
||||
|
||||
ota: HOST ?= led-controller.local
|
||||
|
||||
Reference in new issue
Block a user