Skip to content

Commit e44cf66

Browse files
committed
Add Justfile command to build take-api examples.
1 parent 904db5d commit e44cf66

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Justfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
set dotenv-load
22

3+
build-example EXAMPLE OVERRIDE="nightly" WORKSPACE="take-api":
4+
#!/bin/sh
5+
6+
set -eux
7+
8+
TARGET=target/msp430-none-elf/release/examples/{{EXAMPLE}}
9+
cargo +{{OVERRIDE}} rustc --manifest-path=./{{WORKSPACE}}/Cargo.toml --release -Zbuild-std=core --example={{EXAMPLE}} -- --emit=obj=$TARGET.o,llvm-ir=$TARGET.ll,asm=$TARGET.s
10+
msp430-elf-objdump -Cd $TARGET > $TARGET.lst
11+
msp430-elf-readelf -a --wide $TARGET > $TARGET.sym
12+
msp430-elf-objdump -Cd $TARGET.o > $TARGET.o.lst
13+
msp430-elf-readelf -a --wide $TARGET.o > $TARGET.reloc
14+
msp430-elf-size $TARGET
15+
316
# Compare sizes using rustup
417
compare-min OVERRIDE="nightly":
518
cargo +{{OVERRIDE}} rustc --manifest-path=take-api/Cargo.toml --release --target=msp430-none-elf -Z build-std=core --example min -- --emit=llvm-ir=compare/min-nobare.ll,asm=compare/min-nobare.asm

0 commit comments

Comments
 (0)