chore(firmware): add justfile wrapping common build/flash commands
This commit is contained in:
@@ -20,6 +20,12 @@ Everything past that — EPD, SD, USB host, partial refresh, Wi-Fi/TLS,
|
||||
gitoxide push — is its own follow-up spike per
|
||||
[`docs/v0.1-mvp-technical.md`](../docs/v0.1-mvp-technical.md#hardware-bring-up-order).
|
||||
|
||||
## Quick commands
|
||||
|
||||
A [`justfile`](https://github.com/casey/just) wraps the common commands and
|
||||
sources the espup env itself — run `just` in this directory for the list
|
||||
(`build`, `flash`, `monitor`, `info`, `ports`).
|
||||
|
||||
## Build
|
||||
|
||||
Once per shell session, source the espup env (sets `LIBCLANG_PATH` and adds
|
||||
|
||||
30
firmware/justfile
Normal file
30
firmware/justfile
Normal file
@@ -0,0 +1,30 @@
|
||||
# Typoena firmware — common commands.
|
||||
# Recipes source ~/export-esp.sh themselves (LIBCLANG_PATH + Xtensa GCC),
|
||||
# so no per-shell setup is needed before calling just.
|
||||
|
||||
esp_env := ". ~/export-esp.sh &&"
|
||||
elf := "target/xtensa-esp32s3-espidf/release/firmware"
|
||||
|
||||
# list recipes
|
||||
default:
|
||||
@just --list
|
||||
|
||||
# compile (release)
|
||||
build:
|
||||
{{esp_env}} cargo build --release
|
||||
|
||||
# build + flash + open serial monitor
|
||||
flash:
|
||||
{{esp_env}} cargo run --release
|
||||
|
||||
# serial monitor only, with decoded backtraces
|
||||
monitor:
|
||||
espflash monitor --elf {{elf}}
|
||||
|
||||
# detect board, print chip/MAC/flash size
|
||||
info:
|
||||
espflash board-info
|
||||
|
||||
# list USB serial devices
|
||||
ports:
|
||||
@ls /dev/cu.usb* 2>/dev/null || echo "no USB serial device found"
|
||||
Reference in New Issue
Block a user