build: refresh the build time on every build, default make ota host

A web-only change relinked without recompiling esp_app_desc.c, so the image kept
its old build time. make ota now uses led-controller.local unless HOST is given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-04 20:47:00 +13:00
1 parent a560a1a72b
commit b6aa0635ae
2 files changed
+9 -4

No files matched your search

+8 -3
View File
@@ -28,7 +28,8 @@ help:
@echo "LED controller (ESP32-S3):"
@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 ota HOST=ip build, then upload the firmware (web UI included) over Ethernet (no USB)"
@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)"
@@ -50,14 +51,18 @@ web:
tools/build_web.sh
# --- firmware -------------------------------------------------------------
# The build time in the image comes from esp_app_desc.c, which nothing else recompiles (a web-only
# change just relinks), so drop its object and every build gets the current time.
APP_DESC_OBJ = build/esp-idf/esp_app_format/CMakeFiles/__idf_esp_app_format.dir/esp_app_desc.c.obj
build: web
$(DOCKER_RUN) $(IDF_IMAGE) bash -c 'idf.py build; rc=$$?; $(FIX_OWNER); exit $$rc'
$(DOCKER_RUN) $(IDF_IMAGE) bash -c 'rm -f $(APP_DESC_OBJ); idf.py build; rc=$$?; $(FIX_OWNER); exit $$rc'
flash: build
$(DOCKER_RUN) $(DEVICE) $(IDF_IMAGE) bash -c 'idf.py -p $(PORT) flash; rc=$$?; $(FIX_OWNER); exit $$rc'
ota: HOST ?= led-controller.local
ota: build
@test -n "$(HOST)" || { echo "usage: make ota HOST=<controller ip>"; exit 1; }
python3 tools/ota.py $(HOST)
ota-drivers: