diff options
author | 2020-09-01 22:58:22 +0200 | |
---|---|---|
committer | 2020-10-13 21:31:37 +0200 | |
commit | cab2e28f674901cd87d4f88f7eb5ba32d3517b35 (patch) | |
tree | cacc3652c5fda7f5830319abfe88b063e33f5fa3 /cortex-m-semihosting | |
parent | 9bc9be611b262edf5c7811235e16bdbcbb3509cf (diff) | |
download | cortex-m-cab2e28f674901cd87d4f88f7eb5ba32d3517b35.tar.gz cortex-m-cab2e28f674901cd87d4f88f7eb5ba32d3517b35.tar.zst cortex-m-cab2e28f674901cd87d4f88f7eb5ba32d3517b35.zip |
Integrate semihosting crates
Diffstat (limited to 'cortex-m-semihosting')
19 files changed, 4 insertions, 206 deletions
diff --git a/cortex-m-semihosting/.github/CODEOWNERS b/cortex-m-semihosting/.github/CODEOWNERS deleted file mode 100644 index d810925..0000000 --- a/cortex-m-semihosting/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @rust-embedded/cortex-m
\ No newline at end of file diff --git a/cortex-m-semihosting/.github/bors.toml b/cortex-m-semihosting/.github/bors.toml deleted file mode 100644 index ca42be0..0000000 --- a/cortex-m-semihosting/.github/bors.toml +++ /dev/null @@ -1,4 +0,0 @@ -block_labels = ["needs-decision"] -delete_merged_branches = true -required_approvals = 1 -status = ["continuous-integration/travis-ci/push"] diff --git a/cortex-m-semihosting/.gitignore b/cortex-m-semihosting/.gitignore deleted file mode 100644 index c857ba8..0000000 --- a/cortex-m-semihosting/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.#* -Cargo.lock -bin/*.after -bin/*.before -bin/*.o -target diff --git a/cortex-m-semihosting/.travis.yml b/cortex-m-semihosting/.travis.yml deleted file mode 100644 index 4ca6a3a..0000000 --- a/cortex-m-semihosting/.travis.yml +++ /dev/null @@ -1,107 +0,0 @@ -language: rust - -env: - global: - - RUSTFLAGS="-D warnings" - -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: stable - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7m-none-eabi - rust: stable - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7em-none-eabi - rust: stable - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7em-none-eabihf - rust: stable - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv8m.main-none-eabi - rust: stable - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=x86_64-unknown-linux-gnu - rust: nightly - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv6m-none-eabi - rust: nightly - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7m-none-eabi - rust: nightly - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7em-none-eabi - rust: nightly - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7em-none-eabihf - rust: nightly - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv8m.main-none-eabi - rust: nightly - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - # MSRV - - env: TARGET=x86_64-unknown-linux-gnu - rust: 1.33.0 - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv6m-none-eabi - rust: 1.33.0 - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7m-none-eabi - rust: 1.33.0 - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7em-none-eabi - rust: 1.33.0 - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv7em-none-eabihf - rust: 1.33.0 - if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) - - - env: TARGET=thumbv8m.main-none-eabi - rust: 1.33.0 - 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 - -after_script: set +e - -cache: cargo -before_cache: - # Travis can't cache files that are not readable by "others" - - chmod -R a+r $HOME/.cargo - -branches: - only: - - master - - staging - - trying - -notifications: - email: - on_success: never diff --git a/cortex-m-semihosting/Cargo.toml b/cortex-m-semihosting/Cargo.toml index 2885d3f..4343bdf 100644 --- a/cortex-m-semihosting/Cargo.toml +++ b/cortex-m-semihosting/Cargo.toml @@ -19,4 +19,4 @@ jlink-quirks = [] no-semihosting = [] [dependencies] -cortex-m = ">= 0.5.8, < 0.7" +cortex-m = { path = "..", version = ">= 0.5.8, < 0.7" } diff --git a/cortex-m-semihosting/asm.s b/cortex-m-semihosting/asm.s deleted file mode 100644 index 26a13fc..0000000 --- a/cortex-m-semihosting/asm.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .text.__syscall - .global __syscall - .thumb_func -__syscall: - bkpt 0xAB - bx lr diff --git a/cortex-m-semihosting/assemble.sh b/cortex-m-semihosting/assemble.sh deleted file mode 100755 index f77acf6..0000000 --- a/cortex-m-semihosting/assemble.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -euxo pipefail - -# cflags taken from cc 1.0.22 - -crate=cortex-m-semihosting - -# remove existing blobs because otherwise this will append object files to the old blobs -rm -f bin/*.a - -arm-none-eabi-as -march=armv6s-m asm.s -o bin/$crate.o -ar crs bin/thumbv6m-none-eabi.a bin/$crate.o - -arm-none-eabi-as -march=armv7-m asm.s -o bin/$crate.o -ar crs bin/thumbv7m-none-eabi.a bin/$crate.o - -arm-none-eabi-as -march=armv7e-m asm.s -o bin/$crate.o -ar crs bin/thumbv7em-none-eabi.a bin/$crate.o -ar crs bin/thumbv7em-none-eabihf.a bin/$crate.o - -arm-none-eabi-as -march=armv8-m.base asm.s -o bin/$crate.o -ar crs bin/thumbv8m.base-none-eabi.a bin/$crate.o - -arm-none-eabi-as -march=armv8-m.main asm.s -o bin/$crate.o -ar crs bin/thumbv8m.main-none-eabi.a bin/$crate.o -ar crs bin/thumbv8m.main-none-eabihf.a bin/$crate.o - -rm bin/$crate.o diff --git a/cortex-m-semihosting/bin/thumbv6m-none-eabi.a b/cortex-m-semihosting/bin/thumbv6m-none-eabi.a Binary files differdeleted file mode 100644 index d01b38c..0000000 --- a/cortex-m-semihosting/bin/thumbv6m-none-eabi.a +++ /dev/null diff --git a/cortex-m-semihosting/bin/thumbv7em-none-eabi.a b/cortex-m-semihosting/bin/thumbv7em-none-eabi.a Binary files differdeleted file mode 100644 index 254b42f..0000000 --- a/cortex-m-semihosting/bin/thumbv7em-none-eabi.a +++ /dev/null diff --git a/cortex-m-semihosting/bin/thumbv7em-none-eabihf.a b/cortex-m-semihosting/bin/thumbv7em-none-eabihf.a Binary files differdeleted file mode 100644 index 254b42f..0000000 --- a/cortex-m-semihosting/bin/thumbv7em-none-eabihf.a +++ /dev/null diff --git a/cortex-m-semihosting/bin/thumbv7m-none-eabi.a b/cortex-m-semihosting/bin/thumbv7m-none-eabi.a Binary files differdeleted file mode 100644 index 5b7f5cc..0000000 --- a/cortex-m-semihosting/bin/thumbv7m-none-eabi.a +++ /dev/null diff --git a/cortex-m-semihosting/bin/thumbv8m.base-none-eabi.a b/cortex-m-semihosting/bin/thumbv8m.base-none-eabi.a Binary files differdeleted file mode 100644 index 496a9c8..0000000 --- a/cortex-m-semihosting/bin/thumbv8m.base-none-eabi.a +++ /dev/null diff --git a/cortex-m-semihosting/bin/thumbv8m.main-none-eabi.a b/cortex-m-semihosting/bin/thumbv8m.main-none-eabi.a Binary files differdeleted file mode 100644 index 1d2a03a..0000000 --- a/cortex-m-semihosting/bin/thumbv8m.main-none-eabi.a +++ /dev/null diff --git a/cortex-m-semihosting/bin/thumbv8m.main-none-eabihf.a b/cortex-m-semihosting/bin/thumbv8m.main-none-eabihf.a Binary files differdeleted file mode 100644 index 1d2a03a..0000000 --- a/cortex-m-semihosting/bin/thumbv8m.main-none-eabihf.a +++ /dev/null diff --git a/cortex-m-semihosting/build.rs b/cortex-m-semihosting/build.rs index 4f4a6d6..5fc6a04 100644 --- a/cortex-m-semihosting/build.rs +++ b/cortex-m-semihosting/build.rs @@ -9,9 +9,10 @@ fn main() { if target.starts_with("thumbv") { if env::var_os("CARGO_FEATURE_INLINE_ASM").is_none() { fs::copy( - format!("bin/{}.a", target), + format!("../bin/{}.a", target), out_dir.join(format!("lib{}.a", name)), - ).unwrap(); + ) + .unwrap(); println!("cargo:rustc-link-lib=static={}", name); println!("cargo:rustc-link-search={}", out_dir.display()); diff --git a/cortex-m-semihosting/check-blobs.sh b/cortex-m-semihosting/check-blobs.sh deleted file mode 100755 index 94fde42..0000000 --- a/cortex-m-semihosting/check-blobs.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# Checks that the blobs are up to date with the committed assembly files - -set -euxo pipefail - -for lib in $(ls bin/*.a); do - filename=$(basename $lib) - arm-none-eabi-objdump -Cd $lib > bin/${filename%.a}.before -done - -./assemble.sh - -for lib in $(ls bin/*.a); do - filename=$(basename $lib) - arm-none-eabi-objdump -Cd $lib > bin/${filename%.a}.after -done - -for cksum in $(ls bin/*.after); do - diff -u $cksum ${cksum%.after}.before -done diff --git a/cortex-m-semihosting/ci/install.sh b/cortex-m-semihosting/ci/install.sh deleted file mode 100644 index e63e805..0000000 --- a/cortex-m-semihosting/ci/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -set -euxo pipefail - -main() { - if [ $TARGET != x86_64-unknown-linux-gnu ]; then - rustup target add $TARGET - fi - - mkdir gcc - - curl -L https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2?revision=bc2c96c0-14b5-4bb4-9f18-bceb4050fee7?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,7-2018-q2-update | tar --strip-components=1 -C gcc -xj -} - -main diff --git a/cortex-m-semihosting/ci/script.sh b/cortex-m-semihosting/ci/script.sh deleted file mode 100644 index dc0be46..0000000 --- a/cortex-m-semihosting/ci/script.sh +++ /dev/null @@ -1,15 +0,0 @@ -set -euxo pipefail - -main() { - cargo check --target $TARGET - - if [ $TRAVIS_RUST_VERSION = nightly ]; then - cargo check --target $TARGET --features inline-asm - fi - - if [ $TARGET = x86_64-unknown-linux-gnu ]; then - ./check-blobs.sh - fi -} - -main diff --git a/cortex-m-semihosting/triagebot.toml b/cortex-m-semihosting/triagebot.toml deleted file mode 100644 index fa0824a..0000000 --- a/cortex-m-semihosting/triagebot.toml +++ /dev/null @@ -1 +0,0 @@ -[assign] |