Files
k-frame/Makefile
Gabriel Kaszewski a384e36616 end-to-end working: ESP32 connects to server, renders widgets
boot logo (procedural hexagon + K), WiFi (WPA auto-detect with retries),
TCP client connects and receives ScreenUpdate/DataUpdate messages,
display renders widget data. Makefile with esp-flash/server/desktop targets.

known issues: boot logo not cleared, text overlaps, occasional reconnect
2026-06-18 22:31:48 +02:00

62 lines
1.7 KiB
Makefile

.DEFAULT_GOAL := check
ESP_PORT ?= /dev/ttyACM0
# Run the full local check suite — same order as CI would.
check: fmt-check clippy test
@echo "✅ All checks passed"
# Apply rustfmt to all files.
fmt:
cargo fmt
# Check formatting without modifying files (CI-safe).
fmt-check:
cargo fmt --check
# Run Clippy and treat warnings as errors.
clippy:
cargo clippy -- -D warnings
# Run the test suite.
test:
cargo test
# Apply fmt + clippy auto-fixes in one shot.
fix:
cargo fmt
cargo clippy --fix --allow-dirty --allow-staged
# Start the K-Frame server.
server:
cargo run --bin bootstrap
# Start the desktop client.
desktop:
cargo run --bin client-desktop
# Build ESP32 firmware. Requires env: KFRAME_WIFI_SSID, KFRAME_WIFI_PASS, KFRAME_SERVER_ADDR
esp-build:
@test -n "$(KFRAME_WIFI_SSID)" || (echo "Set KFRAME_WIFI_SSID, KFRAME_WIFI_PASS, KFRAME_SERVER_ADDR" && exit 1)
cd crates/client-esp32 && cargo build --release
# Flash ESP32 firmware.
esp-flash:
@test -n "$(KFRAME_WIFI_SSID)" || (echo "Set KFRAME_WIFI_SSID, KFRAME_WIFI_PASS, KFRAME_SERVER_ADDR" && exit 1)
cd crates/client-esp32 && cargo espflash flash --port $(ESP_PORT) --release
# Flash and monitor ESP32.
esp-run:
@test -n "$(KFRAME_WIFI_SSID)" || (echo "Set KFRAME_WIFI_SSID, KFRAME_WIFI_PASS, KFRAME_SERVER_ADDR" && exit 1)
cd crates/client-esp32 && cargo espflash flash --port $(ESP_PORT) --release --monitor
# Monitor ESP32 serial output.
esp-monitor:
cd crates/client-esp32 && cargo espflash monitor --port $(ESP_PORT)
# Erase ESP32 flash (recovery).
esp-erase:
esptool --port $(ESP_PORT) erase-flash
.PHONY: check fmt fmt-check clippy test fix server desktop esp-build esp-flash esp-run esp-monitor esp-erase