Skip to content

Commit 36886f1

Browse files
Merge #259
259: Rust assembly stubs r=thalesfragoso a=jonas-schievink Disclaimer: I have not tested any of this (help wanted, we have no tests in here). Thanks to @therealprof for nerd-sniping me into oblivion. Fixes #254 Fixes #194 Fixes #139 # Summary * Remove the assembly files in favor of a new `asm.rs`, which uses unstable inline assembly and provides a C ABI interface. * Replace the shell scripts by a [`cargo-xtask`](https://github.com/matklad/cargo-xtask/). * While we're at it, also pre-build artifacts that are compatible with linker-plugin LTO, fixing #139 (again, not tested) This means that contributors and maintainers just need ~~a nightly Rust compiler installed~~ to run `cargo xtask assemble`. No binutils, no assembler, no `ar`, no GCC/Clang, and especially nothing from the godawful Arm servers, fixing #194. You don't even have to install the correct nightly Rust toolchain, `cargo xtask` does it for you (and installs all the thumb targets too). Co-authored-by: Jonas Schievink <[email protected]>
2 parents bbf4a54 + 346cd48 commit 36886f1

33 files changed

+619
-492
lines changed

.cargo/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
xtask = "run --package xtask --bin xtask --"

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ before_install: set -e
7272

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

7776
script:
7877
- bash ci/script.sh

Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ volatile-register = "0.2.0"
2121
bitfield = "0.13.2"
2222
embedded-hal = "0.2.4"
2323

24+
[features]
25+
cm7-r0p1 = []
26+
inline-asm = []
27+
linker-plugin-lto = []
28+
29+
[workspace]
30+
members = ["xtask"]
31+
2432
[package.metadata.docs.rs]
2533
targets = [
2634
"thumbv8m.main-none-eabihf",
@@ -31,7 +39,3 @@ targets = [
3139
"thumbv8m.base-none-eabi",
3240
"thumbv8m.main-none-eabi"
3341
]
34-
35-
[features]
36-
cm7-r0p1 = []
37-
inline-asm = []

asm-cm7-r0p1.s

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

asm-fpu.s

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

asm-toolchain

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nightly-2020-08-26

asm-v7.s

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

asm-v8-main.s

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

asm-v8.s

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

0 commit comments

Comments
 (0)