Skip to content

Commit 478418c

Browse files
bors[bot]japaric
andcommitted
Merge #108
108: remove build dependency on arm-none-eabi-gcc r=adamgreig a=japaric by shipping pre-assembled object files. This is the same approach as the one used in #95 r? @rust-embedded/cortex-m (anyone) Co-authored-by: Jorge Aparicio <[email protected]>
2 parents dfd0349 + 945e268 commit 478418c

40 files changed

+282
-226
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
*.rs.bk
33
.#*
44
Cargo.lock
5+
bin/*.after
6+
bin/*.before
7+
bin/*.o
58
target

.travis.yml

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,76 +3,46 @@ language: rust
33
matrix:
44
include:
55
- env: TARGET=x86_64-unknown-linux-gnu
6+
rust: stable
67
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
78

89
- env: TARGET=thumbv6m-none-eabi
9-
rust: beta
10-
addons:
11-
apt:
12-
packages:
13-
- gcc-arm-none-eabi
10+
rust: stable
1411
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
1512

1613
- env: TARGET=thumbv7m-none-eabi
17-
rust: beta
18-
addons:
19-
apt:
20-
packages:
21-
- gcc-arm-none-eabi
14+
rust: stable
2215
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
2316

2417
- env: TARGET=thumbv7em-none-eabi
25-
rust: beta
26-
addons:
27-
apt:
28-
packages:
29-
- gcc-arm-none-eabi
18+
rust: stable
3019
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
3120

3221
- env: TARGET=thumbv7em-none-eabihf
33-
rust: beta
34-
addons:
35-
apt:
36-
packages:
37-
- gcc-arm-none-eabi
22+
rust: stable
3823
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
3924

4025
- env: TARGET=thumbv6m-none-eabi
4126
rust: nightly
42-
addons:
43-
apt:
44-
packages:
45-
- gcc-arm-none-eabi
4627
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
4728

4829
- env: TARGET=thumbv7m-none-eabi
4930
rust: nightly
50-
addons:
51-
apt:
52-
packages:
53-
- gcc-arm-none-eabi
5431
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
5532

5633
- env: TARGET=thumbv7em-none-eabi
5734
rust: nightly
58-
addons:
59-
apt:
60-
packages:
61-
- gcc-arm-none-eabi
6235
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
6336

6437
- env: TARGET=thumbv7em-none-eabihf
6538
rust: nightly
66-
addons:
67-
apt:
68-
packages:
69-
- gcc-arm-none-eabi
7039
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
7140

7241
before_install: set -e
7342

7443
install:
7544
- bash ci/install.sh
45+
- export PATH="$PATH:$PWD/gcc/bin"
7646

7747
script:
7848
- bash ci/script.sh
@@ -86,6 +56,7 @@ before_cache:
8656

8757
branches:
8858
only:
59+
- master
8960
- staging
9061
- trying
9162

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ name = "cortex-m"
99
repository = "https://github.com/japaric/cortex-m"
1010
version = "0.5.4"
1111

12-
[build-dependencies]
13-
cc = "1.0.10"
14-
1512
[dependencies]
1613
aligned = "0.2.0"
1714
bare-metal = "0.2.0"

asm-cm7-r0p1.s

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.section .text.__basepri_max_cm7_r0p1
2+
.global __basepri_max_cm7_r0p1
3+
.syntax unified
4+
.thumb_func
5+
__basepri_max_cm7_r0p1:
6+
mrs r1, PRIMASK
7+
cpsid i
8+
tst.w r1, #1
9+
msr BASEPRI_MAX, r0
10+
it ne
11+
bxne lr
12+
cpsie i
13+
bx lr
14+
15+
.section .text.__basepri_w_cm7_r0p1
16+
.global __basepri_w_cm7_r0p1
17+
.syntax unified
18+
.thumb_func
19+
__basepri_w_cm7_r0p1:
20+
mrs r1, PRIMASK
21+
cpsid i
22+
tst.w r1, #1
23+
msr BASEPRI, r0
24+
it ne
25+
bxne lr
26+
cpsie i
27+
bx lr

asm-v7.s

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.section .text.__basepri_max
2+
.global __basepri_max
3+
.thumb_func
4+
__basepri_max:
5+
msr BASEPRI_MAX, r0
6+
bx lr
7+
8+
.section .text.__basepri_r
9+
.global __basepri_r
10+
.thumb_func
11+
__basepri_r:
12+
mrs r0, BASEPRI
13+
bx lr
14+
15+
.section .text.__basepri_w
16+
.global __basepri_w
17+
.thumb_func
18+
__basepri_w:
19+
msr BASEPRI, r0
20+
bx lr
21+
22+
.section .text.__faultmask
23+
.global __faultmask
24+
.thumb_func
25+
__faultmask:
26+
mrs r0, FAULTMASK
27+
bx lr

asm.s

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
.section .text.__bkpt
2+
.global __bkpt
3+
.thumb_func
4+
__bkpt:
5+
bkpt
6+
bx lr
7+
8+
.section .text.__control
9+
.global __control
10+
.thumb_func
11+
__control:
12+
mrs r0, CONTROL
13+
bx lr
14+
15+
.section .text.__cpsid
16+
.global __cpsid
17+
.thumb_func
18+
__cpsid:
19+
cpsid i
20+
bx lr
21+
22+
.section .text.__cpsie
23+
.global __cpsie
24+
.thumb_func
25+
__cpsie:
26+
cpsie i
27+
bx lr
28+
29+
.section .text.__delay
30+
.global __delay
31+
.syntax unified
32+
.thumb_func
33+
__delay:
34+
nop
35+
subs r0, #1
36+
bne __delay
37+
bx lr
38+
39+
.section .text.__dmb
40+
.global __dmb
41+
.thumb_func
42+
__dmb:
43+
dmb 0xF
44+
bx lr
45+
46+
.section .text.__dsb
47+
.global __dsb
48+
.thumb_func
49+
__dsb:
50+
dsb 0xF
51+
bx lr
52+
53+
.section .text.__isb
54+
.global __isb
55+
.thumb_func
56+
__isb:
57+
isb 0xF
58+
bx lr
59+
60+
.section .text.__msp_r
61+
.global __msp_r
62+
.thumb_func
63+
__msp_r:
64+
mrs r0, MSP
65+
bx lr
66+
67+
.section .text.__msp_w
68+
.global __msp_w
69+
.thumb_func
70+
__msp_w:
71+
msr MSP, r0
72+
bx lr
73+
74+
.section .text.__nop
75+
.global __nop
76+
.thumb_func
77+
__nop:
78+
bx lr
79+
80+
.section .text.__primask
81+
.global __primask
82+
.thumb_func
83+
__primask:
84+
mrs r0, PRIMASK
85+
bx lr
86+
87+
.section .text.__psp_r
88+
.global __psp_r
89+
.thumb_func
90+
__psp_r:
91+
mrs r0, PSP
92+
bx lr
93+
94+
.section .text.__psp_w
95+
.global __psp_w
96+
.thumb_func
97+
__psp_w:
98+
msr PSP, r0
99+
bx lr
100+
101+
.section .text.__sev
102+
.global __sev
103+
.thumb_func
104+
__sev:
105+
sev
106+
bx lr
107+
108+
.section .text.__wfe
109+
.global __wfe
110+
.thumb_func
111+
__wfe:
112+
wfe
113+
bx lr
114+
115+
.section .text.__wfi
116+
.global __wfi
117+
.thumb_func
118+
__wfi:
119+
wfi
120+
bx lr

asm/basepri_max-cm7-r0p1.s

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/basepri_max.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/basepri_r.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/basepri_w-cm7-r0p1.s

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/basepri_w.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/bkpt.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/control.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/cpsid.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/cpsie.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/delay.s

Lines changed: 0 additions & 8 deletions
This file was deleted.

asm/dmb.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/dsb.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/faultmask.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/isb.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/msp_r.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

asm/msp_w.s

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)