forked from nickray/lpc55-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
98 lines (74 loc) · 2.02 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
build-both:
cargo build
cargo build --release
clean:
rm -rf venv
view-rtic-expansion:
rustfmt target/rtic-expansion.rs
vi target/rtic-expansion.rs
# turn off the LEDs and whatnot
darkness:
gdb-multiarch -q -x darkness.gdb > /dev/null 2> /dev/null
#
# External documentation
#
fetch-docs:
mkdir -p ref
curl -s https://www.nxp.com/docs/en/data-sheet/LPC55S6x.pdf \
-o ref/datasheet-lpc55s6x.pdf
curl -s https://www.nxp.com/docs/en/user-guide/UM11126.pdf \
-o ref/usermanual-lpc55s6x.pdf
curl -s https://www.nxp.com/docs/en/errata/ES_LPC55S6x.pdf \
-o ref/errata-lpc55s6x.pdf
curl -sk https://static.docs.arm.com/100235/0004/arm_cortex_m33_dgug_100235_0004_00_en.pdf \
-o ref/genericuserguide-cortexm33.pdf
curl -s https://www.segger.com/downloads/jlink/UM08001 \
-o ref/userguide-jlink.pdf
curl -s https://www.segger.com/downloads/jlink/UM08036 \
-o ref/gdbextensions-jlink.pdf
#
# CI
#
rustup:
rustup target add thumbv8m.main-none-eabi
rustup target add thumbv8m.main-none-eabihf
rustup update
build-examples-verbosely:
cargo build --verbose --examples
cargo build --verbose --examples --release
build-all-features:
cargo build --verbose --all-features
#
# For running examples
#
jlink:
JLinkGDBServer -strict -device LPC55S69 -if SWD -vd
# jlink:
# scripts/jlink
# fg-jlink:
# -pkill JLinkGDBServer
# JLinkGDBServer -device LPC55S69 -if SWD &> jlink.log &
# stop-jlink:
# pkill JLinkGDBServer
EXAMPLE := led_utick
build-example:
cargo build --example $(EXAMPLE)
build-example-release:
cargo build --example $(EXAMPLE) --release
run-example:
cargo run --example $(EXAMPLE)
run-example-release:
cargo run --example $(EXAMPLE) --release
sizes-example:
cargo size --example $(EXAMPLE)
cargo size --example $(EXAMPLE) --release
venv:
python3 -m venv venv
venv/bin/pip install -U pip
# re-run if dev or runtime dependencies change,
# or when adding new scripts
update-venv: venv
venv/bin/pip install -U pip
venv/bin/pip install -U -r dev-requirements.txt
test-serial:
venv/bin/python scripts/test_serial.py