ci: don't install cargo-edit
This commit is contained in:
@@ -2,8 +2,6 @@ set -euxo pipefail
|
||||
|
||||
main() {
|
||||
rustup target add $TARGET
|
||||
|
||||
cargo install cargo-edit || true
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
33
ci/script.sh
33
ci/script.sh
@@ -17,9 +17,7 @@ EOF
|
||||
|
||||
local examples=(
|
||||
crash
|
||||
# device
|
||||
hello
|
||||
itm
|
||||
override-exception-handler
|
||||
panic
|
||||
)
|
||||
@@ -28,13 +26,29 @@ EOF
|
||||
cargo build --target $TARGET --example $ex --release
|
||||
done
|
||||
|
||||
cargo add alloc-cortex-m
|
||||
# ITM is not available on Cortex-M0
|
||||
if [ $TARGET != thumbv6m-none-eabi ]; then
|
||||
local ex=itm
|
||||
cargo build --target $TARGET --example $ex
|
||||
cargo build --target $TARGET --example $ex --release
|
||||
|
||||
cargo build --target $TARGET --example allocator
|
||||
cargo build --target $TARGET --example allocator --release
|
||||
examples+=( $ex )
|
||||
|
||||
examples+=( allocator )
|
||||
fi
|
||||
|
||||
# Allocator example needs an extra dependency
|
||||
cat >>Cargo.toml <<'EOF'
|
||||
[dependencies.alloc-cortex-m]
|
||||
version = "0.3.3"
|
||||
EOF
|
||||
|
||||
local ex=allocator
|
||||
cargo build --target $TARGET --example $ex
|
||||
cargo build --target $TARGET --example $ex --release
|
||||
|
||||
examples+=( $ex )
|
||||
|
||||
# Device example needs an extra dependency
|
||||
if [ $TARGET = thumbv7m-none-eabi ]; then
|
||||
cat >>Cargo.toml <<'EOF'
|
||||
[dependencies.stm32f103xx]
|
||||
@@ -42,10 +56,11 @@ features = ["rt"]
|
||||
version = "0.9.0"
|
||||
EOF
|
||||
|
||||
cargo build --target $TARGET --example device
|
||||
cargo build --target $TARGET --example device --release
|
||||
local ex=device
|
||||
cargo build --target $TARGET --example $ex
|
||||
cargo build --target $TARGET --example $ex --release
|
||||
|
||||
examples+=( device )
|
||||
examples+=( $ex )
|
||||
fi
|
||||
|
||||
IFS=,;eval arm-none-eabi-size target/$TARGET/release/examples/"{${examples[*]}}"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#[macro_use]
|
||||
extern crate cortex_m;
|
||||
extern crate cortex_m_rt;
|
||||
extern crate panic_itm; // panicking behavior
|
||||
extern crate panic_abort; // panicking behavior
|
||||
|
||||
use cortex_m::{asm, Peripherals};
|
||||
|
||||
@@ -27,9 +27,6 @@ fn main() {
|
||||
let mut itm = p.ITM;
|
||||
|
||||
iprintln!(&mut itm.stim[0], "Hello, world!");
|
||||
|
||||
// Also prints the panic message to the ITM
|
||||
panic!("Oops");
|
||||
}
|
||||
|
||||
// As we are not using interrupts, we just register a dummy catch all handler
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
//! #[macro_use]
|
||||
//! extern crate cortex_m;
|
||||
//! extern crate cortex_m_rt;
|
||||
//! extern crate panic_itm; // panicking behavior
|
||||
//! extern crate panic_abort; // panicking behavior
|
||||
//!
|
||||
//! use cortex_m::{asm, Peripherals};
|
||||
//!
|
||||
@@ -29,9 +29,6 @@
|
||||
//! let mut itm = p.ITM;
|
||||
//!
|
||||
//! iprintln!(&mut itm.stim[0], "Hello, world!");
|
||||
//!
|
||||
//! // Also prints the panic message to the ITM
|
||||
//! panic!("Oops");
|
||||
//! }
|
||||
//!
|
||||
//! // As we are not using interrupts, we just register a dummy catch all handler
|
||||
|
||||
Reference in New Issue
Block a user