Skip to content

Commit

Permalink
Merge #108
Browse files Browse the repository at this point in the history
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 <jorge@japaric.io>
  • Loading branch information
bors[bot] and japaric committed Aug 26, 2018
2 parents dfd0349 + 945e268 commit 478418c
Show file tree
Hide file tree
Showing 40 changed files with 282 additions and 226 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
*.rs.bk
.#*
Cargo.lock
bin/*.after
bin/*.before
bin/*.o
target
43 changes: 7 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,46 @@ language: rust
matrix:
include:
- env: TARGET=x86_64-unknown-linux-gnu
rust: stable
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv6m-none-eabi
rust: beta
addons:
apt:
packages:
- gcc-arm-none-eabi
rust: stable
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv7m-none-eabi
rust: beta
addons:
apt:
packages:
- gcc-arm-none-eabi
rust: stable
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv7em-none-eabi
rust: beta
addons:
apt:
packages:
- gcc-arm-none-eabi
rust: stable
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv7em-none-eabihf
rust: beta
addons:
apt:
packages:
- gcc-arm-none-eabi
rust: stable
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv6m-none-eabi
rust: nightly
addons:
apt:
packages:
- gcc-arm-none-eabi
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv7m-none-eabi
rust: nightly
addons:
apt:
packages:
- gcc-arm-none-eabi
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv7em-none-eabi
rust: nightly
addons:
apt:
packages:
- gcc-arm-none-eabi
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv7em-none-eabihf
rust: nightly
addons:
apt:
packages:
- gcc-arm-none-eabi
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

before_install: set -e

install:
- bash ci/install.sh
- export PATH="$PATH:$PWD/gcc/bin"

script:
- bash ci/script.sh
Expand All @@ -86,6 +56,7 @@ before_cache:

branches:
only:
- master
- staging
- trying

Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ name = "cortex-m"
repository = "https://github.com/japaric/cortex-m"
version = "0.5.4"

[build-dependencies]
cc = "1.0.10"

[dependencies]
aligned = "0.2.0"
bare-metal = "0.2.0"
Expand Down
27 changes: 27 additions & 0 deletions asm-cm7-r0p1.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.section .text.__basepri_max_cm7_r0p1
.global __basepri_max_cm7_r0p1
.syntax unified
.thumb_func
__basepri_max_cm7_r0p1:
mrs r1, PRIMASK
cpsid i
tst.w r1, #1
msr BASEPRI_MAX, r0
it ne
bxne lr
cpsie i
bx lr

.section .text.__basepri_w_cm7_r0p1
.global __basepri_w_cm7_r0p1
.syntax unified
.thumb_func
__basepri_w_cm7_r0p1:
mrs r1, PRIMASK
cpsid i
tst.w r1, #1
msr BASEPRI, r0
it ne
bxne lr
cpsie i
bx lr
27 changes: 27 additions & 0 deletions asm-v7.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.section .text.__basepri_max
.global __basepri_max
.thumb_func
__basepri_max:
msr BASEPRI_MAX, r0
bx lr

.section .text.__basepri_r
.global __basepri_r
.thumb_func
__basepri_r:
mrs r0, BASEPRI
bx lr

.section .text.__basepri_w
.global __basepri_w
.thumb_func
__basepri_w:
msr BASEPRI, r0
bx lr

.section .text.__faultmask
.global __faultmask
.thumb_func
__faultmask:
mrs r0, FAULTMASK
bx lr
120 changes: 120 additions & 0 deletions asm.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
.section .text.__bkpt
.global __bkpt
.thumb_func
__bkpt:
bkpt
bx lr

.section .text.__control
.global __control
.thumb_func
__control:
mrs r0, CONTROL
bx lr

.section .text.__cpsid
.global __cpsid
.thumb_func
__cpsid:
cpsid i
bx lr

.section .text.__cpsie
.global __cpsie
.thumb_func
__cpsie:
cpsie i
bx lr

.section .text.__delay
.global __delay
.syntax unified
.thumb_func
__delay:
nop
subs r0, #1
bne __delay
bx lr

.section .text.__dmb
.global __dmb
.thumb_func
__dmb:
dmb 0xF
bx lr

.section .text.__dsb
.global __dsb
.thumb_func
__dsb:
dsb 0xF
bx lr

.section .text.__isb
.global __isb
.thumb_func
__isb:
isb 0xF
bx lr

.section .text.__msp_r
.global __msp_r
.thumb_func
__msp_r:
mrs r0, MSP
bx lr

.section .text.__msp_w
.global __msp_w
.thumb_func
__msp_w:
msr MSP, r0
bx lr

.section .text.__nop
.global __nop
.thumb_func
__nop:
bx lr

.section .text.__primask
.global __primask
.thumb_func
__primask:
mrs r0, PRIMASK
bx lr

.section .text.__psp_r
.global __psp_r
.thumb_func
__psp_r:
mrs r0, PSP
bx lr

.section .text.__psp_w
.global __psp_w
.thumb_func
__psp_w:
msr PSP, r0
bx lr

.section .text.__sev
.global __sev
.thumb_func
__sev:
sev
bx lr

.section .text.__wfe
.global __wfe
.thumb_func
__wfe:
wfe
bx lr

.section .text.__wfi
.global __wfi
.thumb_func
__wfi:
wfi
bx lr
12 changes: 0 additions & 12 deletions asm/basepri_max-cm7-r0p1.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/basepri_max.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/basepri_r.s

This file was deleted.

12 changes: 0 additions & 12 deletions asm/basepri_w-cm7-r0p1.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/basepri_w.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/bkpt.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/control.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/cpsid.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/cpsie.s

This file was deleted.

8 changes: 0 additions & 8 deletions asm/delay.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/dmb.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/dsb.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/faultmask.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/isb.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/msp_r.s

This file was deleted.

5 changes: 0 additions & 5 deletions asm/msp_w.s

This file was deleted.

Loading

0 comments on commit 478418c

Please sign in to comment.