forked from rust-embedded/cortex-m-rt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathassemble.sh
executable file
·33 lines (21 loc) · 998 Bytes
/
assemble.sh
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
#!/usr/bin/env bash
set -euxo pipefail
# cflags taken from cc 1.0.22
crate=cortex-m-rt
# remove existing blobs because otherwise this will append object files to the old blobs
rm -f bin/*.a
arm-none-eabi-gcc -c -march=armv6s-m asm.S -o bin/$crate.o
ar crs bin/thumbv6m-none-eabi.a bin/$crate.o
arm-none-eabi-gcc -c -march=armv7-m asm.S -o bin/$crate.o
ar crs bin/thumbv7m-none-eabi.a bin/$crate.o
arm-none-eabi-gcc -c -march=armv7e-m asm.S -o bin/$crate.o
ar crs bin/thumbv7em-none-eabi.a bin/$crate.o
arm-none-eabi-gcc -c -march=armv7e-m asm.S -DHAS_FPU -o bin/$crate.o
ar crs bin/thumbv7em-none-eabihf.a bin/$crate.o
arm-none-eabi-gcc -c -march=armv8-m.base asm.S -o bin/$crate.o
ar crs bin/thumbv8m.base-none-eabi.a bin/$crate.o
arm-none-eabi-gcc -c -march=armv8-m.main asm.S -o bin/$crate.o
ar crs bin/thumbv8m.main-none-eabi.a bin/$crate.o
arm-none-eabi-gcc -c -march=armv8-m.main -DHAS_FPU asm.S -o bin/$crate.o
ar crs bin/thumbv8m.main-none-eabihf.a bin/$crate.o
rm bin/$crate.o