Files
Onur Özkan 62b18d5b2e build: replace argument dispatch and retain source-bound verification
Replace argument recovery with direct build targets. Run host, target,
board, coverage, Miri and selected Kani checks while retaining source
identities, logs and artifacts, including failed attempts.

Keep the PID proof diagnostic exception explicit and match its exact
identity alongside passing contract assertions and covers.

Validation: final-source verification matrix, assembled workflow tests
and documentation build.
2026-11-07 18:12:11 +03:00

31 lines
1.0 KiB
Makefile

SHELL := /bin/sh
MAKEFLAGS += --no-print-directory
export CARGO_BUILD_JOBS ?= 2
.DEFAULT_GOAL := help
.DELETE_ON_ERROR:
override EMBEDDED_TARGET := thumbv7em-none-eabihf
override PACKAGE := kaptan-$(BOARD)
CARGO_TARGET_DIR ?= ../../target
override ELF := $(CARGO_TARGET_DIR)/$(EMBEDDED_TARGET)/release/$(PACKAGE)
.NOTPARALLEL:
.PHONY: help build flash
help:
@printf '%s\n' 'Usage: make -C firmware/boards/$(BOARD) build|flash' '' \
' build Build and package $(PACKAGE) in release mode' \
' flash Build, package, and write $(PACKAGE) over DFU' '' \
'CARGO_TARGET_DIR defaults to firmware/target; relative overrides are relative to this board directory.' \
'For custom Cargo or DFU options, invoke cargo or dfu-util directly.'
build:
cargo build --release --locked --offline -p $(PACKAGE) --bin $(PACKAGE) \
--target $(EMBEDDED_TARGET) --target-dir "$(CARGO_TARGET_DIR)"
../../scripts/create-dfu-image.sh "$(ELF)"
flash: build
dfu-util --device 0483:df11 --alt 0 --dfuse-address 0x08000000:leave \
--download "$(ELF).bin"