-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
35 lines (28 loc) · 979 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
CARGO := cargo
DEFMT_LOG := info
.PHONY: all
all: format clippy
.PHONY: check-format
check-format:
$(CARGO) fmt --all -- --check
.PHONY: format
format:
$(CARGO) fmt --all
.PHONY: clippy
clippy:
$(CARGO) clippy --all --examples --features seed -- -D warnings
$(CARGO) clippy --all --examples --features seed_1_1 -- -D warnings
$(CARGO) clippy --all --examples --features seed_1_1,sampling_rate_96khz -- -D warnings
$(CARGO) clippy --all --examples --features seed_1_2 -- -D warnings
$(CARGO) clippy --all --examples --features patch_sm -- -D warnings
$(CARGO) clippy --all --examples --features seed -- -D warnings
.PHONY: update
update:
$(CARGO) update
.PHONY: flash
flash:
DEFMT_LOG=$(DEFMT_LOG) $(CARGO) run --release --example $(WHAT) --features $(BOARD),defmt
.PHONY: flash-dfu
flash-dfu:
$(CARGO) objcopy --release --example $(WHAT) --features $(BOARD) -- -O binary target/program.bin
dfu-util -a 0 -s 0x08000000:leave -D target/program.bin -d ,0483:df11