Skip to content

Commit bff66f8

Browse files
committed
make compilable on stable
1 parent 00d6faa commit bff66f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+511
-103
lines changed

Cargo.toml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,28 @@ keywords = ["arm", "cortex-m", "register", "peripheral"]
77
license = "MIT OR Apache-2.0"
88
name = "cortex-m"
99
repository = "https://github.com/japaric/cortex-m"
10-
version = "0.4.3"
10+
version = "0.4.4"
11+
12+
[build-dependencies]
13+
cc = "1.0.10"
1114

1215
[dependencies]
13-
aligned = "0.1.1"
14-
bare-metal = "0.1.0"
1516
volatile-register = "0.2.0"
16-
untagged-option = "0.1.1"
17+
18+
[dependencies.aligned]
19+
default-features = false
20+
version = "0.1.2"
21+
22+
[dependencies.bare-metal]
23+
default-features = false
24+
version = "0.1.2"
25+
26+
[dependencies.untagged-option]
27+
optional = true
28+
version = "0.1.1"
1729

1830
[features]
1931
cm7-r0p1 = []
32+
default = ["inline-asm", "singleton"]
33+
inline-asm = []
34+
singleton = ["untagged-option"]

asm/basepri_max-cm7-r0p1.s

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
;; fn __basepri_max(u8)
2+
;; executed in a critical section to work around a silicon erratum
3+
.global __basepri_max
4+
__basepri_max:
5+
mrs r1, PRIMASK
6+
cpsid i
7+
tst.w r1, #1
8+
msr BASEPRI_MAX, r0
9+
it ne
10+
bxne lr
11+
cpsie i
12+
bx lr

asm/basepri_max.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.global __basepri_max
2+
__basepri_max:
3+
msr BASEPRI_MAX, r0
4+
bx lr

asm/basepri_r.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.global __basepri_r
2+
__basepri_r:
3+
mrs r0, BASEPRI
4+
bx lr

asm/basepri_w-cm7-r0p1.s

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
;; fn __basepri_w(u8)
2+
;; executed in a critical section to work around a silicon erratum
3+
.global __basepri_w
4+
__basepri_w:
5+
mrs r1, PRIMASK
6+
cpsid i
7+
tst.w r1, #1
8+
msr BASEPRI, r0
9+
it ne
10+
bxne lr
11+
cpsie i
12+
bx lr

asm/basepri_w.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.global __basepri_w
2+
__basepri_w:
3+
msr BASEPRI, r0
4+
bx lr

asm/bkpt.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.global __bkpt
2+
__bkpt:
3+
bkpt
4+
bx lr

asm/control.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.global __control
2+
__control:
3+
mrs r0, CONTROL
4+
bx lr

asm/cpsid.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.global __cpsid
2+
__cpsid:
3+
cpsid i
4+
bx lr

asm/cpsie.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.global __cpsie
2+
__cpsie:
3+
cpsie i
4+
bx lr

0 commit comments

Comments
 (0)