Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
language: rust

env:
global:
- RUSTFLAGS="-D warnings"

matrix:
include:
# MSRV
- env: TARGET=x86_64-unknown-linux-gnu
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=armv7r-none-eabi
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=armv7r-none-eabihf
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=armebv7r-none-eabi
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=armebv7r-none-eabihf
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

This project is developed and maintained by the [Cortex-R team][team].

# Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on stable Rust 1.31.0 and up. It *might*
compile with older versions but that may change in any new patch release.

## License

The `arm-dcc` crate is distributed under the terms of both the MIT license and
Expand Down
3 changes: 1 addition & 2 deletions panic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@
//!
//! ## `inline-asm`
//!
//! When this feature is enabled `dcc::write` is implemented using inline assembly (`asm!`) and
//! When this feature is enabled `dcc::write` is implemented using inline assembly (`llvm_asm!`) and
//! compiling this crate requires nightly. Note that this feature requires that the compilation
//! target is one of the 4 ARMv7 Cortex-R targets.
//!
//! When this feature is disabled `dcc::write` is implemented using FFI calls into an external
//! assembly file and compiling this crate works on stable and beta.


#![deny(missing_docs)]
#![deny(warnings)]
#![no_std]
Expand Down
9 changes: 4 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@
//!
//! ## `inline-asm`
//!
//! When this feature is enabled `dcc::write` is implemented using inline assembly (`asm!`) and
//! When this feature is enabled `dcc::write` is implemented using inline assembly (`llvm_asm!`) and
//! compiling this crate requires nightly. Note that this feature requires that the compilation
//! target is one of the 4 ARMv7 Cortex-R targets.
//!
//! When this feature is disabled `dcc::write` is implemented using FFI calls into an external
//! assembly file and compiling this crate works on stable and beta.

#![cfg_attr(feature = "inline-asm", feature(asm))]
#![cfg_attr(feature = "inline-asm", feature(llvm_asm))]
#![deny(missing_docs)]
#![deny(warnings)]
#![no_std]

use core::fmt;
Expand Down Expand Up @@ -135,12 +134,12 @@ pub fn write(word: u32) {
let mut r: u32;
loop {
// busy wait until we can send data
asm!("MRC p14, 0, $0, c0, c1, 0" : "=r"(r) : : : "volatile");
llvm_asm!("MRC p14, 0, $0, c0, c1, 0" : "=r"(r) : : : "volatile");
if r & W == 0 {
break;
}
}
asm!("MCR p14, 0, $0, c0, c5, 0" : : "r"(word) : : "volatile");
llvm_asm!("MCR p14, 0, $0, c0, c5, 0" : : "r"(word) : : "volatile");
}
}
#[cfg(all(target_arch = "arm", not(feature = "nop"), not(feature = "inline-asm")))]
Expand Down