Skip to content
This repository was archived by the owner on Nov 14, 2020. It is now read-only.

Commit a8818f8

Browse files
bors[bot]japaric
andcommitted
Merge #1
1: use less unstable features r=japaric a=japaric depends on rust-embedded/cortex-m#88 Co-authored-by: Jorge Aparicio <[email protected]>
2 parents 356d5eb + bdbae5c commit a8818f8

File tree

6 files changed

+75
-9
lines changed

6 files changed

+75
-9
lines changed

.travis.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
language: rust
2+
3+
matrix:
4+
include:
5+
- env: TARGET=x86_64-unknown-linux-gnu
6+
rust: nightly
7+
8+
- env: TARGET=thumbv7m-none-eabi
9+
rust: nightly
10+
addons:
11+
apt:
12+
packages:
13+
- gcc-arm-none-eabi
14+
15+
- env: TARGET=thumbv7em-none-eabi
16+
rust: nightly
17+
addons:
18+
apt:
19+
packages:
20+
- gcc-arm-none-eabi
21+
22+
- env: TARGET=thumbv7em-none-eabihf
23+
rust: nightly
24+
addons:
25+
apt:
26+
packages:
27+
- gcc-arm-none-eabi
28+
29+
before_install: set -e
30+
31+
install:
32+
- bash ci/install.sh
33+
34+
script:
35+
- bash ci/script.sh
36+
37+
after_script: set +e
38+
39+
cache: cache
40+
41+
before_cache:
42+
- chmod -R a+r $HOME/.cargo;
43+
44+
branches:
45+
only:
46+
- staging
47+
- trying
48+
49+
notifications:
50+
email:
51+
on_success: never

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ keywords = ["panic-impl", "panic", "ITM", "ARM", "Cortex-M"]
66
license = "MIT OR Apache-2.0"
77
name = "panic-itm"
88
repository = "https://github.com/japaric/panic-itm"
9-
version = "0.1.0"
9+
version = "0.1.1"
1010

1111
[dependencies]
12-
cortex-m = "0.4.3"
13-
aligned = "0.1.1"
12+
aligned = "0.2.0"
13+
cortex-m = "0.5.0"

bors.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
status = [
2+
"continuous-integration/travis-ci/push",
3+
]

ci/install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
5+
rustup target add $TARGET
6+
fi
7+
}
8+
9+
main

ci/script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
cargo check --target $TARGET
5+
}
6+
7+
main

src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,13 @@
2929
3030
#![deny(missing_docs)]
3131
#![deny(warnings)]
32-
#![feature(core_intrinsics)]
3332
#![feature(lang_items)]
3433
#![no_std]
3534

3635
extern crate aligned;
3736
#[macro_use]
3837
extern crate cortex_m;
3938

40-
use core::intrinsics;
41-
4239
use aligned::Aligned;
4340
use cortex_m::peripheral::ITM;
4441
use cortex_m::{interrupt, itm};
@@ -57,10 +54,9 @@ unsafe extern "C" fn panic_fmt(
5754

5855
itm::write_aligned(stim, &Aligned(*b"panicked at '"));
5956
itm::write_fmt(stim, args);
60-
itm::write_str(stim, "', ");
57+
itm::write_aligned(stim, &Aligned(*b"', "));
6158
itm::write_str(stim, file);
6259
iprintln!(stim, ":{}:{}", line, col);
6360

64-
// XXX What should be the behavior after logging the message?
65-
intrinsics::abort()
61+
loop {}
6662
}

0 commit comments

Comments
 (0)