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

use less unstable features #1

Merged
merged 1 commit into from
May 11, 2018
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
51 changes: 51 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
language: rust

matrix:
include:
- env: TARGET=x86_64-unknown-linux-gnu
rust: nightly

- env: TARGET=thumbv7m-none-eabi
rust: nightly
addons:
apt:
packages:
- gcc-arm-none-eabi

- env: TARGET=thumbv7em-none-eabi
rust: nightly
addons:
apt:
packages:
- gcc-arm-none-eabi

- env: TARGET=thumbv7em-none-eabihf
rust: nightly
addons:
apt:
packages:
- gcc-arm-none-eabi

before_install: set -e

install:
- bash ci/install.sh

script:
- bash ci/script.sh

after_script: set +e

cache: cache

before_cache:
- chmod -R a+r $HOME/.cargo;

branches:
only:
- staging
- trying

notifications:
email:
on_success: never
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ keywords = ["panic-impl", "panic", "ITM", "ARM", "Cortex-M"]
license = "MIT OR Apache-2.0"
name = "panic-itm"
repository = "https://github.com/japaric/panic-itm"
version = "0.1.0"
version = "0.1.1"

[dependencies]
cortex-m = "0.4.3"
aligned = "0.1.1"
aligned = "0.2.0"
cortex-m = "0.5.0"
3 changes: 3 additions & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
status = [
"continuous-integration/travis-ci/push",
]
9 changes: 9 additions & 0 deletions ci/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set -euxo pipefail

main() {
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
rustup target add $TARGET
fi
}

main
7 changes: 7 additions & 0 deletions ci/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set -euxo pipefail

main() {
cargo check --target $TARGET
}

main
8 changes: 2 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,13 @@

#![deny(missing_docs)]
#![deny(warnings)]
#![feature(core_intrinsics)]
#![feature(lang_items)]
#![no_std]

extern crate aligned;
#[macro_use]
extern crate cortex_m;

use core::intrinsics;

use aligned::Aligned;
use cortex_m::peripheral::ITM;
use cortex_m::{interrupt, itm};
Expand All @@ -57,10 +54,9 @@ unsafe extern "C" fn panic_fmt(

itm::write_aligned(stim, &Aligned(*b"panicked at '"));
itm::write_fmt(stim, args);
itm::write_str(stim, "', ");
itm::write_aligned(stim, &Aligned(*b"', "));
itm::write_str(stim, file);
iprintln!(stim, ":{}:{}", line, col);

// XXX What should be the behavior after logging the message?
intrinsics::abort()
loop {}
}