aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-semihosting/src
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2022-01-23 14:20:02 +0000
committerGravatar GitHub <noreply@github.com> 2022-01-23 14:20:02 +0000
commitc350114d8002d91bd71d08e7ad6ee2e960c2ed35 (patch)
treeb741c9324aca7c68fae566afdcabf34c8175a134 /cortex-m-semihosting/src
parent92552c73d3b56dc86007450633950d16ebe0e495 (diff)
parent391fb7edb90131f295ae759ff780f2a4233dada2 (diff)
downloadcortex-m-c350114d8002d91bd71d08e7ad6ee2e960c2ed35.tar.gz
cortex-m-c350114d8002d91bd71d08e7ad6ee2e960c2ed35.tar.zst
cortex-m-c350114d8002d91bd71d08e7ad6ee2e960c2ed35.zip
Merge #391c-m-rt-v0.7.1
391: Merge cortex-m-rt into this repository r=thejpster a=adamgreig This PR merges the cortex-m-rt repository (with history) into this repo, inside the `cortex-m-rt` folder which is added to the workspace. The main advantage is easier combined testing of cortex-m with cortex-m-rt (including on-hardware tests e.g. #355), and in the future easier changes across the two projects. The MSRV of cortex-m-rt is bumped 1.39 -> 1.40 to align it with cortex-m itself. I've updated the CI to run the same tests and checks as before, and updated references to the old URL. If/after this is merged, I propose adding a note to the old repo's README and then archiving it. An alternative to this technique would be adding all the files in one new commit (not preserving history), if anyone thinks that would be neater. NB: This PR also adds an inline to ITM to fix a clippy hard error. For future reference, the git work was: ``` cd cortex-m-rt git filter-repo --to-subdirectory-filter cortex-m-rt cd ../cortex-m git remote add rt ../cortex-m-rt git fetch rt git merge --allow-unrelated-histories rt/master ``` Co-authored-by: bors[bot] <bors[bot]@users.noreply.github.com> Co-authored-by: Jonathan 'theJPster' Pallant <github@thejpster.org.uk> Co-authored-by: Adam Greig <adam@adamgreig.com> Co-authored-by: Jonas Schievink <jonasschievink@gmail.com> Co-authored-by: Jorge Aparicio <jorge@japaric.io> Co-authored-by: Emil Fresk <emil.fresk@gmail.com> Co-authored-by: Daniel Egger <daniel@eggers-club.de> Co-authored-by: Niklas Claesson <nicke.claesson@gmail.com> Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Co-authored-by: Vadim Kaushan <admin@disasm.info>
Diffstat (limited to 'cortex-m-semihosting/src')
-rw-r--r--cortex-m-semihosting/src/lib.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/cortex-m-semihosting/src/lib.rs b/cortex-m-semihosting/src/lib.rs
index a67b84d..3bc23ea 100644
--- a/cortex-m-semihosting/src/lib.rs
+++ b/cortex-m-semihosting/src/lib.rs
@@ -153,7 +153,7 @@
//!
//! ## `inline-asm`
//!
-//! When this feature is enabled semihosting is implemented using inline assembly (`llvm_asm!`) and
+//! When this feature is enabled semihosting is implemented using inline assembly and
//! compiling this crate requires nightly.
//!
//! When this feature is disabled semihosting is implemented using FFI calls into an external
@@ -179,7 +179,6 @@
//!
//! [pdf]: http://infocenter.arm.com/help/topic/com.arm.doc.dui0471e/DUI0471E_developing_for_arm_processors.pdf
-#![cfg_attr(feature = "inline-asm", feature(llvm_asm))]
#![deny(missing_docs)]
#![no_std]
@@ -213,7 +212,12 @@ pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
#[cfg(all(thumb, feature = "inline-asm", not(feature = "no-semihosting")))]
() => {
let mut nr = _nr;
- llvm_asm!("bkpt 0xAB" : "+{r0}"(nr) : "{r1}"(_arg) :: "volatile");
+ core::arch::asm!(
+ "bkpt #0xab",
+ inout("r0") nr,
+ in("r1") _arg,
+ options(nomem, nostack, preserves_flags)
+ );
nr
}